summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-07-30 11:56:36 -0700
committerJorim Jaggi <jjaggi@google.com>2015-07-31 19:31:16 +0000
commitf1518da4512dcf350fd808a5288634f534bca1bb (patch)
tree7098556e9bdfbfc4872777b86eb0ae1e511d1a2d /packages/Keyguard/src
parenta21b2e30b246b152b3b3692384de534ade2f3485 (diff)
downloadframeworks_base-f1518da4512dcf350fd808a5288634f534bca1bb.zip
frameworks_base-f1518da4512dcf350fd808a5288634f534bca1bb.tar.gz
frameworks_base-f1518da4512dcf350fd808a5288634f534bca1bb.tar.bz2
Fix fingerprint icon screen on animation
Bug: 22807015 Change-Id: I4685085007d87f1b1e1db380d0f899efc4e56240
Diffstat (limited to 'packages/Keyguard/src')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java30
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java10
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) { }