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

Commit db958d5e authored by Kriti Dang's avatar Kriti Dang Committed by Android (Google) Code Review
Browse files

Merge "App override for HDR output control"

parents e508e245 31a75ba2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -53721,12 +53721,14 @@ package android.view {
    method public int getFitInsetsTypes();
    method public final CharSequence getTitle();
    method public boolean isFitInsetsIgnoringVisibility();
    method public boolean isHdrConversionEnabled();
    method public static boolean mayUseInputMethod(int);
    method public void setBlurBehindRadius(@IntRange(from=0) int);
    method public void setColorMode(int);
    method public void setFitInsetsIgnoringVisibility(boolean);
    method public void setFitInsetsSides(int);
    method public void setFitInsetsTypes(int);
    method public void setHdrConversionEnabled(boolean);
    method public final void setTitle(CharSequence);
    method public void setWallpaperTouchEventsEnabled(boolean);
    method public void writeToParcel(android.os.Parcel, int);
@@ -53737,6 +53739,7 @@ package android.view {
    field public static final float BRIGHTNESS_OVERRIDE_OFF = 0.0f;
    field @NonNull public static final android.os.Parcelable.Creator<android.view.WindowManager.LayoutParams> CREATOR;
    field public static final int DIM_AMOUNT_CHANGED = 32; // 0x20
    field public static final int DISPLAY_FLAG_DISABLE_HDR_CONVERSION = 1; // 0x1
    field public static final int FIRST_APPLICATION_WINDOW = 1; // 0x1
    field public static final int FIRST_SUB_WINDOW = 1000; // 0x3e8
    field public static final int FIRST_SYSTEM_WINDOW = 2000; // 0x7d0
+1 −0
Original line number Diff line number Diff line
@@ -1400,6 +1400,7 @@ package android.hardware.display {
    method @RequiresPermission(android.Manifest.permission.MODIFY_USER_PREFERRED_DISPLAY_MODE) public void clearGlobalUserPreferredDisplayMode();
    method @Nullable public android.view.Display.Mode getGlobalUserPreferredDisplayMode();
    method @NonNull public android.hardware.display.HdrConversionMode getHdrConversionMode();
    method @NonNull public android.hardware.display.HdrConversionMode getHdrConversionModeSetting();
    method @NonNull public int[] getSupportedHdrOutputTypes();
    method @NonNull public int[] getUserDisabledHdrTypes();
    method public boolean isMinimalPostProcessingRequested(int);
+23 −0
Original line number Diff line number Diff line
@@ -1429,6 +1429,7 @@ public final class DisplayManager {
     * hdrConversionMode.conversionMode is not {@link HdrConversionMode#HDR_CONVERSION_FORCE}.
     *
     * @see #getHdrConversionMode
     * @see #getHdrConversionModeSetting
     * @see #getSupportedHdrOutputTypes
     * @hide
     */
@@ -1440,9 +1441,14 @@ public final class DisplayManager {

    /**
     * Returns the {@link HdrConversionMode} of the device, which is set by the user.

     * The HDR conversion mode chosen by user which considers the app override is returned. Apps can
     * override HDR conversion using
     * {@link android.view.WindowManager.LayoutParams#disableHdrConversion}.
     *
     * @see #setHdrConversionMode
     * @see #getSupportedHdrOutputTypes
     * @see #getHdrConversionModeSetting()
     * @hide
     */
    @TestApi
@@ -1451,6 +1457,23 @@ public final class DisplayManager {
        return mGlobal.getHdrConversionMode();
    }

    /**
     * Returns the {@link HdrConversionMode} of the device, which is set by the user.

     * The HDR conversion mode chosen by user is returned irrespective of whether HDR conversion
     * is disabled by an app.
     *
     * @see #setHdrConversionMode
     * @see #getSupportedHdrOutputTypes
     * @see #getHdrConversionMode()
     * @hide
     */
    @TestApi
    @NonNull
    public HdrConversionMode getHdrConversionModeSetting() {
        return mGlobal.getHdrConversionModeSetting();
    }

    /**
     * Returns the HDR output types supported by the device.
     *
+13 −0
Original line number Diff line number Diff line
@@ -989,6 +989,19 @@ public final class DisplayManagerGlobal {
        }
    }

    /**
     * Returns the {@link HdrConversionMode} of the device, which is set by the user.
     * The HDR conversion mode chosen by user is returned irrespective of whether HDR conversion
     * is disabled by an app.
     */
    public HdrConversionMode getHdrConversionModeSetting() {
        try {
            return mDm.getHdrConversionModeSetting();
        } catch (RemoteException ex) {
            throw ex.rethrowFromSystemServer();
        }
    }

    /**
     * Returns the {@link HdrConversionMode} of the device.
     */
+2 −1
Original line number Diff line number Diff line
@@ -234,13 +234,14 @@ public abstract class DisplayManagerInternal {
     * @param requestedMinimalPostProcessing The preferred minimal post processing setting for the
     * display. This is true when there is at least one visible window that wants minimal post
     * processng on.
     * @param disableHdrConversion The preferred HDR conversion setting for the window.
     * @param inTraversal True if called from WindowManagerService during a window traversal
     * prior to call to performTraversalInTransactionFromWindowManager.
     */
    public abstract void setDisplayProperties(int displayId, boolean hasContent,
            float requestedRefreshRate, int requestedModeId, float requestedMinRefreshRate,
            float requestedMaxRefreshRate, boolean requestedMinimalPostProcessing,
            boolean inTraversal);
            boolean disableHdrConversion, boolean inTraversal);

    /**
     * Applies an offset to the contents of a display, for example to avoid burn-in.
Loading