Loading core/java/android/view/IWindowManager.aidl +18 −1 Original line number Diff line number Diff line Loading @@ -699,7 +699,7 @@ interface IWindowManager /** * Indicates the display should show system decors. * <p> * System decors include status bar, navigation bar, launcher. * System decors include status bar, navigation bar, launcher, and wallpaper. * </p> * * @param displayId The id of the display. Loading @@ -718,6 +718,23 @@ interface IWindowManager */ void setShouldShowSystemDecors(int displayId, boolean shouldShow); /** * Indicates that the display is eligible for the desktop mode from WindowManager's perspective. * This includes: * - The default display; * - Any display that is allowed to switch the content mode between extended and mirroring * (which means it can dynamically add or remove system decors), and it is now in extended mode * (should currently show system decors). * <p> * System decors include status bar, navigation bar, launcher, and wallpaper. * </p> * * @param displayId The id of the display. * @return {@code true} if the display is eligible for the desktop mode from WindowManager's * perspective. */ boolean isEligibleForDesktopMode(int displayId); /** * Indicates the policy for how the display should show IME. * Loading services/core/java/com/android/server/wm/WindowManagerService.java +20 −0 Original line number Diff line number Diff line Loading @@ -7613,6 +7613,26 @@ public class WindowManagerService extends IWindowManager.Stub } } @Override public boolean isEligibleForDesktopMode(int displayId) { if (!checkCallingPermission(INTERNAL_SYSTEM_WINDOW, "isEligibleForDesktopMode()")) { throw new SecurityException("Requires INTERNAL_SYSTEM_WINDOW permission"); } synchronized (mGlobalLock) { final DisplayContent displayContent = mRoot.getDisplayContent(displayId); if (displayContent == null) { ProtoLog.e(WM_ERROR, "Attempted to check isEligibleForDesktopMode() " + "for a display that does not exist: %d", displayId); return false; } if (!displayContent.isSystemDecorationsSupported()) { return false; } return displayContent.isDefaultDisplay || displayContent.allowContentModeSwitch(); } } @Override public void setShouldShowSystemDecors(int displayId, boolean shouldShow) { if (!checkCallingPermission(INTERNAL_SYSTEM_WINDOW, "setShouldShowSystemDecors()")) { Loading Loading
core/java/android/view/IWindowManager.aidl +18 −1 Original line number Diff line number Diff line Loading @@ -699,7 +699,7 @@ interface IWindowManager /** * Indicates the display should show system decors. * <p> * System decors include status bar, navigation bar, launcher. * System decors include status bar, navigation bar, launcher, and wallpaper. * </p> * * @param displayId The id of the display. Loading @@ -718,6 +718,23 @@ interface IWindowManager */ void setShouldShowSystemDecors(int displayId, boolean shouldShow); /** * Indicates that the display is eligible for the desktop mode from WindowManager's perspective. * This includes: * - The default display; * - Any display that is allowed to switch the content mode between extended and mirroring * (which means it can dynamically add or remove system decors), and it is now in extended mode * (should currently show system decors). * <p> * System decors include status bar, navigation bar, launcher, and wallpaper. * </p> * * @param displayId The id of the display. * @return {@code true} if the display is eligible for the desktop mode from WindowManager's * perspective. */ boolean isEligibleForDesktopMode(int displayId); /** * Indicates the policy for how the display should show IME. * Loading
services/core/java/com/android/server/wm/WindowManagerService.java +20 −0 Original line number Diff line number Diff line Loading @@ -7613,6 +7613,26 @@ public class WindowManagerService extends IWindowManager.Stub } } @Override public boolean isEligibleForDesktopMode(int displayId) { if (!checkCallingPermission(INTERNAL_SYSTEM_WINDOW, "isEligibleForDesktopMode()")) { throw new SecurityException("Requires INTERNAL_SYSTEM_WINDOW permission"); } synchronized (mGlobalLock) { final DisplayContent displayContent = mRoot.getDisplayContent(displayId); if (displayContent == null) { ProtoLog.e(WM_ERROR, "Attempted to check isEligibleForDesktopMode() " + "for a display that does not exist: %d", displayId); return false; } if (!displayContent.isSystemDecorationsSupported()) { return false; } return displayContent.isDefaultDisplay || displayContent.allowContentModeSwitch(); } } @Override public void setShouldShowSystemDecors(int displayId, boolean shouldShow) { if (!checkCallingPermission(INTERNAL_SYSTEM_WINDOW, "setShouldShowSystemDecors()")) { Loading