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

Commit 64ba99d8 authored by Piotr Wilczyński's avatar Piotr Wilczyński
Browse files

Get brightness percentage API

Bug: 420638888
Flag: com.android.server.display.feature.flags.set_brightness_by_unit
Test: DisplayManagerServiceTest
Change-Id: Ib00bb7b2c355710620355f2632c53f30f2730888
parent fd4c1498
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21045,6 +21045,7 @@ package android.hardware.display {
    method public android.hardware.display.VirtualDisplay createVirtualDisplay(@NonNull String, @IntRange(from=1) int, @IntRange(from=1) int, @IntRange(from=1) int, @Nullable android.view.Surface, int, @Nullable android.hardware.display.VirtualDisplay.Callback, @Nullable android.os.Handler);
    method @Nullable public android.hardware.display.VirtualDisplay createVirtualDisplay(@NonNull android.hardware.display.VirtualDisplayConfig);
    method @Nullable public android.hardware.display.VirtualDisplay createVirtualDisplay(@NonNull android.hardware.display.VirtualDisplayConfig, @Nullable android.os.Handler, @Nullable android.hardware.display.VirtualDisplay.Callback);
    method @FlaggedApi("com.android.server.display.feature.flags.set_brightness_by_unit") public float getBrightness(int, int);
    method public android.view.Display getDisplay(int);
    method @FlaggedApi("com.android.server.display.feature.flags.display_topology_api") @Nullable @RequiresPermission("android.permission.MANAGE_DISPLAYS") public android.hardware.display.DisplayTopology getDisplayTopology();
    method public android.view.Display[] getDisplays();
+1 −2
Original line number Diff line number Diff line
@@ -1613,9 +1613,8 @@ public final class DisplayManager {
     * Gets the brightness of the specified display in the specified brightness unit.
     * @param displayId The display of which brightness value to get from.
     * @param unit The unit of the brightness value
     *
     * @hide
     */
    @FlaggedApi(Flags.FLAG_SET_BRIGHTNESS_BY_UNIT)
    public float getBrightness(int displayId, @BrightnessUnit int unit) {
        return mGlobal.getBrightness(displayId, unit);
    }