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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user