diff options
author | Selim Cinek <cinek@google.com> | 2015-09-03 16:01:53 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-09-08 18:10:53 -0700 |
commit | 1b6f819a649d7c05b22ac420fa6fcf4a634600ba (patch) | |
tree | 34112247b90318aca1f8b3b96c168236b4cab342 /packages | |
parent | 3bed3bf498eadcaa760608a415c66e017d2eb690 (diff) | |
download | frameworks_base-1b6f819a649d7c05b22ac420fa6fcf4a634600ba.zip frameworks_base-1b6f819a649d7c05b22ac420fa6fcf4a634600ba.tar.gz frameworks_base-1b6f819a649d7c05b22ac420fa6fcf4a634600ba.tar.bz2 |
Fixed a racecondition where the camera would not launch
If the gesture was detected while turning on, the gesture
would not launch.
Bug: 23636271
Change-Id: I166759a55137163be0c3f38fe8d1dc0c18977e11
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 55b1127..13353d3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -289,6 +289,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private DozeServiceHost mDozeServiceHost; private boolean mWakeUpComingFromTouch; private PointF mWakeUpTouchLocation; + private boolean mScreenTurningOn; int mPixelFormat; Object mQueueLock = new Object(); @@ -3920,6 +3921,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } public void onScreenTurningOn() { + mScreenTurningOn = true; mNotificationPanel.onScreenTurningOn(); if (mLaunchCameraOnScreenTurningOn) { mNotificationPanel.launchCamera(false); @@ -3932,6 +3934,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } public void onScreenTurnedOn() { + mScreenTurningOn = false; mDozeScrimController.onScreenTurnedOn(); } @@ -4107,7 +4110,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mScrimController.dontAnimateBouncerChangesUntilNextFrame(); mGestureWakeLock.acquire(LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); } - if (mStatusBarKeyguardViewManager.isScreenTurnedOn()) { + if (mScreenTurningOn || mStatusBarKeyguardViewManager.isScreenTurnedOn()) { mNotificationPanel.launchCamera(mDeviceInteractive /* animate */); } else { // We need to defer the camera launch until the screen comes on, since otherwise |