1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-05 01:37:03 +01:00

do not use synchonized singleton for HeartRateUtils

This commit is contained in:
Dikay900 2018-09-02 12:58:23 +02:00
parent 64da085942
commit a844db7927

View File

@ -36,15 +36,10 @@ public class HeartRateUtils {
private int maxHeartRateValue;
private int minHeartRateValue;
/**
* extra class used for synchronized access of the singleton
*/
private static final class HeartRateUtilsInstanceHolder {
static final HeartRateUtils INSTANCE = new HeartRateUtils();
}
private static final HeartRateUtils instance = new HeartRateUtils();
public static HeartRateUtils getInstance() {
return HeartRateUtilsInstanceHolder.INSTANCE;
return instance;
}
/**