Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java +9 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,10 @@ package com.android.systemui.statusbar; import static com.android.systemui.Dependency.MAIN_HANDLER; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_UNLOCK_FADING; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK; import static com.android.systemui.statusbar.phone.BiometricUnlockController .MODE_WAKE_AND_UNLOCK_PULSING; import static com.android.systemui.statusbar.phone.StatusBar.DEBUG_MEDIA_FAKE_ARTWORK; import static com.android.systemui.statusbar.phone.StatusBar.ENABLE_LOCKSCREEN_WALLPAPER; import static com.android.systemui.statusbar.phone.StatusBar.SHOW_LOCKSCREEN_MEDIA_ARTWORK; Loading Loading @@ -595,9 +599,11 @@ public class NotificationMediaManager implements Dumpable { boolean cannotAnimateDoze = shadeController != null && shadeController.isDozing() && !ScrimState.AOD.getAnimateChange(); if (mBiometricUnlockController != null && mBiometricUnlockController.getMode() boolean needsBypassFading = mKeyguardMonitor.isBypassFadingAnimation(); if (((mBiometricUnlockController != null && mBiometricUnlockController.getMode() == BiometricUnlockController.MODE_WAKE_AND_UNLOCK_PULSING || hideBecauseOccluded || cannotAnimateDoze) { || cannotAnimateDoze) && !needsBypassFading) || hideBecauseOccluded) { // We are unlocking directly - no animation! mBackdrop.setVisibility(View.GONE); Loading @@ -622,9 +628,7 @@ public class NotificationMediaManager implements Dumpable { }); if (mKeyguardMonitor.isKeyguardFadingAway()) { mBackdrop.animate() // Make it disappear faster, as the focus should be on the activity // behind. .setDuration(mKeyguardMonitor.getKeyguardFadingAwayDuration() / 2) .setDuration(mKeyguardMonitor.getShortenedFadingAwayDuration()) .setStartDelay(mKeyguardMonitor.getKeyguardFadingAwayDelay()) .setInterpolator(Interpolators.LINEAR) .start(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +11 −5 Original line number Diff line number Diff line Loading @@ -1565,9 +1565,15 @@ public class NotificationPanelView extends PanelView implements anim.setStartDelay(mKeyguardMonitor.isKeyguardFadingAway() ? mKeyguardMonitor.getKeyguardFadingAwayDelay() : 0); anim.setDuration(mKeyguardMonitor.isKeyguardFadingAway() ? mKeyguardMonitor.getKeyguardFadingAwayDuration() / 2 : StackStateAnimator.ANIMATION_DURATION_STANDARD); long duration; if (mKeyguardMonitor.isKeyguardFadingAway()) { duration = mKeyguardMonitor.getShortenedFadingAwayDuration(); } else { duration = StackStateAnimator.ANIMATION_DURATION_STANDARD; } anim.setDuration(duration); anim.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN); anim.addListener(new AnimatorListenerAdapter() { @Override Loading Loading @@ -1610,7 +1616,7 @@ public class NotificationPanelView extends PanelView implements mKeyguardBottomArea.animate() .alpha(0f) .setStartDelay(mKeyguardMonitor.getKeyguardFadingAwayDelay()) .setDuration(mKeyguardMonitor.getKeyguardFadingAwayDuration() / 2) .setDuration(mKeyguardMonitor.getShortenedFadingAwayDuration()) .setInterpolator(Interpolators.ALPHA_OUT) .withEndAction(mAnimateKeyguardBottomAreaInvisibleEndRunnable) .start(); Loading Loading @@ -1639,7 +1645,7 @@ public class NotificationPanelView extends PanelView implements if (keyguardFadingAway) { mKeyguardStatusView.animate() .setStartDelay(mKeyguardMonitor.getKeyguardFadingAwayDelay()) .setDuration(mKeyguardMonitor.getKeyguardFadingAwayDuration() / 2) .setDuration(mKeyguardMonitor.getShortenedFadingAwayDuration()) .start(); } } else if (mBarState == StatusBarState.SHADE_LOCKED Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −4 Original line number Diff line number Diff line Loading @@ -3207,12 +3207,13 @@ public class StatusBar extends SystemUI implements DemoMode, /** * Notifies the status bar the Keyguard is fading away with the specified timings. * * @param startTime the start time of the animations in uptime millis * @param delay the precalculated animation delay in milliseconds * @param fadeoutDuration the duration of the exit animation, in milliseconds * @param isBypassFading is this a fading away animation while bypassing */ public void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration) { public void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration, boolean isBypassFading) { mCommandQueue.appTransitionStarting(mDisplayId, startTime + fadeoutDuration - LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true); Loading @@ -3220,7 +3221,7 @@ public class StatusBar extends SystemUI implements DemoMode, mCommandQueue.appTransitionStarting(mDisplayId, startTime - LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true); mKeyguardMonitor.notifyKeyguardFadingAway(delay, fadeoutDuration); mKeyguardMonitor.notifyKeyguardFadingAway(delay, fadeoutDuration, isBypassFading); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +10 −6 Original line number Diff line number Diff line Loading @@ -560,18 +560,22 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb executeAfterKeyguardGoneAction(); boolean wakeUnlockPulsing = mBiometricUnlockController.getMode() == MODE_WAKE_AND_UNLOCK_PULSING; if (wakeUnlockPulsing) { boolean needsFading = needsBypassFading(); if (needsFading) { delay = 0; fadeoutDuration = KeyguardBypassController.BYPASS_PANEL_FADE_DURATION; } else if (wakeUnlockPulsing) { delay = 0; fadeoutDuration = 240; } mStatusBar.setKeyguardFadingAway(startTime, delay, fadeoutDuration); mStatusBar.setKeyguardFadingAway(startTime, delay, fadeoutDuration, needsFading); mBiometricUnlockController.startKeyguardFadingAway(); hideBouncer(true /* destroyView */); if (wakeUnlockPulsing) { if (needsBypassFading()) { if (needsFading) { ViewGroupFadeHelper.fadeOutAllChildrenExcept(mNotificationPanelView, mNotificationContainer, KeyguardBypassController.BYPASS_PANEL_FADE_DURATION, fadeoutDuration, () -> { mStatusBar.hideKeyguard(); onKeyguardFadedAway(); Loading @@ -584,10 +588,10 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb boolean staying = mStatusBarStateController.leaveOpenOnKeyguardHide(); if (!staying) { mStatusBarWindowController.setKeyguardFadingAway(true); if (needsBypassFading()) { if (needsFading) { ViewGroupFadeHelper.fadeOutAllChildrenExcept(mNotificationPanelView, mNotificationContainer, KeyguardBypassController.BYPASS_PANEL_FADE_DURATION, fadeoutDuration, () -> { mStatusBar.hideKeyguard(); }); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitor.java +28 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,19 @@ public interface KeyguardMonitor extends CallbackController<Callback> { long getKeyguardFadingAwayDelay(); long calculateGoingToFullShadeDelay(); /** * @return a shortened fading away duration similar to * {{@link #getKeyguardFadingAwayDuration()}} which may only span half of the duration, unless * we're bypassing */ default long getShortenedFadingAwayDuration() { if (isBypassFadingAnimation()) { return getKeyguardFadingAwayDuration(); } else { return getKeyguardFadingAwayDuration() / 2; } } default boolean isDeviceInteractive() { return false; } Loading @@ -39,7 +52,21 @@ public interface KeyguardMonitor extends CallbackController<Callback> { default void notifyKeyguardGoingAway(boolean b) { } default void notifyKeyguardFadingAway(long delay, long fadeoutDuration) { /** * @return {@code true} if the current fading away animation is the fast bypass fading. */ default boolean isBypassFadingAnimation() { return false; } /** * Notifies that the Keyguard is fading away with the specified timings. * @param delay the precalculated animation delay in milliseconds * @param fadeoutDuration the duration of the exit animation, in milliseconds * @param isBypassFading is this a fading away animation while bypassing */ default void notifyKeyguardFadingAway(long delay, long fadeoutDuration, boolean isBypassFading) { } default void notifyKeyguardDoneFading() { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java +9 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,10 @@ package com.android.systemui.statusbar; import static com.android.systemui.Dependency.MAIN_HANDLER; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_UNLOCK_FADING; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK; import static com.android.systemui.statusbar.phone.BiometricUnlockController .MODE_WAKE_AND_UNLOCK_PULSING; import static com.android.systemui.statusbar.phone.StatusBar.DEBUG_MEDIA_FAKE_ARTWORK; import static com.android.systemui.statusbar.phone.StatusBar.ENABLE_LOCKSCREEN_WALLPAPER; import static com.android.systemui.statusbar.phone.StatusBar.SHOW_LOCKSCREEN_MEDIA_ARTWORK; Loading Loading @@ -595,9 +599,11 @@ public class NotificationMediaManager implements Dumpable { boolean cannotAnimateDoze = shadeController != null && shadeController.isDozing() && !ScrimState.AOD.getAnimateChange(); if (mBiometricUnlockController != null && mBiometricUnlockController.getMode() boolean needsBypassFading = mKeyguardMonitor.isBypassFadingAnimation(); if (((mBiometricUnlockController != null && mBiometricUnlockController.getMode() == BiometricUnlockController.MODE_WAKE_AND_UNLOCK_PULSING || hideBecauseOccluded || cannotAnimateDoze) { || cannotAnimateDoze) && !needsBypassFading) || hideBecauseOccluded) { // We are unlocking directly - no animation! mBackdrop.setVisibility(View.GONE); Loading @@ -622,9 +628,7 @@ public class NotificationMediaManager implements Dumpable { }); if (mKeyguardMonitor.isKeyguardFadingAway()) { mBackdrop.animate() // Make it disappear faster, as the focus should be on the activity // behind. .setDuration(mKeyguardMonitor.getKeyguardFadingAwayDuration() / 2) .setDuration(mKeyguardMonitor.getShortenedFadingAwayDuration()) .setStartDelay(mKeyguardMonitor.getKeyguardFadingAwayDelay()) .setInterpolator(Interpolators.LINEAR) .start(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +11 −5 Original line number Diff line number Diff line Loading @@ -1565,9 +1565,15 @@ public class NotificationPanelView extends PanelView implements anim.setStartDelay(mKeyguardMonitor.isKeyguardFadingAway() ? mKeyguardMonitor.getKeyguardFadingAwayDelay() : 0); anim.setDuration(mKeyguardMonitor.isKeyguardFadingAway() ? mKeyguardMonitor.getKeyguardFadingAwayDuration() / 2 : StackStateAnimator.ANIMATION_DURATION_STANDARD); long duration; if (mKeyguardMonitor.isKeyguardFadingAway()) { duration = mKeyguardMonitor.getShortenedFadingAwayDuration(); } else { duration = StackStateAnimator.ANIMATION_DURATION_STANDARD; } anim.setDuration(duration); anim.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN); anim.addListener(new AnimatorListenerAdapter() { @Override Loading Loading @@ -1610,7 +1616,7 @@ public class NotificationPanelView extends PanelView implements mKeyguardBottomArea.animate() .alpha(0f) .setStartDelay(mKeyguardMonitor.getKeyguardFadingAwayDelay()) .setDuration(mKeyguardMonitor.getKeyguardFadingAwayDuration() / 2) .setDuration(mKeyguardMonitor.getShortenedFadingAwayDuration()) .setInterpolator(Interpolators.ALPHA_OUT) .withEndAction(mAnimateKeyguardBottomAreaInvisibleEndRunnable) .start(); Loading Loading @@ -1639,7 +1645,7 @@ public class NotificationPanelView extends PanelView implements if (keyguardFadingAway) { mKeyguardStatusView.animate() .setStartDelay(mKeyguardMonitor.getKeyguardFadingAwayDelay()) .setDuration(mKeyguardMonitor.getKeyguardFadingAwayDuration() / 2) .setDuration(mKeyguardMonitor.getShortenedFadingAwayDuration()) .start(); } } else if (mBarState == StatusBarState.SHADE_LOCKED Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −4 Original line number Diff line number Diff line Loading @@ -3207,12 +3207,13 @@ public class StatusBar extends SystemUI implements DemoMode, /** * Notifies the status bar the Keyguard is fading away with the specified timings. * * @param startTime the start time of the animations in uptime millis * @param delay the precalculated animation delay in milliseconds * @param fadeoutDuration the duration of the exit animation, in milliseconds * @param isBypassFading is this a fading away animation while bypassing */ public void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration) { public void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration, boolean isBypassFading) { mCommandQueue.appTransitionStarting(mDisplayId, startTime + fadeoutDuration - LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true); Loading @@ -3220,7 +3221,7 @@ public class StatusBar extends SystemUI implements DemoMode, mCommandQueue.appTransitionStarting(mDisplayId, startTime - LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true); mKeyguardMonitor.notifyKeyguardFadingAway(delay, fadeoutDuration); mKeyguardMonitor.notifyKeyguardFadingAway(delay, fadeoutDuration, isBypassFading); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +10 −6 Original line number Diff line number Diff line Loading @@ -560,18 +560,22 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb executeAfterKeyguardGoneAction(); boolean wakeUnlockPulsing = mBiometricUnlockController.getMode() == MODE_WAKE_AND_UNLOCK_PULSING; if (wakeUnlockPulsing) { boolean needsFading = needsBypassFading(); if (needsFading) { delay = 0; fadeoutDuration = KeyguardBypassController.BYPASS_PANEL_FADE_DURATION; } else if (wakeUnlockPulsing) { delay = 0; fadeoutDuration = 240; } mStatusBar.setKeyguardFadingAway(startTime, delay, fadeoutDuration); mStatusBar.setKeyguardFadingAway(startTime, delay, fadeoutDuration, needsFading); mBiometricUnlockController.startKeyguardFadingAway(); hideBouncer(true /* destroyView */); if (wakeUnlockPulsing) { if (needsBypassFading()) { if (needsFading) { ViewGroupFadeHelper.fadeOutAllChildrenExcept(mNotificationPanelView, mNotificationContainer, KeyguardBypassController.BYPASS_PANEL_FADE_DURATION, fadeoutDuration, () -> { mStatusBar.hideKeyguard(); onKeyguardFadedAway(); Loading @@ -584,10 +588,10 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb boolean staying = mStatusBarStateController.leaveOpenOnKeyguardHide(); if (!staying) { mStatusBarWindowController.setKeyguardFadingAway(true); if (needsBypassFading()) { if (needsFading) { ViewGroupFadeHelper.fadeOutAllChildrenExcept(mNotificationPanelView, mNotificationContainer, KeyguardBypassController.BYPASS_PANEL_FADE_DURATION, fadeoutDuration, () -> { mStatusBar.hideKeyguard(); }); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitor.java +28 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,19 @@ public interface KeyguardMonitor extends CallbackController<Callback> { long getKeyguardFadingAwayDelay(); long calculateGoingToFullShadeDelay(); /** * @return a shortened fading away duration similar to * {{@link #getKeyguardFadingAwayDuration()}} which may only span half of the duration, unless * we're bypassing */ default long getShortenedFadingAwayDuration() { if (isBypassFadingAnimation()) { return getKeyguardFadingAwayDuration(); } else { return getKeyguardFadingAwayDuration() / 2; } } default boolean isDeviceInteractive() { return false; } Loading @@ -39,7 +52,21 @@ public interface KeyguardMonitor extends CallbackController<Callback> { default void notifyKeyguardGoingAway(boolean b) { } default void notifyKeyguardFadingAway(long delay, long fadeoutDuration) { /** * @return {@code true} if the current fading away animation is the fast bypass fading. */ default boolean isBypassFadingAnimation() { return false; } /** * Notifies that the Keyguard is fading away with the specified timings. * @param delay the precalculated animation delay in milliseconds * @param fadeoutDuration the duration of the exit animation, in milliseconds * @param isBypassFading is this a fading away animation while bypassing */ default void notifyKeyguardFadingAway(long delay, long fadeoutDuration, boolean isBypassFading) { } default void notifyKeyguardDoneFading() { Loading