diff options
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 23 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java | 9 |
2 files changed, 25 insertions, 7 deletions
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 9fe591e..50cdbb6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1600,6 +1600,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (mBackdrop == null) return; // called too early + if (mLaunchTransitionFadingAway) { + mBackdrop.setVisibility(View.INVISIBLE); + return; + } + if (DEBUG_MEDIA) { Log.v(TAG, "DEBUG_MEDIA: updating album art for notification " + mMediaNotificationKey + " metadata=" + mMediaMetadata @@ -3186,9 +3191,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public void showKeyguard() { if (mLaunchTransitionFadingAway) { mNotificationPanel.animate().cancel(); - mNotificationPanel.setAlpha(1f); - runLaunchTransitionEndRunnable(); - mLaunchTransitionFadingAway = false; + onLaunchTransitionFadingEnded(); } mHandler.removeMessages(MSG_LAUNCH_TRANSITION_TIMEOUT); setBarState(StatusBarState.KEYGUARD); @@ -3209,6 +3212,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } } + private void onLaunchTransitionFadingEnded() { + mNotificationPanel.setAlpha(1.0f); + runLaunchTransitionEndRunnable(); + mLaunchTransitionFadingAway = false; + mScrimController.forceHideScrims(false /* hide */); + updateMediaMetaData(true /* metaDataChanged */); + } + public boolean isCollapsing() { return mNotificationPanel.isCollapsing(); } @@ -3240,6 +3251,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (beforeFading != null) { beforeFading.run(); } + mScrimController.forceHideScrims(true /* hide */); + updateMediaMetaData(false); mNotificationPanel.setAlpha(1); mNotificationPanel.animate() .alpha(0) @@ -3249,9 +3262,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, .withEndAction(new Runnable() { @Override public void run() { - mNotificationPanel.setAlpha(1); - runLaunchTransitionEndRunnable(); - mLaunchTransitionFadingAway = false; + onLaunchTransitionFadingEnded(); } }); mIconController.appTransitionStarting(SystemClock.uptimeMillis(), 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 450fdd9..c3719d4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -83,6 +83,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, private int mPinnedHeadsUpCount; private float mTopHeadsUpDragAmount; private View mDraggedHeadsUpView; + private boolean mForceHideScrims; public ScrimController(ScrimView scrimBehind, ScrimView scrimInFront, View headsUpScrim, boolean scrimSrcEnabled) { @@ -176,7 +177,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, } private void updateScrims() { - if (mAnimateKeyguardFadingOut) { + if (mAnimateKeyguardFadingOut || mForceHideScrims) { setScrimInFrontColor(0f); setScrimBehindColor(0f); } else if (!mKeyguardShowing && !mBouncerShowing) { @@ -440,4 +441,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, expandFactor = Math.max(expandFactor, 0.0f); return alpha * expandFactor; } + + public void forceHideScrims(boolean hide) { + mForceHideScrims = hide; + mAnimateChange = false; + scheduleUpdate(); + } } |