Loading services/java/com/android/server/wm/WindowManagerService.java +64 −38 Original line number Diff line number Diff line Loading @@ -7637,6 +7637,8 @@ public class WindowManagerService extends IWindowManager.Stub if (displayId != Display.DEFAULT_DISPLAY) { throw new IllegalArgumentException("Can only set the default display"); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { // Set some sort of reasonable bounds on the size of the display that we // will try to emulate. Loading @@ -7654,6 +7656,9 @@ public class WindowManagerService extends IWindowManager.Stub Settings.Global.DISPLAY_SIZE_FORCED, width + "," + height); } } } finally { Binder.restoreCallingIdentity(ident); } } private void readForcedDisplaySizeAndDensityLocked(final DisplayContent displayContent) { Loading Loading @@ -7723,6 +7728,8 @@ public class WindowManagerService extends IWindowManager.Stub if (displayId != Display.DEFAULT_DISPLAY) { throw new IllegalArgumentException("Can only set the default display"); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { final DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { Loading @@ -7732,6 +7739,9 @@ public class WindowManagerService extends IWindowManager.Stub Settings.Global.DISPLAY_SIZE_FORCED, ""); } } } finally { Binder.restoreCallingIdentity(ident); } } @Override Loading Loading @@ -7771,6 +7781,8 @@ public class WindowManagerService extends IWindowManager.Stub if (displayId != Display.DEFAULT_DISPLAY) { throw new IllegalArgumentException("Can only set the default display"); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { final DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { Loading @@ -7779,6 +7791,9 @@ public class WindowManagerService extends IWindowManager.Stub Settings.Global.DISPLAY_DENSITY_FORCED, Integer.toString(density)); } } } finally { Binder.restoreCallingIdentity(ident); } } // displayContent must not be null Loading @@ -7802,14 +7817,20 @@ public class WindowManagerService extends IWindowManager.Stub if (displayId != Display.DEFAULT_DISPLAY) { throw new IllegalArgumentException("Can only set the default display"); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { final DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { setForcedDisplayDensityLocked(displayContent, displayContent.mInitialDisplayDensity); setForcedDisplayDensityLocked(displayContent, displayContent.mInitialDisplayDensity); Settings.Global.putString(mContext.getContentResolver(), Settings.Global.DISPLAY_DENSITY_FORCED, ""); } } } finally { Binder.restoreCallingIdentity(ident); } } // displayContent must not be null Loading Loading @@ -7856,12 +7877,17 @@ public class WindowManagerService extends IWindowManager.Stub throw new SecurityException("Must hold permission " + android.Manifest.permission.WRITE_SECURE_SETTINGS); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { setOverscanLocked(displayContent, left, top, right, bottom); } } } finally { Binder.restoreCallingIdentity(ident); } } private void setOverscanLocked(DisplayContent displayContent, Loading Loading
services/java/com/android/server/wm/WindowManagerService.java +64 −38 Original line number Diff line number Diff line Loading @@ -7637,6 +7637,8 @@ public class WindowManagerService extends IWindowManager.Stub if (displayId != Display.DEFAULT_DISPLAY) { throw new IllegalArgumentException("Can only set the default display"); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { // Set some sort of reasonable bounds on the size of the display that we // will try to emulate. Loading @@ -7654,6 +7656,9 @@ public class WindowManagerService extends IWindowManager.Stub Settings.Global.DISPLAY_SIZE_FORCED, width + "," + height); } } } finally { Binder.restoreCallingIdentity(ident); } } private void readForcedDisplaySizeAndDensityLocked(final DisplayContent displayContent) { Loading Loading @@ -7723,6 +7728,8 @@ public class WindowManagerService extends IWindowManager.Stub if (displayId != Display.DEFAULT_DISPLAY) { throw new IllegalArgumentException("Can only set the default display"); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { final DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { Loading @@ -7732,6 +7739,9 @@ public class WindowManagerService extends IWindowManager.Stub Settings.Global.DISPLAY_SIZE_FORCED, ""); } } } finally { Binder.restoreCallingIdentity(ident); } } @Override Loading Loading @@ -7771,6 +7781,8 @@ public class WindowManagerService extends IWindowManager.Stub if (displayId != Display.DEFAULT_DISPLAY) { throw new IllegalArgumentException("Can only set the default display"); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { final DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { Loading @@ -7779,6 +7791,9 @@ public class WindowManagerService extends IWindowManager.Stub Settings.Global.DISPLAY_DENSITY_FORCED, Integer.toString(density)); } } } finally { Binder.restoreCallingIdentity(ident); } } // displayContent must not be null Loading @@ -7802,14 +7817,20 @@ public class WindowManagerService extends IWindowManager.Stub if (displayId != Display.DEFAULT_DISPLAY) { throw new IllegalArgumentException("Can only set the default display"); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { final DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { setForcedDisplayDensityLocked(displayContent, displayContent.mInitialDisplayDensity); setForcedDisplayDensityLocked(displayContent, displayContent.mInitialDisplayDensity); Settings.Global.putString(mContext.getContentResolver(), Settings.Global.DISPLAY_DENSITY_FORCED, ""); } } } finally { Binder.restoreCallingIdentity(ident); } } // displayContent must not be null Loading Loading @@ -7856,12 +7877,17 @@ public class WindowManagerService extends IWindowManager.Stub throw new SecurityException("Must hold permission " + android.Manifest.permission.WRITE_SECURE_SETTINGS); } final long ident = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { setOverscanLocked(displayContent, left, top, right, bottom); } } } finally { Binder.restoreCallingIdentity(ident); } } private void setOverscanLocked(DisplayContent displayContent, Loading