summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
diff options
context:
space:
mode:
authorJosh Tsuji <tsuji@google.com>2021-05-26 18:40:12 -0400
committerJosh Tsuji <tsuji@google.com>2021-05-27 16:26:22 -0400
commitee89a547f15bfc6d07553304f295ad7204ebec23 (patch)
tree0a3262ce5b0955acb18ffe697f13f7ade6de064f /packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
parent018e1142021bb8f9a2b0332921c16d4e86804acf (diff)
Adds the ScreenOffAnimationController, which fixes multiple issues with unlocked screen off.
This changes the screen off animation so that the controller directly animates the LightRevealScrim and the shade keyguard UI, rather then tying these to the dozeAmount. This makes it easier for us to manage/cancel these animations, such as during the camera launch gesture, since the various doze components update their state asynchronously. This approach also means that instead of actually changing everything to KEYGUARD as soon as the power button is pressed, we actually just show the LightRevealScrim and the shade's AOD UI. This results in far less jank. We then actually show the keyguard once the animation finishes or is cancelled. Bug: 169693662 Bug: 169739682 Bug: 181020504 Fixes: 185567665 Fixes: 189342687 Fixes: 185567665 Fixes: 183195436 Test: atest SystemUITests Test: trigger screen off and cancel it Test: trigger screen off and don't cancel it, make sure it wakes up fine Test: disable 'power button locks instantly' and make sure it doesn't lock the device, both when the animation finishes or when it's cancelled Test: press the power button twice in rapid succession Test: press the power button twice in slower succession about 200ms apart (which triggers the camera onWakingUp vs onFinishedGoingToSleep) Test: press the power button 5 times, make sure emergency gesture comes up Test: disable AOD, observe no screen off animation and lock functionality works Change-Id: I1c44304becdadfd37bab7fd81286a9702e5d6141
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
index 7b6514a63195..89ca507aad8d 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
@@ -27,6 +27,7 @@ import com.android.systemui.statusbar.notification.PropertyAnimator;
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
import com.android.systemui.statusbar.phone.DozeParameters;
+import com.android.systemui.statusbar.phone.UnlockedScreenOffAnimationController;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.util.ViewController;
@@ -66,7 +67,8 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
ConfigurationController configurationController,
DozeParameters dozeParameters,
KeyguardUnlockAnimationController keyguardUnlockAnimationController,
- SmartspaceTransitionController smartspaceTransitionController) {
+ SmartspaceTransitionController smartspaceTransitionController,
+ UnlockedScreenOffAnimationController unlockedScreenOffAnimationController) {
super(keyguardStatusView);
mKeyguardSliceViewController = keyguardSliceViewController;
mKeyguardClockSwitchController = keyguardClockSwitchController;
@@ -75,7 +77,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
mDozeParameters = dozeParameters;
mKeyguardStateController = keyguardStateController;
mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController,
- dozeParameters);
+ dozeParameters, unlockedScreenOffAnimationController);
mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
mSmartspaceTransitionController = smartspaceTransitionController;
@@ -238,13 +240,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
}
/**
- * @return {@code true} if we are currently animating the screen off from unlock
- */
- public boolean isAnimatingScreenOffFromUnlocked() {
- return mKeyguardVisibilityHelper.isAnimatingScreenOffFromUnlocked();
- }
-
- /**
* Set the visibility of the keyguard status view based on some new state.
*/
public void setKeyguardStatusViewVisibility(