diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-08-19 13:01:19 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-08-19 13:14:28 -0700 |
commit | 5fb4b98bdd33475703f8928699c8a6b91fd06550 (patch) | |
tree | d43f0c1c55553b875c5490c8a4ed0393d529bf72 /packages | |
parent | b960e75e52176bc4edc709aba71535b32e2d9970 (diff) | |
download | frameworks_base-5fb4b98bdd33475703f8928699c8a6b91fd06550.zip frameworks_base-5fb4b98bdd33475703f8928699c8a6b91fd06550.tar.gz frameworks_base-5fb4b98bdd33475703f8928699c8a6b91fd06550.tar.bz2 |
Fix wakelock leak for dozing
Bug: 23344235
Change-Id: I7f4233cfe15bdd3e8cc5f01a70707bdde9fc1737
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/doze/DozeService.java | 2 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java index a60b4e7..630d735 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java @@ -256,6 +256,8 @@ public class DozeService extends DreamService { private void continuePulsing(int reason) { if (mHost.isPulsingBlocked()) { + mPulsing = false; + mWakeLock.release(); return; } mHost.pulseWhileDozing(new DozeHost.PulseCallback() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java index 4d3e57e..3ff69c9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java @@ -104,13 +104,11 @@ public class DozeScrimController { * Aborts pulsing immediately. */ public void abortPulsing() { - mHandler.removeCallbacks(mPulseIn); - abortAnimations(); + cancelPulsing(); if (mDozing) { mScrimController.setDozeBehindAlpha(1f); mScrimController.setDozeInFrontAlpha(1f); } - mPulseCallback = null; } public void onScreenTurnedOn() { |