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

Commit 4be1391e authored by Leon Scroggins's avatar Leon Scroggins Committed by Android (Google) Code Review
Browse files

Merge "getDisplayDecorationSupport: return more detailed info"

parents b31ca5fa 73e0689d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ filegroup {
        ":platform-compat-native-aidl",

        // AIDL sources from external directories
        ":android.hardware.graphics.common-V3-java-source",
        ":android.hardware.security.keymint-V1-java-source",
        ":android.hardware.security.secureclock-V1-java-source",
        ":android.hardware.tv.tuner-V1-java-source",
@@ -288,6 +289,7 @@ java_defaults {
            // TODO: remove when moved to the below package
            "frameworks/base/packages/ConnectivityT/framework-t/aidl-export",
            "packages/modules/Connectivity/framework/aidl-export",
            "hardware/interfaces/graphics/common/aidl",
        ],
    },
    dxflags: [
@@ -537,6 +539,7 @@ stubs_defaults {
            // TODO: remove when moved to the below package
            "frameworks/base/packages/ConnectivityT/framework-t/aidl-export",
            "packages/modules/Connectivity/framework/aidl-export",
            "hardware/interfaces/graphics/common/aidl",
        ],
    },
    // These are libs from framework-internal-utils that are required (i.e. being referenced)
+0 −11
Original line number Diff line number Diff line
@@ -1213,17 +1213,6 @@ public final class DisplayManager {
        mGlobal.setRefreshRateSwitchingType(newValue);
    }

    /**
     * Returns whether the specified display supports DISPLAY_DECORATION.
     *
     * @param displayId The display to query support.
     *
     * @hide
     */
    public boolean getDisplayDecorationSupport(int displayId) {
        return mGlobal.getDisplayDecorationSupport(displayId);
    }

    /**
     * Returns the user preference for "Match content frame rate".
     * <p>
+3 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.content.res.Resources;
import android.graphics.ColorSpace;
import android.graphics.Point;
import android.hardware.display.DisplayManager.DisplayListener;
import android.hardware.graphics.common.DisplayDecorationSupport;
import android.media.projection.IMediaProjection;
import android.media.projection.MediaProjection;
import android.os.Handler;
@@ -812,13 +813,13 @@ public final class DisplayManagerGlobal {
    }

    /**
     * Report whether the display supports DISPLAY_DECORATION.
     * Report whether/how the display supports DISPLAY_DECORATION.
     *
     * @param displayId The display whose support is being queried.
     *
     * @hide
     */
    public boolean getDisplayDecorationSupport(int displayId) {
    public DisplayDecorationSupport getDisplayDecorationSupport(int displayId) {
        try {
            return mDm.getDisplayDecorationSupport(displayId);
        } catch (RemoteException ex) {
+2 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.graphics.Point;
import android.hardware.display.BrightnessConfiguration;
import android.hardware.display.BrightnessInfo;
import android.hardware.display.Curve;
import android.hardware.graphics.common.DisplayDecorationSupport;
import android.hardware.display.IDisplayManagerCallback;
import android.hardware.display.IVirtualDisplayCallback;
import android.hardware.display.VirtualDisplayConfig;
@@ -183,5 +184,5 @@ interface IDisplayManager {
    int getRefreshRateSwitchingType();

    // Query for DISPLAY_DECORATION support.
    boolean getDisplayDecorationSupport(int displayId);
    DisplayDecorationSupport getDisplayDecorationSupport(int displayId);
}
+14 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import android.hardware.display.BrightnessInfo;
import android.hardware.display.DeviceProductInfo;
import android.hardware.display.DisplayManager;
import android.hardware.display.DisplayManagerGlobal;
import android.hardware.graphics.common.DisplayDecorationSupport;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
@@ -1855,6 +1856,19 @@ public final class Display {
        return refreshRate > 0.0f;
    }

    /**
     * Returns whether/how the specified display supports DISPLAY_DECORATION.
     *
     * Composition.DISPLAY_DECORATION is a special layer type which is used to
     * render the screen decorations (i.e. antialiased rounded corners and
     * cutouts) while taking advantage of specific hardware.
     *
     * @hide
     */
    public DisplayDecorationSupport getDisplayDecorationSupport() {
        return mGlobal.getDisplayDecorationSupport(mDisplayId);
    }

    /**
     * A mode supported by a given display.
     *
Loading