diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-09-10 15:48:21 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-09-16 23:44:56 +0000 |
commit | 18f18ae078ee97bbdfc9da39d4a19866dceb6a3e (patch) | |
tree | 880119d139f8638f88b6f4b49d2db84f7d67e751 /packages/SystemUI/src/com/android/systemui/keyguard | |
parent | 39e94ebe22d4959facea4c3621a0a5377242a570 (diff) | |
download | frameworks_base-18f18ae078ee97bbdfc9da39d4a19866dceb6a3e.zip frameworks_base-18f18ae078ee97bbdfc9da39d4a19866dceb6a3e.tar.gz frameworks_base-18f18ae078ee97bbdfc9da39d4a19866dceb6a3e.tar.bz2 |
Allow camera launch also when device is interactive
Bug: 23967648
Change-Id: If91df75e6325b3969dc2351a70af0c160d3eab04
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/keyguard')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 70c8a53..33c59f8 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -154,6 +154,7 @@ public class KeyguardViewMediator extends SystemUI { private static final int NOTIFY_STARTED_WAKING_UP = 21; private static final int NOTIFY_SCREEN_TURNED_ON = 22; private static final int NOTIFY_SCREEN_TURNED_OFF = 23; + private static final int NOTIFY_STARTED_GOING_TO_SLEEP = 24; /** * The default amount of time we stay awake (used for all key input) @@ -676,6 +677,7 @@ public class KeyguardViewMediator extends SystemUI { playSounds(true); } } + notifyStartedGoingToSleep(); } public void onFinishedGoingToSleep(int why) { @@ -1092,6 +1094,11 @@ public class KeyguardViewMediator extends SystemUI { mHandler.sendEmptyMessage(VERIFY_UNLOCK); } + private void notifyStartedGoingToSleep() { + if (DEBUG) Log.d(TAG, "notifyStartedGoingToSleep"); + mHandler.sendEmptyMessage(NOTIFY_STARTED_GOING_TO_SLEEP); + } + private void notifyFinishedGoingToSleep() { if (DEBUG) Log.d(TAG, "notifyFinishedGoingToSleep"); mHandler.sendEmptyMessage(NOTIFY_FINISHED_GOING_TO_SLEEP); @@ -1203,6 +1210,9 @@ public class KeyguardViewMediator extends SystemUI { case VERIFY_UNLOCK: handleVerifyUnlock(); break; + case NOTIFY_STARTED_GOING_TO_SLEEP: + handleNotifyStartedGoingToSleep(); + break; case NOTIFY_FINISHED_GOING_TO_SLEEP: handleNotifyFinishedGoingToSleep(); break; @@ -1530,6 +1540,13 @@ public class KeyguardViewMediator extends SystemUI { } } + private void handleNotifyStartedGoingToSleep() { + synchronized (KeyguardViewMediator.this) { + if (DEBUG) Log.d(TAG, "handleNotifyStartedGoingToSleep"); + mStatusBarKeyguardViewManager.onStartedGoingToSleep(); + } + } + /** * Handle message sent by {@link #notifyFinishedGoingToSleep()} * @see #NOTIFY_FINISHED_GOING_TO_SLEEP |