Merge "DO NOT MERGE [QPR1] Fix QS having a white when opened over bubbles" into sc-qpr1-dev
This commit is contained in:
@@ -278,15 +278,41 @@ public enum ScrimState {
|
|||||||
BUBBLE_EXPANDED {
|
BUBBLE_EXPANDED {
|
||||||
@Override
|
@Override
|
||||||
public void prepare(ScrimState previousState) {
|
public void prepare(ScrimState previousState) {
|
||||||
mFrontTint = Color.TRANSPARENT;
|
mBehindAlpha = mClipQsScrim ? 1 : 0;
|
||||||
mBehindTint = Color.TRANSPARENT;
|
mNotifAlpha = 0;
|
||||||
mBubbleTint = Color.BLACK;
|
mFrontAlpha = 0;
|
||||||
|
|
||||||
mFrontAlpha = 0f;
|
mAnimationDuration = mKeyguardFadingAway
|
||||||
mBehindAlpha = mDefaultScrimAlpha;
|
? mKeyguardFadingAwayDuration
|
||||||
|
: StatusBar.FADE_KEYGUARD_DURATION;
|
||||||
|
|
||||||
|
mAnimateChange = !mLaunchingAffordanceWithPreview;
|
||||||
|
|
||||||
|
mFrontTint = Color.TRANSPARENT;
|
||||||
|
mBehindTint = Color.BLACK;
|
||||||
|
mBubbleTint = Color.BLACK;
|
||||||
|
mBlankScreen = false;
|
||||||
|
|
||||||
|
if (previousState == ScrimState.AOD) {
|
||||||
|
// Set all scrims black, before they fade transparent.
|
||||||
|
updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */);
|
||||||
|
updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */);
|
||||||
|
if (mScrimForBubble != null) {
|
||||||
|
updateScrimColor(mScrimForBubble, 1f /* alpha */, Color.BLACK /* tint */);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scrims should still be black at the end of the transition.
|
||||||
|
mFrontTint = Color.BLACK;
|
||||||
|
mBehindTint = Color.BLACK;
|
||||||
|
mBubbleTint = Color.BLACK;
|
||||||
|
mBlankScreen = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mClipQsScrim) {
|
||||||
|
updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
||||||
|
}
|
||||||
|
|
||||||
mAnimationDuration = ScrimController.ANIMATION_DURATION;
|
mAnimationDuration = ScrimController.ANIMATION_DURATION;
|
||||||
mBlankScreen = false;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ public class ScrimControllerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
assertScrimTinted(Map.of(
|
assertScrimTinted(Map.of(
|
||||||
mScrimInFront, false,
|
mScrimInFront, false,
|
||||||
mScrimBehind, false,
|
mScrimBehind, true,
|
||||||
mScrimForBubble, true
|
mScrimForBubble, true
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user