Loading api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ package android { field public static final java.lang.String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS"; field public static final java.lang.String CONNECTIVITY_INTERNAL = "android.permission.CONNECTIVITY_INTERNAL"; field public static final java.lang.String CONNECTIVITY_USE_RESTRICTED_NETWORKS = "android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"; field public static final java.lang.String CONTROL_DISPLAY_SATURATION = "android.permission.CONTROL_DISPLAY_SATURATION"; field public static final java.lang.String CONTROL_INCALL_EXPERIENCE = "android.permission.CONTROL_INCALL_EXPERIENCE"; field public static final java.lang.String CONTROL_LOCATION_UPDATES = "android.permission.CONTROL_LOCATION_UPDATES"; field public static final java.lang.String CONTROL_VPN = "android.permission.CONTROL_VPN"; Loading Loading @@ -1252,6 +1253,7 @@ package android.hardware.display { method public android.hardware.display.BrightnessConfiguration getDefaultBrightnessConfiguration(); method public android.graphics.Point getStableDisplaySize(); method public void setBrightnessConfiguration(android.hardware.display.BrightnessConfiguration); method public void setSaturationLevel(float); } } Loading core/java/android/hardware/display/DisplayManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -534,6 +534,19 @@ public final class DisplayManager { return mGlobal.getWifiDisplayStatus(); } /** * Set the level of color saturation to apply to the display. * @param level The amount of saturation to apply, between 0 and 1 inclusive. * 0 produces a grayscale image, 1 is normal. * * @hide */ @SystemApi @RequiresPermission(Manifest.permission.CONTROL_DISPLAY_SATURATION) public void setSaturationLevel(float level) { mGlobal.setSaturationLevel(level); } /** * Creates a virtual display. * Loading core/java/android/hardware/display/DisplayManagerGlobal.java +11 −0 Original line number Diff line number Diff line Loading @@ -384,6 +384,17 @@ public final class DisplayManagerGlobal { } } /** * Set the level of color saturation to apply to the display. */ public void setSaturationLevel(float level) { try { mDm.setSaturationLevel(level); } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } } public VirtualDisplay createVirtualDisplay(Context context, MediaProjection projection, String name, int width, int height, int densityDpi, Surface surface, int flags, VirtualDisplay.Callback callback, Handler handler, String uniqueId) { Loading core/java/android/hardware/display/IDisplayManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,9 @@ interface IDisplayManager { // Requires CONFIGURE_DISPLAY_COLOR_MODE void requestColorMode(int displayId, int colorMode); // Requires CONTROL_DISPLAY_SATURATION void setSaturationLevel(float level); // Requires CAPTURE_VIDEO_OUTPUT, CAPTURE_SECURE_VIDEO_OUTPUT, or an appropriate // MediaProjection token for certain combinations of flags. int createVirtualDisplay(in IVirtualDisplayCallback callback, Loading core/res/AndroidManifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -3121,6 +3121,12 @@ <permission android:name="android.permission.CONFIGURE_DISPLAY_COLOR_MODE" android:protectionLevel="signature" /> <!-- Allows an application to control the color saturation of the display. @hide @SystemApi --> <permission android:name="android.permission.CONTROL_DISPLAY_SATURATION" android:protectionLevel="signature|privileged" /> <!-- Allows an application to collect usage infomation about brightness slider changes. <p>Not for use by third-party applications.</p> @hide Loading Loading
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ package android { field public static final java.lang.String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS"; field public static final java.lang.String CONNECTIVITY_INTERNAL = "android.permission.CONNECTIVITY_INTERNAL"; field public static final java.lang.String CONNECTIVITY_USE_RESTRICTED_NETWORKS = "android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"; field public static final java.lang.String CONTROL_DISPLAY_SATURATION = "android.permission.CONTROL_DISPLAY_SATURATION"; field public static final java.lang.String CONTROL_INCALL_EXPERIENCE = "android.permission.CONTROL_INCALL_EXPERIENCE"; field public static final java.lang.String CONTROL_LOCATION_UPDATES = "android.permission.CONTROL_LOCATION_UPDATES"; field public static final java.lang.String CONTROL_VPN = "android.permission.CONTROL_VPN"; Loading Loading @@ -1252,6 +1253,7 @@ package android.hardware.display { method public android.hardware.display.BrightnessConfiguration getDefaultBrightnessConfiguration(); method public android.graphics.Point getStableDisplaySize(); method public void setBrightnessConfiguration(android.hardware.display.BrightnessConfiguration); method public void setSaturationLevel(float); } } Loading
core/java/android/hardware/display/DisplayManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -534,6 +534,19 @@ public final class DisplayManager { return mGlobal.getWifiDisplayStatus(); } /** * Set the level of color saturation to apply to the display. * @param level The amount of saturation to apply, between 0 and 1 inclusive. * 0 produces a grayscale image, 1 is normal. * * @hide */ @SystemApi @RequiresPermission(Manifest.permission.CONTROL_DISPLAY_SATURATION) public void setSaturationLevel(float level) { mGlobal.setSaturationLevel(level); } /** * Creates a virtual display. * Loading
core/java/android/hardware/display/DisplayManagerGlobal.java +11 −0 Original line number Diff line number Diff line Loading @@ -384,6 +384,17 @@ public final class DisplayManagerGlobal { } } /** * Set the level of color saturation to apply to the display. */ public void setSaturationLevel(float level) { try { mDm.setSaturationLevel(level); } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } } public VirtualDisplay createVirtualDisplay(Context context, MediaProjection projection, String name, int width, int height, int densityDpi, Surface surface, int flags, VirtualDisplay.Callback callback, Handler handler, String uniqueId) { Loading
core/java/android/hardware/display/IDisplayManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,9 @@ interface IDisplayManager { // Requires CONFIGURE_DISPLAY_COLOR_MODE void requestColorMode(int displayId, int colorMode); // Requires CONTROL_DISPLAY_SATURATION void setSaturationLevel(float level); // Requires CAPTURE_VIDEO_OUTPUT, CAPTURE_SECURE_VIDEO_OUTPUT, or an appropriate // MediaProjection token for certain combinations of flags. int createVirtualDisplay(in IVirtualDisplayCallback callback, Loading
core/res/AndroidManifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -3121,6 +3121,12 @@ <permission android:name="android.permission.CONFIGURE_DISPLAY_COLOR_MODE" android:protectionLevel="signature" /> <!-- Allows an application to control the color saturation of the display. @hide @SystemApi --> <permission android:name="android.permission.CONTROL_DISPLAY_SATURATION" android:protectionLevel="signature|privileged" /> <!-- Allows an application to collect usage infomation about brightness slider changes. <p>Not for use by third-party applications.</p> @hide Loading