Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +16 −1 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public class DozeScrimController { private float mInFrontTarget; private float mBehindTarget; private boolean mDozingAborted; private boolean mWakeAndUnlocking; public DozeScrimController(ScrimController scrimController, Context context) { mContext = context; Loading @@ -63,6 +64,7 @@ public class DozeScrimController { public void setDozing(boolean dozing, boolean animate) { if (mDozing == dozing) return; mDozing = dozing; mWakeAndUnlocking = false; if (mDozing) { mDozingAborted = false; abortAnimations(); Loading @@ -85,6 +87,16 @@ public class DozeScrimController { } } public void setWakeAndUnlocking() { // Immediately abort the doze scrims in case of wake-and-unlock // for pulsing so the Keyguard fade-out animation scrim can take over. if (!mWakeAndUnlocking) { mWakeAndUnlocking = true; mScrimController.setDozeBehindAlpha(0f); mScrimController.setDozeInFrontAlpha(0f); } } /** When dozing, fade screen contents in and out using the front scrim. */ public void pulse(@NonNull DozeHost.PulseCallback callback, int reason) { if (callback == null) { Loading @@ -109,7 +121,7 @@ public class DozeScrimController { */ public void abortPulsing() { cancelPulsing(); if (mDozing) { if (mDozing && !mWakeAndUnlocking) { mScrimController.setDozeBehindAlpha(1f); mScrimController.setDozeInFrontAlpha( mDozeParameters.getAlwaysOn() && !mDozingAborted ? 0f : 1f); Loading Loading @@ -244,6 +256,9 @@ public class DozeScrimController { } private void setDozeAlpha(boolean inFront, float alpha) { if (mWakeAndUnlocking) { return; } if (inFront) { mScrimController.setDozeInFrontAlpha(alpha); } else { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java +10 −11 Original line number Diff line number Diff line Loading @@ -98,7 +98,6 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { private StatusBar mStatusBar; private final UnlockMethodCache mUnlockMethodCache; private final Context mContext; private boolean mGoingToSleep; private int mPendingAuthenticatedUserId = -1; public FingerprintUnlockController(Context context, Loading Loading @@ -213,17 +212,19 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { Trace.endSection(); break; case MODE_WAKE_AND_UNLOCK_PULSING: case MODE_WAKE_AND_UNLOCK: if (mMode == MODE_WAKE_AND_UNLOCK_PULSING) { Trace.beginSection("MODE_WAKE_AND_UNLOCK_PULSING"); mStatusBar.updateMediaMetaData(false /* metaDataChanged */, true /* allowEnterAnimation */); // Fall through. Trace.endSection(); case MODE_WAKE_AND_UNLOCK: } else { Trace.beginSection("MODE_WAKE_AND_UNLOCK"); mStatusBarWindowManager.setStatusBarFocusable(false); mDozeScrimController.abortDoze(); } mStatusBarWindowManager.setStatusBarFocusable(false); mKeyguardViewMediator.onWakeAndUnlocking(); mScrimController.setWakeAndUnlocking(); mDozeScrimController.setWakeAndUnlocking(); if (mStatusBar.getNavigationBarView() != null) { mStatusBar.getNavigationBarView().setWakeAndUnlocking(true); } Loading Loading @@ -302,10 +303,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { } private void cleanup() { mMode = MODE_NONE; releaseFingerprintWakeLock(); mStatusBarWindowManager.setForceDozeBrightness(false); mStatusBar.notifyFpAuthModeChanged(); } public void startKeyguardFadingAway() { Loading @@ -321,6 +319,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { public void finishKeyguardFadingAway() { mMode = MODE_NONE; mStatusBarWindowManager.setForceDozeBrightness(false); if (mStatusBar.getNavigationBarView() != null) { mStatusBar.getNavigationBarView().setWakeAndUnlocking(false); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +13 −4 Original line number Diff line number Diff line Loading @@ -2401,17 +2401,26 @@ public class NotificationPanelView extends PanelView implements @Override public void setAlpha(float alpha) { super.setAlpha(alpha); updateFullyVisibleState(); updateFullyVisibleState(false /* forceNotFullyVisible */); } /** * Must be called before starting a ViewPropertyAnimator alpha animation because those * do NOT call setAlpha and therefore don't properly update the fullyVisibleState. */ public void notifyStartFading() { updateFullyVisibleState(true /* forceNotFullyVisible */); } @Override public void setVisibility(int visibility) { super.setVisibility(visibility); updateFullyVisibleState(); updateFullyVisibleState(false /* forceNotFullyVisible */); } private void updateFullyVisibleState() { mNotificationStackScroller.setParentNotFullyVisible(getAlpha() != 1.0f private void updateFullyVisibleState(boolean forceNotFullyVisible) { mNotificationStackScroller.setParentNotFullyVisible(forceNotFullyVisible || getAlpha() != 1.0f || getVisibility() != VISIBLE); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +2 −6 Original line number Diff line number Diff line Loading @@ -4138,6 +4138,7 @@ public class StatusBar extends SystemUI implements DemoMode, * fading. */ public void fadeKeyguardWhilePulsing() { mNotificationPanel.notifyStartFading(); mNotificationPanel.animate() .alpha(0f) .setStartDelay(0) Loading Loading @@ -4356,12 +4357,7 @@ public class StatusBar extends SystemUI implements DemoMode, mKeyguardIndicationController.setDozing(mDozing); mNotificationPanel.setDark(mDozing, animate); updateQsExpansionEnabled(); // Immediately abort the dozing from the doze scrim controller in case of wake-and-unlock // for pulsing so the Keyguard fade-out animation scrim can take over. mDozeScrimController.setDozing(mDozing && mFingerprintUnlockController.getMode() != FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING, animate); mDozeScrimController.setDozing(mDozing, animate); updateRowStates(); Trace.endSection(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } else { mScrimController.animateGoingToFullShade(delay, fadeoutDuration); mStatusBar.finishKeyguardFadingAway(); mFingerprintUnlockController.finishKeyguardFadingAway(); } } mStatusBarWindowManager.setKeyguardShowing(false); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +16 −1 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public class DozeScrimController { private float mInFrontTarget; private float mBehindTarget; private boolean mDozingAborted; private boolean mWakeAndUnlocking; public DozeScrimController(ScrimController scrimController, Context context) { mContext = context; Loading @@ -63,6 +64,7 @@ public class DozeScrimController { public void setDozing(boolean dozing, boolean animate) { if (mDozing == dozing) return; mDozing = dozing; mWakeAndUnlocking = false; if (mDozing) { mDozingAborted = false; abortAnimations(); Loading @@ -85,6 +87,16 @@ public class DozeScrimController { } } public void setWakeAndUnlocking() { // Immediately abort the doze scrims in case of wake-and-unlock // for pulsing so the Keyguard fade-out animation scrim can take over. if (!mWakeAndUnlocking) { mWakeAndUnlocking = true; mScrimController.setDozeBehindAlpha(0f); mScrimController.setDozeInFrontAlpha(0f); } } /** When dozing, fade screen contents in and out using the front scrim. */ public void pulse(@NonNull DozeHost.PulseCallback callback, int reason) { if (callback == null) { Loading @@ -109,7 +121,7 @@ public class DozeScrimController { */ public void abortPulsing() { cancelPulsing(); if (mDozing) { if (mDozing && !mWakeAndUnlocking) { mScrimController.setDozeBehindAlpha(1f); mScrimController.setDozeInFrontAlpha( mDozeParameters.getAlwaysOn() && !mDozingAborted ? 0f : 1f); Loading Loading @@ -244,6 +256,9 @@ public class DozeScrimController { } private void setDozeAlpha(boolean inFront, float alpha) { if (mWakeAndUnlocking) { return; } if (inFront) { mScrimController.setDozeInFrontAlpha(alpha); } else { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java +10 −11 Original line number Diff line number Diff line Loading @@ -98,7 +98,6 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { private StatusBar mStatusBar; private final UnlockMethodCache mUnlockMethodCache; private final Context mContext; private boolean mGoingToSleep; private int mPendingAuthenticatedUserId = -1; public FingerprintUnlockController(Context context, Loading Loading @@ -213,17 +212,19 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { Trace.endSection(); break; case MODE_WAKE_AND_UNLOCK_PULSING: case MODE_WAKE_AND_UNLOCK: if (mMode == MODE_WAKE_AND_UNLOCK_PULSING) { Trace.beginSection("MODE_WAKE_AND_UNLOCK_PULSING"); mStatusBar.updateMediaMetaData(false /* metaDataChanged */, true /* allowEnterAnimation */); // Fall through. Trace.endSection(); case MODE_WAKE_AND_UNLOCK: } else { Trace.beginSection("MODE_WAKE_AND_UNLOCK"); mStatusBarWindowManager.setStatusBarFocusable(false); mDozeScrimController.abortDoze(); } mStatusBarWindowManager.setStatusBarFocusable(false); mKeyguardViewMediator.onWakeAndUnlocking(); mScrimController.setWakeAndUnlocking(); mDozeScrimController.setWakeAndUnlocking(); if (mStatusBar.getNavigationBarView() != null) { mStatusBar.getNavigationBarView().setWakeAndUnlocking(true); } Loading Loading @@ -302,10 +303,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { } private void cleanup() { mMode = MODE_NONE; releaseFingerprintWakeLock(); mStatusBarWindowManager.setForceDozeBrightness(false); mStatusBar.notifyFpAuthModeChanged(); } public void startKeyguardFadingAway() { Loading @@ -321,6 +319,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { public void finishKeyguardFadingAway() { mMode = MODE_NONE; mStatusBarWindowManager.setForceDozeBrightness(false); if (mStatusBar.getNavigationBarView() != null) { mStatusBar.getNavigationBarView().setWakeAndUnlocking(false); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +13 −4 Original line number Diff line number Diff line Loading @@ -2401,17 +2401,26 @@ public class NotificationPanelView extends PanelView implements @Override public void setAlpha(float alpha) { super.setAlpha(alpha); updateFullyVisibleState(); updateFullyVisibleState(false /* forceNotFullyVisible */); } /** * Must be called before starting a ViewPropertyAnimator alpha animation because those * do NOT call setAlpha and therefore don't properly update the fullyVisibleState. */ public void notifyStartFading() { updateFullyVisibleState(true /* forceNotFullyVisible */); } @Override public void setVisibility(int visibility) { super.setVisibility(visibility); updateFullyVisibleState(); updateFullyVisibleState(false /* forceNotFullyVisible */); } private void updateFullyVisibleState() { mNotificationStackScroller.setParentNotFullyVisible(getAlpha() != 1.0f private void updateFullyVisibleState(boolean forceNotFullyVisible) { mNotificationStackScroller.setParentNotFullyVisible(forceNotFullyVisible || getAlpha() != 1.0f || getVisibility() != VISIBLE); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +2 −6 Original line number Diff line number Diff line Loading @@ -4138,6 +4138,7 @@ public class StatusBar extends SystemUI implements DemoMode, * fading. */ public void fadeKeyguardWhilePulsing() { mNotificationPanel.notifyStartFading(); mNotificationPanel.animate() .alpha(0f) .setStartDelay(0) Loading Loading @@ -4356,12 +4357,7 @@ public class StatusBar extends SystemUI implements DemoMode, mKeyguardIndicationController.setDozing(mDozing); mNotificationPanel.setDark(mDozing, animate); updateQsExpansionEnabled(); // Immediately abort the dozing from the doze scrim controller in case of wake-and-unlock // for pulsing so the Keyguard fade-out animation scrim can take over. mDozeScrimController.setDozing(mDozing && mFingerprintUnlockController.getMode() != FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING, animate); mDozeScrimController.setDozing(mDozing, animate); updateRowStates(); Trace.endSection(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } else { mScrimController.animateGoingToFullShade(delay, fadeoutDuration); mStatusBar.finishKeyguardFadingAway(); mFingerprintUnlockController.finishKeyguardFadingAway(); } } mStatusBarWindowManager.setKeyguardShowing(false); Loading