Loading packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +29 −0 Original line number Diff line number Diff line Loading @@ -409,6 +409,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private void handleFingerprintAuthFailed() { if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) { notifyOnFingerprintWakeAndUnlockingFinished(); } mFpWakeMode = FP_WAKE_NONE; releaseFingerprintWakeLock(); handleFingerprintHelp(-1, mContext.getString(R.string.fingerprint_not_recognized)); } Loading @@ -428,6 +432,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } mHandler.postDelayed(mReleaseFingerprintWakeLockRunnable, FINGERPRINT_WAKELOCK_TIMEOUT_MS); if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) { notifyOnFingerprintWakeAndUnlockingStarted(); } } else if (!mDeviceInteractive) { mFpWakeMode = FP_WAKE_TO_BOUNCER; } else { Loading @@ -435,6 +442,24 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } private void notifyOnFingerprintWakeAndUnlockingStarted() { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onFingerprintWakeAndUnlockingStarted(); } } } private void notifyOnFingerprintWakeAndUnlockingFinished() { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onFingerprintWakeAndUnlockingFinished(); } } } private final Runnable mReleaseFingerprintWakeLockRunnable = new Runnable() { @Override public void run() { Loading Loading @@ -891,6 +916,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { cb.onScreenTurnedOn(); } } if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) { notifyOnFingerprintWakeAndUnlockingFinished(); } mFpWakeMode = FP_WAKE_NONE; } private void handleScreenTurnedOff() { Loading packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +11 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,17 @@ public class KeyguardUpdateMonitorCallback { */ public void onFingerprintAuthenticated(int userId, boolean wakeAndUnlocking) { } /** * Called when we might be starting a wake-and-unlock sequence. */ public void onFingerprintWakeAndUnlockingStarted() { } /** * Called when we're done with the wake-and-unlock sequence. This can either happen when we * figure out that the fingerprint didn't match, or when the phone is fully unlocked. */ public void onFingerprintWakeAndUnlockingFinished() { } /** * Called when fingerprint provides help string (e.g. "Try again") * @param msgId Loading packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ public interface DozeHost { void stopDozing(); boolean isPowerSaveActive(); boolean isNotificationLightOn(); boolean isPulsingBlocked(); public interface Callback { void onNewNotifications(); Loading packages/SystemUI/src/com/android/systemui/doze/DozeService.java +3 −0 Original line number Diff line number Diff line Loading @@ -255,6 +255,9 @@ public class DozeService extends DreamService { } private void continuePulsing(int reason) { if (mHost.isPulsingBlocked()) { return; } mHost.pulseWhileDozing(new DozeHost.PulseCallback() { @Override public void onPulseStarted() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +11 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,17 @@ public class DozeScrimController { mHandler.post(mPulseIn); } /** * Aborts pulsing immediately. */ public void abortPulsing() { mHandler.removeCallbacks(mPulseIn); abortAnimations(); mScrimController.setDozeBehindAlpha(1f); mScrimController.setDozeInFrontAlpha(1f); mPulseCallback = null; } public void onScreenTurnedOn() { if (isPulsing()) { final boolean pickup = mPulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP; Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +29 −0 Original line number Diff line number Diff line Loading @@ -409,6 +409,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private void handleFingerprintAuthFailed() { if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) { notifyOnFingerprintWakeAndUnlockingFinished(); } mFpWakeMode = FP_WAKE_NONE; releaseFingerprintWakeLock(); handleFingerprintHelp(-1, mContext.getString(R.string.fingerprint_not_recognized)); } Loading @@ -428,6 +432,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } mHandler.postDelayed(mReleaseFingerprintWakeLockRunnable, FINGERPRINT_WAKELOCK_TIMEOUT_MS); if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) { notifyOnFingerprintWakeAndUnlockingStarted(); } } else if (!mDeviceInteractive) { mFpWakeMode = FP_WAKE_TO_BOUNCER; } else { Loading @@ -435,6 +442,24 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } private void notifyOnFingerprintWakeAndUnlockingStarted() { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onFingerprintWakeAndUnlockingStarted(); } } } private void notifyOnFingerprintWakeAndUnlockingFinished() { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onFingerprintWakeAndUnlockingFinished(); } } } private final Runnable mReleaseFingerprintWakeLockRunnable = new Runnable() { @Override public void run() { Loading Loading @@ -891,6 +916,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { cb.onScreenTurnedOn(); } } if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) { notifyOnFingerprintWakeAndUnlockingFinished(); } mFpWakeMode = FP_WAKE_NONE; } private void handleScreenTurnedOff() { Loading
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +11 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,17 @@ public class KeyguardUpdateMonitorCallback { */ public void onFingerprintAuthenticated(int userId, boolean wakeAndUnlocking) { } /** * Called when we might be starting a wake-and-unlock sequence. */ public void onFingerprintWakeAndUnlockingStarted() { } /** * Called when we're done with the wake-and-unlock sequence. This can either happen when we * figure out that the fingerprint didn't match, or when the phone is fully unlocked. */ public void onFingerprintWakeAndUnlockingFinished() { } /** * Called when fingerprint provides help string (e.g. "Try again") * @param msgId Loading
packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ public interface DozeHost { void stopDozing(); boolean isPowerSaveActive(); boolean isNotificationLightOn(); boolean isPulsingBlocked(); public interface Callback { void onNewNotifications(); Loading
packages/SystemUI/src/com/android/systemui/doze/DozeService.java +3 −0 Original line number Diff line number Diff line Loading @@ -255,6 +255,9 @@ public class DozeService extends DreamService { } private void continuePulsing(int reason) { if (mHost.isPulsingBlocked()) { return; } mHost.pulseWhileDozing(new DozeHost.PulseCallback() { @Override public void onPulseStarted() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +11 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,17 @@ public class DozeScrimController { mHandler.post(mPulseIn); } /** * Aborts pulsing immediately. */ public void abortPulsing() { mHandler.removeCallbacks(mPulseIn); abortAnimations(); mScrimController.setDozeBehindAlpha(1f); mScrimController.setDozeInFrontAlpha(1f); mPulseCallback = null; } public void onScreenTurnedOn() { if (isPulsing()) { final boolean pickup = mPulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP; Loading