Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +13 −0 Original line number Diff line number Diff line Loading @@ -3928,6 +3928,15 @@ public class NotificationPanelViewController extends PanelViewController { mKeyguardStatusViewController.animateFoldToAod(); } /** * Cancels fold to AOD transition and resets view state */ public void cancelFoldToAodAnimation() { cancelAnimation(); resetAlpha(); resetTranslation(); } /** */ public void setImportantForAccessibility(int mode) { mView.setImportantForAccessibility(mode); Loading Loading @@ -4046,6 +4055,10 @@ public class NotificationPanelViewController extends PanelViewController { mView.setTranslationX(0f); } public void resetAlpha() { mView.setAlpha(1f); } public ViewPropertyAnimator fadeOut(long startDelayMs, long durationMs, Runnable endAction) { return mView.animate().alpha(0).setStartDelay(startDelayMs).setDuration( durationMs).setInterpolator(Interpolators.ALPHA_OUT).withLayer().withEndAction( Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +3 −3 Original line number Diff line number Diff line Loading @@ -2998,7 +2998,7 @@ public class StatusBar extends CoreStartable implements } private void onLaunchTransitionFadingEnded() { mNotificationPanelViewController.setAlpha(1.0f); mNotificationPanelViewController.resetAlpha(); mNotificationPanelViewController.onAffordanceLaunchEnded(); releaseGestureWakeLock(); runLaunchTransitionEndRunnable(); Loading Loading @@ -3029,7 +3029,7 @@ public class StatusBar extends CoreStartable implements } updateScrimController(); mPresenter.updateMediaMetaData(false, true); mNotificationPanelViewController.setAlpha(1); mNotificationPanelViewController.resetAlpha(); mNotificationPanelViewController.fadeOut( FADE_KEYGUARD_START_DELAY, FADE_KEYGUARD_DURATION, this::onLaunchTransitionFadingEnded); Loading Loading @@ -3130,7 +3130,7 @@ public class StatusBar extends CoreStartable implements releaseGestureWakeLock(); mNotificationPanelViewController.onAffordanceLaunchEnded(); mNotificationPanelViewController.cancelAnimation(); mNotificationPanelViewController.setAlpha(1f); mNotificationPanelViewController.resetAlpha(); mNotificationPanelViewController.resetTranslation(); mNotificationPanelViewController.resetViewGroupFade(); updateDozingState(); Loading packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt +20 −5 Original line number Diff line number Diff line Loading @@ -16,8 +16,10 @@ package com.android.systemui.unfold import android.os.Handler import android.os.PowerManager import android.provider.Settings import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.keyguard.KeyguardViewMediator import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.statusbar.LightRevealScrim Loading @@ -37,6 +39,7 @@ import javax.inject.Inject class FoldAodAnimationController @Inject constructor( @Main private val handler: Handler, private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>, private val wakefulnessLifecycle: WakefulnessLifecycle, private val globalSettings: GlobalSettings Loading @@ -50,6 +53,14 @@ constructor( private var shouldPlayAnimation = false private val statusListeners = arrayListOf<FoldAodAnimationStatus>() private val startAnimationRunnable = Runnable { statusBar.notificationPanelViewController.startFoldToAodAnimation { // End action isAnimationPlaying = false keyguardViewMediatorLazy.get().maybeHandlePendingLock() } } private var isAnimationPlaying = false override fun initialize(statusBar: StatusBar, lightRevealScrim: LightRevealScrim) { Loading Loading @@ -79,6 +90,11 @@ constructor( } override fun onStartedWakingUp() { if (isAnimationPlaying) { handler.removeCallbacks(startAnimationRunnable) statusBar.notificationPanelViewController.cancelFoldToAodAnimation(); } shouldPlayAnimation = false isAnimationPlaying = false } Loading Loading @@ -115,11 +131,10 @@ constructor( fun onScreenTurnedOn() { if (shouldPlayAnimation) { statusBar.notificationPanelViewController.startFoldToAodAnimation { // End action isAnimationPlaying = false keyguardViewMediatorLazy.get().maybeHandlePendingLock() } handler.removeCallbacks(startAnimationRunnable) // Post starting the animation to the next frame to avoid junk due to inset changes handler.post(startAnimationRunnable) shouldPlayAnimation = false } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +13 −0 Original line number Diff line number Diff line Loading @@ -3928,6 +3928,15 @@ public class NotificationPanelViewController extends PanelViewController { mKeyguardStatusViewController.animateFoldToAod(); } /** * Cancels fold to AOD transition and resets view state */ public void cancelFoldToAodAnimation() { cancelAnimation(); resetAlpha(); resetTranslation(); } /** */ public void setImportantForAccessibility(int mode) { mView.setImportantForAccessibility(mode); Loading Loading @@ -4046,6 +4055,10 @@ public class NotificationPanelViewController extends PanelViewController { mView.setTranslationX(0f); } public void resetAlpha() { mView.setAlpha(1f); } public ViewPropertyAnimator fadeOut(long startDelayMs, long durationMs, Runnable endAction) { return mView.animate().alpha(0).setStartDelay(startDelayMs).setDuration( durationMs).setInterpolator(Interpolators.ALPHA_OUT).withLayer().withEndAction( Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +3 −3 Original line number Diff line number Diff line Loading @@ -2998,7 +2998,7 @@ public class StatusBar extends CoreStartable implements } private void onLaunchTransitionFadingEnded() { mNotificationPanelViewController.setAlpha(1.0f); mNotificationPanelViewController.resetAlpha(); mNotificationPanelViewController.onAffordanceLaunchEnded(); releaseGestureWakeLock(); runLaunchTransitionEndRunnable(); Loading Loading @@ -3029,7 +3029,7 @@ public class StatusBar extends CoreStartable implements } updateScrimController(); mPresenter.updateMediaMetaData(false, true); mNotificationPanelViewController.setAlpha(1); mNotificationPanelViewController.resetAlpha(); mNotificationPanelViewController.fadeOut( FADE_KEYGUARD_START_DELAY, FADE_KEYGUARD_DURATION, this::onLaunchTransitionFadingEnded); Loading Loading @@ -3130,7 +3130,7 @@ public class StatusBar extends CoreStartable implements releaseGestureWakeLock(); mNotificationPanelViewController.onAffordanceLaunchEnded(); mNotificationPanelViewController.cancelAnimation(); mNotificationPanelViewController.setAlpha(1f); mNotificationPanelViewController.resetAlpha(); mNotificationPanelViewController.resetTranslation(); mNotificationPanelViewController.resetViewGroupFade(); updateDozingState(); Loading
packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt +20 −5 Original line number Diff line number Diff line Loading @@ -16,8 +16,10 @@ package com.android.systemui.unfold import android.os.Handler import android.os.PowerManager import android.provider.Settings import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.keyguard.KeyguardViewMediator import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.statusbar.LightRevealScrim Loading @@ -37,6 +39,7 @@ import javax.inject.Inject class FoldAodAnimationController @Inject constructor( @Main private val handler: Handler, private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>, private val wakefulnessLifecycle: WakefulnessLifecycle, private val globalSettings: GlobalSettings Loading @@ -50,6 +53,14 @@ constructor( private var shouldPlayAnimation = false private val statusListeners = arrayListOf<FoldAodAnimationStatus>() private val startAnimationRunnable = Runnable { statusBar.notificationPanelViewController.startFoldToAodAnimation { // End action isAnimationPlaying = false keyguardViewMediatorLazy.get().maybeHandlePendingLock() } } private var isAnimationPlaying = false override fun initialize(statusBar: StatusBar, lightRevealScrim: LightRevealScrim) { Loading Loading @@ -79,6 +90,11 @@ constructor( } override fun onStartedWakingUp() { if (isAnimationPlaying) { handler.removeCallbacks(startAnimationRunnable) statusBar.notificationPanelViewController.cancelFoldToAodAnimation(); } shouldPlayAnimation = false isAnimationPlaying = false } Loading Loading @@ -115,11 +131,10 @@ constructor( fun onScreenTurnedOn() { if (shouldPlayAnimation) { statusBar.notificationPanelViewController.startFoldToAodAnimation { // End action isAnimationPlaying = false keyguardViewMediatorLazy.get().maybeHandlePendingLock() } handler.removeCallbacks(startAnimationRunnable) // Post starting the animation to the next frame to avoid junk due to inset changes handler.post(startAnimationRunnable) shouldPlayAnimation = false } } Loading