Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +38 −16 Original line number Diff line number Diff line Loading @@ -457,6 +457,13 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { */ private boolean mShouldDelayWakeUpAnimation = false; /** * Whether we should delay the AOD->Lockscreen animation. * If false, the animation will start in onStartedWakingUp(). * If true, the animation will start in onFinishedWakingUp(). */ private boolean mShouldDelayLockscreenTransitionFromAod = false; private final Object mQueueLock = new Object(); private final PulseExpansionHandler mPulseExpansionHandler; Loading Loading @@ -3039,13 +3046,21 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { updateVisibleToUser(); updateIsKeyguard(); mShouldDelayLockscreenTransitionFromAod = mDozeParameters.getAlwaysOn() && mFeatureFlags.isEnabled( Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD); if (!mShouldDelayLockscreenTransitionFromAod) { startLockscreenTransitionFromAod(); } }); DejankUtils.stopDetectingBlockingIpcs(tag); } @Override public void onFinishedWakingUp() { mNotificationShadeWindowController.batchApplyWindowLayoutParams(()-> { /** * Private helper for starting the LOCKSCREEN_TRANSITION_FROM_AOD animation - only necessary * so we can start it from either onFinishedWakingUp() or onFinishedWakingUp(). */ private void startLockscreenTransitionFromAod() { // stopDozing() starts the LOCKSCREEN_TRANSITION_FROM_AOD animation. mDozeServiceHost.stopDozing(); // This is intentionally below the stopDozing call above, since it avoids that we're Loading @@ -3060,7 +3075,14 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { if (mScreenOffAnimationController.shouldHideLightRevealScrimOnWakeUp()) { mShadeController.makeExpandedInvisible(); } }); } @Override public void onFinishedWakingUp() { if (mShouldDelayLockscreenTransitionFromAod) { mNotificationShadeWindowController.batchApplyWindowLayoutParams( this::startLockscreenTransitionFromAod); } mWakeUpCoordinator.setFullyAwake(true); mWakeUpCoordinator.setWakingUp(false, false); if (mKeyguardStateController.isOccluded() Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,9 @@ public class CentralSurfacesImplTest extends SysuiTestCase { // For the Shade to animate during the Back gesture, we must enable the animation flag. mFeatureFlags.set(Flags.WM_SHADE_ANIMATE_BACK_GESTURE, true); mFeatureFlags.set(Flags.LIGHT_REVEAL_MIGRATION, true); // Turn AOD on and toggle feature flag for jank fixes mFeatureFlags.set(Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD, true); when(mDozeParameters.getAlwaysOn()).thenReturn(true); IThermalService thermalService = mock(IThermalService.class); mPowerManager = new PowerManager(mContext, mPowerManagerService, thermalService, Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +38 −16 Original line number Diff line number Diff line Loading @@ -457,6 +457,13 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { */ private boolean mShouldDelayWakeUpAnimation = false; /** * Whether we should delay the AOD->Lockscreen animation. * If false, the animation will start in onStartedWakingUp(). * If true, the animation will start in onFinishedWakingUp(). */ private boolean mShouldDelayLockscreenTransitionFromAod = false; private final Object mQueueLock = new Object(); private final PulseExpansionHandler mPulseExpansionHandler; Loading Loading @@ -3039,13 +3046,21 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { updateVisibleToUser(); updateIsKeyguard(); mShouldDelayLockscreenTransitionFromAod = mDozeParameters.getAlwaysOn() && mFeatureFlags.isEnabled( Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD); if (!mShouldDelayLockscreenTransitionFromAod) { startLockscreenTransitionFromAod(); } }); DejankUtils.stopDetectingBlockingIpcs(tag); } @Override public void onFinishedWakingUp() { mNotificationShadeWindowController.batchApplyWindowLayoutParams(()-> { /** * Private helper for starting the LOCKSCREEN_TRANSITION_FROM_AOD animation - only necessary * so we can start it from either onFinishedWakingUp() or onFinishedWakingUp(). */ private void startLockscreenTransitionFromAod() { // stopDozing() starts the LOCKSCREEN_TRANSITION_FROM_AOD animation. mDozeServiceHost.stopDozing(); // This is intentionally below the stopDozing call above, since it avoids that we're Loading @@ -3060,7 +3075,14 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { if (mScreenOffAnimationController.shouldHideLightRevealScrimOnWakeUp()) { mShadeController.makeExpandedInvisible(); } }); } @Override public void onFinishedWakingUp() { if (mShouldDelayLockscreenTransitionFromAod) { mNotificationShadeWindowController.batchApplyWindowLayoutParams( this::startLockscreenTransitionFromAod); } mWakeUpCoordinator.setFullyAwake(true); mWakeUpCoordinator.setWakingUp(false, false); if (mKeyguardStateController.isOccluded() Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,9 @@ public class CentralSurfacesImplTest extends SysuiTestCase { // For the Shade to animate during the Back gesture, we must enable the animation flag. mFeatureFlags.set(Flags.WM_SHADE_ANIMATE_BACK_GESTURE, true); mFeatureFlags.set(Flags.LIGHT_REVEAL_MIGRATION, true); // Turn AOD on and toggle feature flag for jank fixes mFeatureFlags.set(Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD, true); when(mDozeParameters.getAlwaysOn()).thenReturn(true); IThermalService thermalService = mock(IThermalService.class); mPowerManager = new PowerManager(mContext, mPowerManagerService, thermalService, Loading