mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Fix bug on acquiring wake lock
This commit is contained in:
@@ -76,8 +76,8 @@ public class SystemUtils {
|
||||
wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
|
||||
if (wakeLock == null) {
|
||||
Log.e(TAG, "Cannot create a new wake lock.");
|
||||
return null;
|
||||
}
|
||||
return wakeLock;
|
||||
}
|
||||
if (!wakeLock.isHeld()) {
|
||||
wakeLock.acquire();
|
||||
|
||||
Reference in New Issue
Block a user