From 3281fe22a12d5f3a34520eda277705f31dcf8060 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 4 May 2016 11:39:10 -0700 Subject: [PATCH 1/2] Fixed a bug where the scrim was transparent When quickly pulling down during the fadeout transition the scrim was never updated anymore. The animation is now cancelled in that case. Change-Id: Iddfbdf5c891732df15f22c81d6fcd4d268ce2593 Fixes: 28054515 --- .../systemui/statusbar/phone/ScrimController.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index dfc816ca15ce8..eae0b8e476140 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -91,6 +91,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, private boolean mSkipFirstFrame; private boolean mDontAnimateBouncerChanges; private boolean mKeyguardFadingOutInProgress; + private ValueAnimator mKeyguardFadeoutAnimation; public ScrimController(ScrimView scrimBehind, ScrimView scrimInFront, View headsUpScrim) { mScrimBehind = scrimBehind; @@ -135,6 +136,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, if (mPinnedHeadsUpCount != 0) { updateHeadsUpScrim(false); } + if (mKeyguardFadeoutAnimation != null) { + mKeyguardFadeoutAnimation.cancel(); + } } } @@ -345,7 +349,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mOnAnimationFinished.run(); mOnAnimationFinished = null; } - mKeyguardFadingOutInProgress = false; + if (mKeyguardFadingOutInProgress) { + mKeyguardFadeoutAnimation = null; + mKeyguardFadingOutInProgress = false; + } scrim.setTag(TAG_KEY_ANIM, null); scrim.setTag(TAG_KEY_ANIM_TARGET, null); } @@ -353,6 +360,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, anim.start(); if (mAnimateKeyguardFadingOut) { mKeyguardFadingOutInProgress = true; + mKeyguardFadeoutAnimation = anim; } if (mSkipFirstFrame) { anim.setCurrentPlayTime(16); From aa8bbf1aefa03e567d56e2b62fe7e5a48e0f82a9 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 4 May 2016 14:13:20 -0700 Subject: [PATCH 2/2] Fixed a bug where the pin wasn't scaled correctly When switching between different users with different densities, the Pin entry wasn't recreated correctly. Change-Id: I4d34ed4b2962311f28588b13dd56838c84272edf Fixes: 27744173 --- .../com/android/systemui/statusbar/phone/PhoneStatusBar.java | 1 + .../statusbar/phone/StatusBarKeyguardViewManager.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 9b4e8ef564c95..21a0f9d98fdcc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -967,6 +967,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, inflateEmptyShadeView(); updateEmptyShadeView(); inflateOverflowContainer(); + mStatusBarKeyguardViewManager.onDensityOrFontScaleChanged(); } private void inflateSignalClusters() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 117e2b325ef72..bad3bf2601ebf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -348,6 +348,10 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } } + public void onDensityOrFontScaleChanged() { + mBouncer.hide(true /* destroyView */); + } + private void animateScrimControllerKeyguardFadingOut(long delay, long duration, boolean skipFirstFrame) { animateScrimControllerKeyguardFadingOut(delay, duration, null /* endRunnable */,