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

Commit 2a5a9434 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Make sure keyguard knows about all occluded state changes"

parents 9a94811d 42840dff
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -33,6 +33,8 @@ import static android.view.WindowManager.TRANSIT_CHANGE;
import static android.view.WindowManager.TRANSIT_CLOSE;
import static android.view.WindowManager.TRANSIT_CLOSE;
import static android.view.WindowManager.TRANSIT_FLAG_IS_RECENTS;
import static android.view.WindowManager.TRANSIT_FLAG_IS_RECENTS;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_LOCKED;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_LOCKED;
import static android.view.WindowManager.TRANSIT_KEYGUARD_OCCLUDE;
import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_TO_BACK;
import static android.view.WindowManager.TRANSIT_TO_BACK;
import static android.view.WindowManager.TRANSIT_TO_FRONT;
import static android.view.WindowManager.TRANSIT_TO_FRONT;
@@ -1302,8 +1304,13 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
    private void handleNonAppWindowsInTransition(@NonNull DisplayContent dc,
    private void handleNonAppWindowsInTransition(@NonNull DisplayContent dc,
            @TransitionType int transit, @TransitionFlags int flags) {
            @TransitionType int transit, @TransitionFlags int flags) {
        if ((flags & TRANSIT_FLAG_KEYGUARD_LOCKED) != 0) {
        if ((flags & TRANSIT_FLAG_KEYGUARD_LOCKED) != 0) {
            mController.mAtm.mWindowManager.mPolicy.applyKeyguardOcclusionChange(
            // If the occlusion changed but the transition isn't an occlude/unocclude transition,
                    false /* notify */);
            // then we have to notify KeyguardService directly. This can happen if there is
            // another ongoing transition when the app changes occlusion OR if the app dies or
            // is killed. Both of these are common during tests.
            final boolean notify = !(transit == TRANSIT_KEYGUARD_OCCLUDE
                    || transit == TRANSIT_KEYGUARD_UNOCCLUDE);
            mController.mAtm.mWindowManager.mPolicy.applyKeyguardOcclusionChange(notify);
        }
        }
    }
    }


+0 −9
Original line number Original line Diff line number Diff line
@@ -24,12 +24,10 @@ import com.android.server.wm.flicker.FlickerTest
import com.android.server.wm.flicker.FlickerTestFactory
import com.android.server.wm.flicker.FlickerTestFactory
import com.android.server.wm.flicker.annotation.FlickerServiceCompatible
import com.android.server.wm.flicker.annotation.FlickerServiceCompatible
import com.android.server.wm.flicker.helpers.NonResizeableAppHelper
import com.android.server.wm.flicker.helpers.NonResizeableAppHelper
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
import com.android.server.wm.traces.common.ComponentNameMatcher
import com.android.server.wm.traces.common.ComponentNameMatcher
import com.android.server.wm.traces.common.service.PlatformConsts
import com.android.server.wm.traces.common.service.PlatformConsts
import org.junit.Assume
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Ignore
import org.junit.Test
import org.junit.Test
@@ -67,13 +65,6 @@ import org.junit.runners.Parameterized
open class OpenAppNonResizeableTest(flicker: FlickerTest) : OpenAppFromLockTransition(flicker) {
open class OpenAppNonResizeableTest(flicker: FlickerTest) : OpenAppFromLockTransition(flicker) {
    override val testApp = NonResizeableAppHelper(instrumentation)
    override val testApp = NonResizeableAppHelper(instrumentation)


    @Before
    open fun before() {
        // b/266384300 - The test causes the keyguard occluded state to be incorrect, disable
        // it while enabling shell transitions
        Assume.assumeFalse(isShellTransitionsEnabled)
    }

    /**
    /**
     * Checks that the [ComponentNameMatcher.NAV_BAR] layer starts invisible, becomes visible during
     * Checks that the [ComponentNameMatcher.NAV_BAR] layer starts invisible, becomes visible during
     * unlocking animation and remains visible at the end
     * unlocking animation and remains visible at the end