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

Commit a85b3d56 authored by Galia Peycheva's avatar Galia Peycheva Committed by Android (Google) Code Review
Browse files

Merge "Add a TestApi to DM to get the last requested MPP"

parents 2ffecdb9 35f900a4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1120,6 +1120,7 @@ package android.hardware.display {
    method @RequiresPermission(android.Manifest.permission.BRIGHTNESS_SLIDER_USAGE) public java.util.List<android.hardware.display.BrightnessChangeEvent> getBrightnessEvents();
    method @Nullable @RequiresPermission(android.Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS) public android.hardware.display.BrightnessConfiguration getDefaultBrightnessConfiguration();
    method public android.graphics.Point getStableDisplaySize();
    method public boolean isMinimalPostProcessingRequested(int);
    method @RequiresPermission(android.Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS) public void setBrightnessConfiguration(android.hardware.display.BrightnessConfiguration);
  }

+11 −0
Original line number Diff line number Diff line
@@ -749,6 +749,17 @@ public final class DisplayManager {
        return mGlobal.getDefaultBrightnessConfiguration();
    }


    /**
     * Gets the last requested minimal post processing setting for the display with displayId.
     *
     * @hide
     */
    @TestApi
    public boolean isMinimalPostProcessingRequested(int displayId) {
        return mGlobal.isMinimalPostProcessingRequested(displayId);
    }

    /**
     * Temporarily sets the brightness of the display.
     * <p>
+13 −0
Original line number Diff line number Diff line
@@ -593,6 +593,19 @@ public final class DisplayManagerGlobal {
        }
    }

    /**
     * Gets the last requested minimal post processing setting for the display with displayId.
     *
     * @hide
     */
    public boolean isMinimalPostProcessingRequested(int displayId) {
        try {
            return mDm.isMinimalPostProcessingRequested(displayId);
        } catch (RemoteException ex) {
            throw ex.rethrowFromSystemServer();
        }
    }

    /**
     * Temporarily sets the brightness of the display.
     * <p>
+3 −0
Original line number Diff line number Diff line
@@ -111,6 +111,9 @@ interface IDisplayManager {
    // Gets the default brightness configuration if configured.
    BrightnessConfiguration getDefaultBrightnessConfiguration();

    // Gets the last requested minimal post processing settings for display with displayId.
    boolean isMinimalPostProcessingRequested(int displayId);

    // Temporarily sets the display brightness.
    void setTemporaryBrightness(int brightness);

+2 −0
Original line number Diff line number Diff line
@@ -624,6 +624,8 @@ public final class DisplayInfo implements Parcelable {
        sb.append(Arrays.toString(supportedColorModes));
        sb.append(", hdrCapabilities ");
        sb.append(hdrCapabilities);
        sb.append(", minimalPostProcessingSupported ");
        sb.append(minimalPostProcessingSupported);
        sb.append(", rotation ");
        sb.append(rotation);
        sb.append(", density ");
Loading