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

Commit 98367eb6 authored by Kriti Dang's avatar Kriti Dang Committed by Automerger Merge Worker
Browse files

Merge "Hdr format settings [Backend]" into sc-dev am: 2b5b144e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13988951

Change-Id: I1a95f21ef56efdc876a2cc8156775dfb7029d0e5
parents 188d9330 2b5b144e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1142,6 +1142,7 @@ package android.hardware.display {
  public final class DisplayManager {
  public final class DisplayManager {
    method public boolean areUserDisabledHdrTypesAllowed();
    method public boolean areUserDisabledHdrTypesAllowed();
    method @RequiresPermission(android.Manifest.permission.MODIFY_REFRESH_RATE_SWITCHING_TYPE) public int getRefreshRateSwitchingType();
    method @RequiresPermission(android.Manifest.permission.MODIFY_REFRESH_RATE_SWITCHING_TYPE) public int getRefreshRateSwitchingType();
    method @NonNull public int[] getUserDisabledHdrTypes();
    method public boolean isMinimalPostProcessingRequested(int);
    method public boolean isMinimalPostProcessingRequested(int);
    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public void setAreUserDisabledHdrTypesAllowed(boolean);
    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public void setAreUserDisabledHdrTypesAllowed(boolean);
    method @RequiresPermission(android.Manifest.permission.MODIFY_REFRESH_RATE_SWITCHING_TYPE) public void setRefreshRateSwitchingType(int);
    method @RequiresPermission(android.Manifest.permission.MODIFY_REFRESH_RATE_SWITCHING_TYPE) public void setRefreshRateSwitchingType(int);
@@ -2597,6 +2598,7 @@ package android.view {
  }
  }


  public final class Display {
  public final class Display {
    method @NonNull public int[] getReportedHdrTypes();
    method @NonNull public android.graphics.ColorSpace[] getSupportedWideColorGamut();
    method @NonNull public android.graphics.ColorSpace[] getSupportedWideColorGamut();
    method public int getType();
    method public int getType();
    method public boolean hasAccess(int);
    method public boolean hasAccess(int);
+11 −0
Original line number Original line Diff line number Diff line
@@ -748,6 +748,17 @@ public final class DisplayManager {
        return mGlobal.areUserDisabledHdrTypesAllowed();
        return mGlobal.areUserDisabledHdrTypesAllowed();
    }
    }


    /**
     * Returns the HDR formats disabled by the user.
     *
     * @hide
     */
    @TestApi
    public @NonNull int[] getUserDisabledHdrTypes() {
        return mGlobal.getUserDisabledHdrTypes();
    }


    /**
    /**
     * Creates a virtual display.
     * Creates a virtual display.
     *
     *
+12 −0
Original line number Original line Diff line number Diff line
@@ -551,6 +551,18 @@ public final class DisplayManagerGlobal {
        }
        }
    }
    }


    /**
     * Returns the HDR formats disabled by the user.
     *
     */
    public int[] getUserDisabledHdrTypes() {
        try {
            return mDm.getUserDisabledHdrTypes();
        } catch (RemoteException ex) {
            throw ex.rethrowFromSystemServer();
        }
    }

    public void requestColorMode(int displayId, int colorMode) {
    public void requestColorMode(int displayId, int colorMode) {
        try {
        try {
            mDm.requestColorMode(displayId, colorMode);
            mDm.requestColorMode(displayId, colorMode);
+3 −0
Original line number Original line Diff line number Diff line
@@ -77,6 +77,9 @@ interface IDisplayManager {
    // No permissions required.
    // No permissions required.
    boolean areUserDisabledHdrTypesAllowed();
    boolean areUserDisabledHdrTypesAllowed();


    // No permissions required.
    int[] getUserDisabledHdrTypes();

    // Requires CONFIGURE_DISPLAY_COLOR_MODE
    // Requires CONFIGURE_DISPLAY_COLOR_MODE
    void requestColorMode(int displayId, int colorMode);
    void requestColorMode(int displayId, int colorMode);


+16 −0
Original line number Original line Diff line number Diff line
@@ -1095,6 +1095,22 @@ public final class Display {
        }
        }
    }
    }


    /**
     * @hide
     * Returns the display's HDR supported types.
     *
     * @see #isHdr()
     * @see HdrCapabilities#getSupportedHdrTypes()
     */
    @TestApi
    @NonNull
    public int[] getReportedHdrTypes() {
        synchronized (mLock) {
            updateDisplayInfoLocked();
            return mDisplayInfo.hdrCapabilities.getSupportedHdrTypes();
        }
    }

    /**
    /**
     * Returns whether this display supports any HDR type.
     * Returns whether this display supports any HDR type.
     *
     *
Loading