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

Commit ede4e8bf authored by Lingyu Feng's avatar Lingyu Feng
Browse files

Remove IWindowManager#setShouldShowSystemDecors

With the introduction of content mode,
DisplayWindowSettings.setShouldShowSystemDecorations should only be set
within WM when Display.canHostTasks() is initialized or changes. This CL
removes IWindowManager#setShouldShowSystemDecors() to prevent its
exposure outside of WM.

Bug: 400864452
Test: ActivityTaskManagerServiceTests
Test: MultiDisplaySecurityTests
Flag: EXEMPT removing an unused API
Change-Id: If89c8931a94471b5cb877fea49f55a78f338893c
parent a21b506c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3943,7 +3943,6 @@ package android.view {
    method @RequiresPermission(android.Manifest.permission.ACCESS_SURFACE_FLINGER) public default boolean replaceContentOnDisplayWithMirror(int, @NonNull android.view.Window);
    method @RequiresPermission(android.Manifest.permission.ACCESS_SURFACE_FLINGER) public default boolean replaceContentOnDisplayWithSc(int, @NonNull android.view.SurfaceControl);
    method public default void setDisplayImePolicy(int, int);
    method public default void setShouldShowSystemDecors(int, boolean);
    method public default void setShouldShowWithInsecureKeyguard(int, boolean);
    method public default boolean shouldShowSystemDecors(int);
    method @Nullable public default android.graphics.Bitmap snapshotTaskForRecents(@IntRange(from=0) int);
+0 −11
Original line number Diff line number Diff line
@@ -738,17 +738,6 @@ interface IWindowManager
     */
    boolean shouldShowSystemDecors(int displayId);

    /**
     * Sets that the display should show system decors.
     * <p>
     * System decors include status bar, navigation bar, launcher.
     * </p>
     *
     * @param displayId The id of the display.
     * @param shouldShow Indicates that the display should show system decors.
     */
    void setShouldShowSystemDecors(int displayId, boolean shouldShow);

    /**
     * Indicates that the display is eligible for the desktop mode from WindowManager's perspective.
     * This includes:
+0 −16
Original line number Diff line number Diff line
@@ -1844,21 +1844,6 @@ public interface WindowManager extends ViewManager {
    default void setShouldShowWithInsecureKeyguard(int displayId, boolean shouldShow) {
    }

    /**
     * Sets that the display should show system decors.
     * <p>
     * System decors include status bar, navigation bar, launcher.
     * </p>
     *
     * @param displayId The id of the display.
     * @param shouldShow Indicates that the display should show system decors.
     * @see #shouldShowSystemDecors(int)
     * @hide
     */
    @TestApi
    default void setShouldShowSystemDecors(int displayId, boolean shouldShow) {
    }

    /**
     * Checks if the display supports showing system decors.
     * <p>
@@ -1866,7 +1851,6 @@ public interface WindowManager extends ViewManager {
     * </p>
     *
     * @param displayId The id of the display.
     * @see #setShouldShowSystemDecors(int, boolean)
     * @hide
     */
    @TestApi
+0 −9
Original line number Diff line number Diff line
@@ -321,15 +321,6 @@ public final class WindowManagerImpl implements WindowManager {
        }
    }

    @Override
    public void setShouldShowSystemDecors(int displayId, boolean shouldShow) {
        try {
            WindowManagerGlobal.getWindowManagerService()
                    .setShouldShowSystemDecors(displayId, shouldShow);
        } catch (RemoteException e) {
        }
    }

    @Override
    public boolean shouldShowSystemDecors(int displayId) {
        try {
+0 −5
Original line number Diff line number Diff line
@@ -129,11 +129,6 @@ public class WindowManagerWrapper implements WindowManager {
        mBase.setShouldShowWithInsecureKeyguard(displayId, shouldShow);
    }

    @Override
    public void setShouldShowSystemDecors(int displayId, boolean shouldShow) {
        mBase.setShouldShowSystemDecors(displayId, shouldShow);
    }

    @Override
    public boolean shouldShowSystemDecors(int displayId) {
        return mBase.shouldShowSystemDecors(displayId);
Loading