Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4035c36c authored by Yunfan Chen's avatar Yunfan Chen
Browse files

Introduce keyguard transition bug fix feature flag

To fit the plan change, introduce a new bug fix flag for the keyguard
transition change.

Bug: 364930619
Test: KeyguardViewMediatorTest
Flag: com.android.window.flags.ensure_keyguard_does_transition_starting_bug_fix
Change-Id: Ib4199d39adb19cc0fe6061253edadf6d485f1aa0
parent 5675016b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -230,11 +230,14 @@ flag {
}

flag {
  name: "ensure_keyguard_does_transition_starting"
  name: "ensure_keyguard_does_transition_starting_bug_fix"
  namespace: "windowing_frontend"
  description: "Ensure that keyguard is the one starting transitions, instead of delegating to Core"
  bug: "364930619"
  is_fixed_read_only: true
  metadata {
      purpose: PURPOSE_BUGFIX
  }
}

flag {
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ public class KeyguardTransitionHandler
        implements Transitions.TransitionHandler, KeyguardChangeListener,
        TaskStackListenerCallback {
    private static final boolean ENABLE_NEW_KEYGUARD_SHELL_TRANSITIONS =
            Flags.ensureKeyguardDoesTransitionStarting();
            Flags.ensureKeyguardDoesTransitionStartingBugFix();

    private static final String TAG = "KeyguardTransition";

+13 −13
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun testLockscreenVisible_andAodVisible_without_keyguard_shell_transitions() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
@@ -113,7 +113,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun testLockscreenVisible_andAodVisible_with_keyguard_shell_transitions() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
@@ -126,7 +126,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun testGoingAway_whenLockscreenVisible_thenSurfaceMadeVisible_without_keyguard_shell_transitions() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
@@ -145,7 +145,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun testGoingAway_whenLockscreenVisible_thenSurfaceMadeVisible_with_keyguard_shell_transitions() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
@@ -164,7 +164,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun testSurfaceVisible_whenLockscreenNotShowing_doesNotTriggerGoingAway_without_keyguard_shell_transitions() {
        underTest.setLockscreenShown(false)
        underTest.setAodVisible(false)
@@ -180,7 +180,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun testSurfaceVisible_whenLockscreenNotShowing_doesNotTriggerGoingAway_with_keyguard_shell_transitions() {
        underTest.setLockscreenShown(false)
        underTest.setAodVisible(false)
@@ -196,7 +196,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun testAodVisible_noLockscreenShownCallYet_doesNotShowLockscreenUntilLater_without_keyguard_shell_transitions() {
        underTest.setAodVisible(false)
        uiBgExecutor.runAllReady()
@@ -209,7 +209,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun testAodVisible_noLockscreenShownCallYet_doesNotShowLockscreenUntilLater_with_keyguard_shell_transitions() {
        underTest.setAodVisible(false)
        uiBgExecutor.runAllReady()
@@ -222,7 +222,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun setSurfaceBehindVisibility_goesAwayFirst_andIgnoresSecondCall_without_keyguard_shell_transitions() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
@@ -236,7 +236,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun setSurfaceBehindVisibility_goesAwayFirst_andIgnoresSecondCall_with_keyguard_shell_transitions() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
@@ -251,7 +251,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun setSurfaceBehindVisibility_falseSetsLockscreenVisibility_without_keyguard_shell_transitions() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
@@ -267,7 +267,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsEnabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun setSurfaceBehindVisibility_falseSetsLockscreenVisibility_with_keyguard_shell_transitions() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
@@ -309,7 +309,7 @@ class WindowManagerLockscreenVisibilityManagerTest : SysuiTestCase() {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING)
    @RequiresFlagsDisabled(Flags.FLAG_ENSURE_KEYGUARD_DOES_TRANSITION_STARTING_BUG_FIX)
    fun lockscreenEventuallyShown_ifReshown_afterGoingAwayExecutionDelayed() {
        underTest.setLockscreenShown(true)
        uiBgExecutor.runAllReady()
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ public class KeyguardViewMediator implements CoreStartable,
        StatusBarStateController.StateListener {

    private static final boolean ENABLE_NEW_KEYGUARD_SHELL_TRANSITIONS =
            Flags.ensureKeyguardDoesTransitionStarting();
            Flags.ensureKeyguardDoesTransitionStartingBugFix();
    public static final int KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT = 30000;
    private static final long KEYGUARD_DONE_PENDING_TIMEOUT_MS = 3000;

+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ constructor(
    private var goingAwayRemoteAnimationFinishedCallback: IRemoteAnimationFinishedCallback? = null

    private val enableNewKeyguardShellTransitions: Boolean =
        Flags.ensureKeyguardDoesTransitionStarting()
        Flags.ensureKeyguardDoesTransitionStartingBugFix()

    /**
     * Set the visibility of the surface behind the keyguard, making the appropriate calls to Window
Loading