diff options
author | Selim Cinek <cinek@google.com> | 2015-09-09 22:07:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-09 22:07:02 +0000 |
commit | a4fca2c7255367b96fc8012b0fcb62a71343e1ff (patch) | |
tree | 44b36a1dfaf77525b1921b5a23dbeb0fa531ee15 /packages/SystemUI | |
parent | 5e354223d817477efac9a6a2e3ce3d9161e046a4 (diff) | |
parent | 1b6f819a649d7c05b22ac420fa6fcf4a634600ba (diff) | |
download | frameworks_base-a4fca2c7255367b96fc8012b0fcb62a71343e1ff.zip frameworks_base-a4fca2c7255367b96fc8012b0fcb62a71343e1ff.tar.gz frameworks_base-a4fca2c7255367b96fc8012b0fcb62a71343e1ff.tar.bz2 |
Merge "Fixed a racecondition where the camera would not launch" into mnc-dr-dev
Diffstat (limited to 'packages/SystemUI')
-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 638cd1c..548125d 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(); @@ -3921,6 +3922,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } public void onScreenTurningOn() { + mScreenTurningOn = true; mNotificationPanel.onScreenTurningOn(); if (mLaunchCameraOnScreenTurningOn) { mNotificationPanel.launchCamera(false); @@ -3933,6 +3935,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } public void onScreenTurnedOn() { + mScreenTurningOn = false; mDozeScrimController.onScreenTurnedOn(); } @@ -4108,7 +4111,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 |