diff options
author | Matt Pietal <mpietal@google.com> | 2021-05-13 08:37:27 -0400 |
---|---|---|
committer | Matt Pietal <mpietal@google.com> | 2021-05-13 12:54:34 +0000 |
commit | 8690be5bc95c022a00c2c3392cc7399e01e505a1 (patch) | |
tree | e88a541686cd51709255abb0dfae8b6609891e9d /packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java | |
parent | 28c4860610d4cc96c29849e5d75cf78b15223ad6 (diff) |
Keyguard - Fix clock in occluded state
The status area (clock, smartspace) was not being shown after exiting
an activity on the lockscreen. The y translation value was incorrect
for the branch it was taking. Add a new check for occlusion, and use
the correct transition when leaving this state.
Fixes: 184188027
Test: manual (use emergency call button)
Change-Id: I6fa34e55252ac8435031915a7e929711e7976fe2
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java index 588f4bb20340..3a3f2fc40b25 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java @@ -51,8 +51,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV private final KeyguardVisibilityHelper mKeyguardVisibilityHelper; private final Rect mClipBounds = new Rect(); - private int mLockScreenMode = KeyguardUpdateMonitor.LOCK_SCREEN_MODE_NORMAL; - @Inject public KeyguardStatusViewController( KeyguardStatusView keyguardStatusView, @@ -192,28 +190,11 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV * Update position of the view with an optional animation */ public void updatePosition(int x, int y, float scale, boolean animate) { - // We animate the status view visible/invisible using Y translation, so don't change it - // while the animation is running. - if (!mKeyguardVisibilityHelper.isVisibilityAnimating()) { - PropertyAnimator.setProperty(mView, AnimatableProperty.Y, y, CLOCK_ANIMATION_PROPERTIES, - animate); - } - - if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1) { - // reset any prior movement - PropertyAnimator.setProperty(mView, AnimatableProperty.X, 0, - CLOCK_ANIMATION_PROPERTIES, animate); + PropertyAnimator.setProperty(mView, AnimatableProperty.Y, y, CLOCK_ANIMATION_PROPERTIES, + animate); - mKeyguardClockSwitchController.updatePosition(x, scale, CLOCK_ANIMATION_PROPERTIES, - animate); - } else { - // reset any prior movement - mKeyguardClockSwitchController.updatePosition(0, 0f, CLOCK_ANIMATION_PROPERTIES, - animate); - - PropertyAnimator.setProperty(mView, AnimatableProperty.X, x, - CLOCK_ANIMATION_PROPERTIES, animate); - } + mKeyguardClockSwitchController.updatePosition(x, scale, CLOCK_ANIMATION_PROPERTIES, + animate); } /** @@ -254,7 +235,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV private KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @Override public void onLockScreenModeChanged(int mode) { - mLockScreenMode = mode; mKeyguardSliceViewController.updateLockScreenMode(mode); mView.setCanShowOwnerInfo(false); mView.updateLogoutView(false); |