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

Commit 962effbd authored by Yi Jiang's avatar Yi Jiang
Browse files

Clean up flag fix_hide_overlay_api

The flag is marked as exported but not being used elsewhere.

Test: presubmit
Flag: EXEMPT Flag clean up
Bug: 359424300
Change-Id: I305678442042bf53a7fae708150ee3ae5150e0a9
parent abf8d7de
Loading
Loading
Loading
Loading
+12 −23
Original line number Diff line number Diff line
@@ -2151,10 +2151,6 @@ public class WindowManagerService extends IWindowManager.Stub
    }

    private boolean shouldHideNonSystemOverlayWindow(WindowState win) {
        if (!Flags.fixHideOverlayApi()) {
            return !mHidingNonSystemOverlayWindows.isEmpty();
        }

        if (mHidingNonSystemOverlayWindows.isEmpty()) {
            return false;
        }
@@ -9067,7 +9063,6 @@ public class WindowManagerService extends IWindowManager.Stub
        }

        final boolean changed;
        if (Flags.fixHideOverlayApi()) {
        final int uid = win.getOwningUid();
        final int numUIDsPreUpdate = mHidingNonSystemOverlayWindowsCountPerUid.size();
        final int newCount = mHidingNonSystemOverlayWindowsCountPerUid.getOrDefault(uid, 0)
@@ -9082,12 +9077,6 @@ public class WindowManagerService extends IWindowManager.Stub
        // request hiding SAWs changes between "0", "1", or "2+".
        changed = (numUIDsPostUpdate != numUIDsPreUpdate)
                && (numUIDsPostUpdate <= 1 || numUIDsPreUpdate <= 1);
        } else {
            // The visibility of SAWs needs to be refreshed when the number of windows that
            // request hiding SAWs changes between "0" or "1+".
            changed = (effective && mHidingNonSystemOverlayWindows.size() == 1)
                    || (!effective && mHidingNonSystemOverlayWindows.isEmpty());
        }

        if (changed) {
            mRoot.forAllWindows((w) -> {
+0 −3
Original line number Diff line number Diff line
@@ -1394,7 +1394,6 @@ public class WindowManagerServiceTests extends WindowTestsBase {
    }

    @Test
    @EnableFlags(Flags.FLAG_FIX_HIDE_OVERLAY_API)
    public void testUpdateOverlayWindows_singleWindowRequestsHiding_doNotHideOverlayWithSameUid() {
        WindowState overlayWindow = newWindowBuilder("overlay_window",
                TYPE_APPLICATION_OVERLAY).build();
@@ -1414,7 +1413,6 @@ public class WindowManagerServiceTests extends WindowTestsBase {
    }

    @Test
    @EnableFlags(Flags.FLAG_FIX_HIDE_OVERLAY_API)
    public void testUpdateOverlayWindows_multipleWindowsRequestHiding_hideOverlaysWithAnyUids() {
        WindowState overlayWindow = newWindowBuilder("overlay_window",
                TYPE_APPLICATION_OVERLAY).build();
@@ -1440,7 +1438,6 @@ public class WindowManagerServiceTests extends WindowTestsBase {
    }

    @Test
    @EnableFlags(Flags.FLAG_FIX_HIDE_OVERLAY_API)
    public void testUpdateOverlayWindows_multipleWindowsFromSameUid_idempotent() {
        // Deny INTERNAL_SYSTEM_WINDOW permission for WindowSession so that the saw isn't allowed to
        // show despite hideNonSystemOverlayWindows.