Loading services/core/java/com/android/server/wm/KeyguardController.java +13 −6 Original line number Diff line number Diff line Loading @@ -310,12 +310,19 @@ class KeyguardController { try { state.writeEventLog("keyguardGoingAway"); final int transitFlags = convertTransitFlags(flags); if (ENABLE_NEW_KEYGUARD_SHELL_TRANSITIONS) { final Transition transition = chain.getTransition(); if (transition != null && displayId == DEFAULT_DISPLAY) { transition.addFlag(TRANSIT_FLAG_KEYGUARD_GOING_AWAY); } } else { final DisplayContent dc = mRootWindowContainer.getDefaultDisplay(); // We are deprecating TRANSIT_KEYGUARD_GOING_AWAY for Shell transition and use // TRANSIT_FLAG_KEYGUARD_GOING_AWAY to indicate that it should animate keyguard going // away. // TRANSIT_FLAG_KEYGUARD_GOING_AWAY to indicate that it should animate keyguard // going away. dc.mAtmService.getTransitionController().requestTransitionIfNeeded( TRANSIT_TO_BACK, transitFlags, null /* trigger */, dc, chain); } updateKeyguardSleepToken(); // Some stack visibility might change (e.g. docked stack) Loading services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +20 −7 Original line number Diff line number Diff line Loading @@ -2543,10 +2543,15 @@ public class DisplayContentTests extends WindowTestsBase { assertTrue(keyguardShowing.getAsBoolean()); assertFalse(keyguardGoingAway.getAsBoolean()); assertFalse(appVisible.getAsBoolean()); if (Flags.ensureKeyguardDoesTransitionStarting()) { assertThat(transitions.mLastTransit).isNull(); } else { if (Flags.aodTransition()) { assertThat(transitions.mLastTransit).flags().contains(TRANSIT_FLAG_AOD_APPEARING); } else { assertThat(transitions.mLastTransit).flags().doesNotContain(TRANSIT_FLAG_AOD_APPEARING); assertThat(transitions.mLastTransit).flags().doesNotContain( TRANSIT_FLAG_AOD_APPEARING); } } transitions.flush(); Loading @@ -2556,7 +2561,10 @@ public class DisplayContentTests extends WindowTestsBase { assertTrue(appVisible.getAsBoolean()); if (Flags.ensureKeyguardDoesTransitionStarting()) { assertThat(transitions.mLastTransit).isNull(); // Transition will be created due to sleep token updates. But no keyguard transition // should be there when the transition is not initiated from the system UI. assertThat(transitions.mLastTransit).flags() .doesNotContain(TRANSIT_FLAG_KEYGUARD_GOING_AWAY); } else { assertThat(transitions.mLastTransit).flags() .containsExactly(TRANSIT_FLAG_KEYGUARD_GOING_AWAY); Loading Loading @@ -2598,10 +2606,15 @@ public class DisplayContentTests extends WindowTestsBase { keyguard.setKeyguardShown(displayId, true /* keyguard */, true /* aod */); assertFalse(keyguardGoingAway.getAsBoolean()); assertFalse(appVisible.getAsBoolean()); if (!Flags.ensureKeyguardDoesTransitionStarting()) { if (Flags.aodTransition()) { assertThat(transitions.mLastTransit).flags().contains(TRANSIT_FLAG_AOD_APPEARING); } else { assertThat(transitions.mLastTransit).flags().doesNotContain(TRANSIT_FLAG_AOD_APPEARING); assertThat(transitions.mLastTransit).flags().doesNotContain( TRANSIT_FLAG_AOD_APPEARING); } } else { assertThat(transitions.mLastTransit).isNull(); } transitions.flush(); Loading Loading
services/core/java/com/android/server/wm/KeyguardController.java +13 −6 Original line number Diff line number Diff line Loading @@ -310,12 +310,19 @@ class KeyguardController { try { state.writeEventLog("keyguardGoingAway"); final int transitFlags = convertTransitFlags(flags); if (ENABLE_NEW_KEYGUARD_SHELL_TRANSITIONS) { final Transition transition = chain.getTransition(); if (transition != null && displayId == DEFAULT_DISPLAY) { transition.addFlag(TRANSIT_FLAG_KEYGUARD_GOING_AWAY); } } else { final DisplayContent dc = mRootWindowContainer.getDefaultDisplay(); // We are deprecating TRANSIT_KEYGUARD_GOING_AWAY for Shell transition and use // TRANSIT_FLAG_KEYGUARD_GOING_AWAY to indicate that it should animate keyguard going // away. // TRANSIT_FLAG_KEYGUARD_GOING_AWAY to indicate that it should animate keyguard // going away. dc.mAtmService.getTransitionController().requestTransitionIfNeeded( TRANSIT_TO_BACK, transitFlags, null /* trigger */, dc, chain); } updateKeyguardSleepToken(); // Some stack visibility might change (e.g. docked stack) Loading
services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +20 −7 Original line number Diff line number Diff line Loading @@ -2543,10 +2543,15 @@ public class DisplayContentTests extends WindowTestsBase { assertTrue(keyguardShowing.getAsBoolean()); assertFalse(keyguardGoingAway.getAsBoolean()); assertFalse(appVisible.getAsBoolean()); if (Flags.ensureKeyguardDoesTransitionStarting()) { assertThat(transitions.mLastTransit).isNull(); } else { if (Flags.aodTransition()) { assertThat(transitions.mLastTransit).flags().contains(TRANSIT_FLAG_AOD_APPEARING); } else { assertThat(transitions.mLastTransit).flags().doesNotContain(TRANSIT_FLAG_AOD_APPEARING); assertThat(transitions.mLastTransit).flags().doesNotContain( TRANSIT_FLAG_AOD_APPEARING); } } transitions.flush(); Loading @@ -2556,7 +2561,10 @@ public class DisplayContentTests extends WindowTestsBase { assertTrue(appVisible.getAsBoolean()); if (Flags.ensureKeyguardDoesTransitionStarting()) { assertThat(transitions.mLastTransit).isNull(); // Transition will be created due to sleep token updates. But no keyguard transition // should be there when the transition is not initiated from the system UI. assertThat(transitions.mLastTransit).flags() .doesNotContain(TRANSIT_FLAG_KEYGUARD_GOING_AWAY); } else { assertThat(transitions.mLastTransit).flags() .containsExactly(TRANSIT_FLAG_KEYGUARD_GOING_AWAY); Loading Loading @@ -2598,10 +2606,15 @@ public class DisplayContentTests extends WindowTestsBase { keyguard.setKeyguardShown(displayId, true /* keyguard */, true /* aod */); assertFalse(keyguardGoingAway.getAsBoolean()); assertFalse(appVisible.getAsBoolean()); if (!Flags.ensureKeyguardDoesTransitionStarting()) { if (Flags.aodTransition()) { assertThat(transitions.mLastTransit).flags().contains(TRANSIT_FLAG_AOD_APPEARING); } else { assertThat(transitions.mLastTransit).flags().doesNotContain(TRANSIT_FLAG_AOD_APPEARING); assertThat(transitions.mLastTransit).flags().doesNotContain( TRANSIT_FLAG_AOD_APPEARING); } } else { assertThat(transitions.mLastTransit).isNull(); } transitions.flush(); Loading