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

Commit d35a5aca authored by Felix Stern's avatar Felix Stern
Browse files

Use isDisplayed instead of isOnScreen

In DisplayPolicy#shouldBeHiddenByKeyguard: WindowState#isOnScreen uses more checks that are not needed when verifying if the IME should be hidden. Use WindowState#isDisplayed instead.

Test: com.android.server.wm.flicker.ime.ShowImeOnUnlockScreenTest#visibleLayersShownMoreThanOneConsecutiveEntry
Fix: 374413957
Flag: EXEMPT refactor
Change-Id: I851aa29f11aacb36b6d47bc74e599e14a756a331
parent 3f72bb5d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1736,7 +1736,7 @@ public class DisplayPolicy {

        // Show IME over the keyguard if the target allows it.
        final boolean showImeOverKeyguard =
                imeTarget != null && imeTarget.isOnScreen() && win.mIsImWindow && (
                imeTarget != null && win.mIsImWindow && imeTarget.isDisplayed() && (
                        imeTarget.canShowWhenLocked() || !imeTarget.canBeHiddenByKeyguard());
        if (showImeOverKeyguard) {
            return false;