Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -13247,6 +13247,7 @@ package android.hardware.display { method public android.view.Display getDisplay(); method public android.view.Surface getSurface(); method public void release(); method public void resize(int, int, int); method public void setSurface(android.view.Surface); } core/java/android/hardware/display/DisplayManagerGlobal.java +9 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,15 @@ public final class DisplayManagerGlobal { } } public void resizeVirtualDisplay(IVirtualDisplayCallbacks token, int width, int height, int densityDpi) { try { mDm.resizeVirtualDisplay(token, width, height, densityDpi); } catch (RemoteException ex) { Log.w(TAG, "Failed to resize virtual display.", ex); } } public void releaseVirtualDisplay(IVirtualDisplayCallbacks token) { try { mDm.releaseVirtualDisplay(token); Loading core/java/android/hardware/display/IDisplayManager.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ interface IDisplayManager { in IMediaProjection projectionToken, String packageName, String name, int width, int height, int densityDpi, in Surface surface, int flags); // No permissions required, but must be same Uid as the creator. void resizeVirtualDisplay(in IVirtualDisplayCallbacks token, int width, int height, int densityDpi); // No permissions required but must be same Uid as the creator. void setVirtualDisplaySurface(in IVirtualDisplayCallbacks token, in Surface surface); Loading core/java/android/hardware/display/VirtualDisplay.java +12 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,18 @@ public final class VirtualDisplay { } } /** * Asks the virtual display to resize. *<p> * This is really just a convenience to allow applications using * virtual displays to adapt to changing conditions without having * to tear down and recreate the display. * </p> */ public void resize(int width, int height, int densityDpi) { mGlobal.resizeVirtualDisplay(mToken, width, height, densityDpi); } /** * Releases the virtual display and destroys its underlying surface. * <p> Loading core/java/android/view/SurfaceControl.java +12 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ public class SurfaceControl { IBinder displayToken, int orientation, int l, int t, int r, int b, int L, int T, int R, int B); private static native void nativeSetDisplaySize(IBinder displayToken, int width, int height); private static native SurfaceControl.PhysicalDisplayInfo[] nativeGetDisplayConfigs( IBinder displayToken); private static native int nativeGetActiveConfig(IBinder displayToken); Loading Loading @@ -588,6 +589,17 @@ public class SurfaceControl { } } public static void setDisplaySize(IBinder displayToken, int width, int height) { if (displayToken == null) { throw new IllegalArgumentException("displayToken must not be null"); } if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be positive"); } nativeSetDisplaySize(displayToken, width, height); } public static IBinder createDisplay(String name, boolean secure) { if (name == null) { throw new IllegalArgumentException("name must not be null"); Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -13247,6 +13247,7 @@ package android.hardware.display { method public android.view.Display getDisplay(); method public android.view.Surface getSurface(); method public void release(); method public void resize(int, int, int); method public void setSurface(android.view.Surface); }
core/java/android/hardware/display/DisplayManagerGlobal.java +9 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,15 @@ public final class DisplayManagerGlobal { } } public void resizeVirtualDisplay(IVirtualDisplayCallbacks token, int width, int height, int densityDpi) { try { mDm.resizeVirtualDisplay(token, width, height, densityDpi); } catch (RemoteException ex) { Log.w(TAG, "Failed to resize virtual display.", ex); } } public void releaseVirtualDisplay(IVirtualDisplayCallbacks token) { try { mDm.releaseVirtualDisplay(token); Loading
core/java/android/hardware/display/IDisplayManager.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ interface IDisplayManager { in IMediaProjection projectionToken, String packageName, String name, int width, int height, int densityDpi, in Surface surface, int flags); // No permissions required, but must be same Uid as the creator. void resizeVirtualDisplay(in IVirtualDisplayCallbacks token, int width, int height, int densityDpi); // No permissions required but must be same Uid as the creator. void setVirtualDisplaySurface(in IVirtualDisplayCallbacks token, in Surface surface); Loading
core/java/android/hardware/display/VirtualDisplay.java +12 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,18 @@ public final class VirtualDisplay { } } /** * Asks the virtual display to resize. *<p> * This is really just a convenience to allow applications using * virtual displays to adapt to changing conditions without having * to tear down and recreate the display. * </p> */ public void resize(int width, int height, int densityDpi) { mGlobal.resizeVirtualDisplay(mToken, width, height, densityDpi); } /** * Releases the virtual display and destroys its underlying surface. * <p> Loading
core/java/android/view/SurfaceControl.java +12 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ public class SurfaceControl { IBinder displayToken, int orientation, int l, int t, int r, int b, int L, int T, int R, int B); private static native void nativeSetDisplaySize(IBinder displayToken, int width, int height); private static native SurfaceControl.PhysicalDisplayInfo[] nativeGetDisplayConfigs( IBinder displayToken); private static native int nativeGetActiveConfig(IBinder displayToken); Loading Loading @@ -588,6 +589,17 @@ public class SurfaceControl { } } public static void setDisplaySize(IBinder displayToken, int width, int height) { if (displayToken == null) { throw new IllegalArgumentException("displayToken must not be null"); } if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be positive"); } nativeSetDisplaySize(displayToken, width, height); } public static IBinder createDisplay(String name, boolean secure) { if (name == null) { throw new IllegalArgumentException("name must not be null"); Loading