jimdc / TradeTracker

by Advent Fintech LLC
1 stars 0 forks source link

RuntimeException: WakeLock under-locked MyWakelockTag #81

Closed jimdc closed 6 years ago

jimdc commented 6 years ago

see https://stackoverflow.com/questions/12140844/java-lang-runtimeexception-wakelock-under-locked-c2dm-lib

                    Utility.sleepWithThreadInterruptIfWokenUp(updateFrequencyPref)
                    wakeLock.release()

Caused here. Android doesn't like it when you sleep and then release?

jimdc commented 6 years ago

newer implementation in BatteryAwareness checks if the wakelock is held before releasing it, per the StackOverflow recommendation.