mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 16:15:55 +01:00
do not use synchonized singleton for HeartRateUtils
This commit is contained in:
parent
64da085942
commit
a844db7927
@ -36,15 +36,10 @@ public class HeartRateUtils {
|
|||||||
private int maxHeartRateValue;
|
private int maxHeartRateValue;
|
||||||
private int minHeartRateValue;
|
private int minHeartRateValue;
|
||||||
|
|
||||||
/**
|
private static final HeartRateUtils instance = new HeartRateUtils();
|
||||||
* extra class used for synchronized access of the singleton
|
|
||||||
*/
|
|
||||||
private static final class HeartRateUtilsInstanceHolder {
|
|
||||||
static final HeartRateUtils INSTANCE = new HeartRateUtils();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HeartRateUtils getInstance() {
|
public static HeartRateUtils getInstance() {
|
||||||
return HeartRateUtilsInstanceHolder.INSTANCE;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user