mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 12:56:49 +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 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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user