diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-08-01 16:52:08 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-01 16:52:08 +0000 |
commit | 0a7844db4059dd17be28216410f214f2a46951a8 (patch) | |
tree | 9a4334dfb673b7804c1b7a9309cc9991aef895e7 /packages/Keyguard | |
parent | 4cfe2a8c0050a69e1793f41a60395b69277973b2 (diff) | |
parent | 703dc46ebf38bc1211524a4afb67ffdfbba7c6ec (diff) | |
download | frameworks_base-0a7844db4059dd17be28216410f214f2a46951a8.zip frameworks_base-0a7844db4059dd17be28216410f214f2a46951a8.tar.gz frameworks_base-0a7844db4059dd17be28216410f214f2a46951a8.tar.bz2 |
am 703dc46e: am f1518da4: Fix fingerprint icon screen on animation
* commit '703dc46ebf38bc1211524a4afb67ffdfbba7c6ec':
Fix fingerprint icon screen on animation
Diffstat (limited to 'packages/Keyguard')
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java | 30 | ||||
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java | 10 |
2 files changed, 40 insertions, 0 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java index 3670683..5183c35 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -142,6 +142,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private static final int MSG_SIM_SUBSCRIPTION_INFO_CHANGED = 328; private static final int MSG_AIRPLANE_MODE_CHANGED = 329; private static final int MSG_SERVICE_STATE_CHANGE = 330; + private static final int MSG_SCREEN_TURNED_ON = 331; + private static final int MSG_SCREEN_TURNED_OFF = 332; private static KeyguardUpdateMonitor sInstance; @@ -248,6 +250,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { case MSG_SERVICE_STATE_CHANGE: handleServiceStateChange(msg.arg1, (ServiceState) msg.obj); break; + case MSG_SCREEN_TURNED_ON: + handleScreenTurnedOn(); + break; + case MSG_SCREEN_TURNED_OFF: + handleScreenTurnedOff(); + break; } } }; @@ -806,6 +814,26 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { updateFingerprintListeningState(); } + private void handleScreenTurnedOn() { + final int count = mCallbacks.size(); + for (int i = 0; i < count; i++) { + KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); + if (cb != null) { + cb.onScreenTurnedOn(); + } + } + } + + private void handleScreenTurnedOff() { + final int count = mCallbacks.size(); + for (int i = 0; i < count; i++) { + KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); + if (cb != null) { + cb.onScreenTurnedOff(); + } + } + } + /** * IMPORTANT: Must be called from UI thread. */ @@ -1486,12 +1514,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { synchronized (this) { mScreenOn = true; } + mHandler.sendEmptyMessage(MSG_SCREEN_TURNED_ON); } public void dispatchScreenTurnedOff() { synchronized(this) { mScreenOn = false; } + mHandler.sendEmptyMessage(MSG_SCREEN_TURNED_OFF); } public boolean isDeviceInteractive() { diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java index 0cdf999..6cda2b7 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java @@ -161,6 +161,16 @@ public class KeyguardUpdateMonitorCallback { public void onFinishedGoingToSleep(int why) { } /** + * Called when the screen has been turned on. + */ + public void onScreenTurnedOn() { } + + /** + * Called when the screen has been turned off. + */ + public void onScreenTurnedOff() { } + + /** * Called when trust changes for a user. */ public void onTrustChanged(int userId) { } |