Fix cyclic keyguard state notification
We should not not notify that the keyguard faded away
when a transition is cancelled. Another transition is
already happening and the message will be receive when
it finishes.
Change-Id: I4d2e227027a02f2168578bc1d201a4cf8672097d
Fixes: 70316977
Test: Double tap power button on the lock screen and aod
Test: Unlock with fingerprint from aod and lock screen
Test: Unlock with PIN
Test: Unlock from "pulsing" (AoD2) with fp or by tapping notification
(cherry picked from commit 243c731f7f70bd1fa1fe995c52d065ae2d63279d)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 3e32446..59533e6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -649,15 +649,6 @@
.Callback() {
@Override
public void onFinished() {
- notifyKeyguardState();
- }
-
- @Override
- public void onCancelled() {
- notifyKeyguardState();
- }
-
- private void notifyKeyguardState() {
if (mStatusBarKeyguardViewManager == null) {
Log.w(TAG, "Tried to notify keyguard visibility when "
+ "mStatusBarKeyguardViewManager was null");
@@ -665,6 +656,12 @@
}
mStatusBarKeyguardViewManager.onKeyguardFadedAway();
}
+
+ @Override
+ public void onCancelled() {
+ // Transition was cancelled because another one took over.
+ // Nothing to do in here but wait.
+ }
};
private NotificationMessagingUtil mMessagingUtil;