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

Commit 33690464 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove permission from topology API" into main

parents bbd80d0d 78b29443
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -21067,17 +21067,17 @@ package android.hardware.display {
    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 @FlaggedApi("com.android.server.display.feature.flags.display_topology_api") @Nullable public android.hardware.display.DisplayTopology getDisplayTopology();
    method public android.view.Display[] getDisplays();
    method public android.view.Display[] getDisplays(String);
    method @NonNull public android.hardware.display.HdrConversionMode getHdrConversionMode();
    method public int getMatchContentFrameRateUserPreference();
    method public void registerDisplayListener(android.hardware.display.DisplayManager.DisplayListener, android.os.Handler);
    method @FlaggedApi("com.android.server.display.feature.flags.display_listener_performance_improvements") public void registerDisplayListener(@NonNull java.util.concurrent.Executor, long, @NonNull android.hardware.display.DisplayManager.DisplayListener);
    method @FlaggedApi("com.android.server.display.feature.flags.display_topology_api") @RequiresPermission("android.permission.MANAGE_DISPLAYS") public void registerTopologyListener(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.hardware.display.DisplayTopology>);
    method @FlaggedApi("com.android.server.display.feature.flags.display_topology_api") public void registerTopologyListener(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.hardware.display.DisplayTopology>);
    method @FlaggedApi("com.android.server.display.feature.flags.set_brightness_by_unit") @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public void setBrightness(int, float, int);
    method public void unregisterDisplayListener(android.hardware.display.DisplayManager.DisplayListener);
    method @FlaggedApi("com.android.server.display.feature.flags.display_topology_api") @RequiresPermission("android.permission.MANAGE_DISPLAYS") public void unregisterTopologyListener(@NonNull java.util.function.Consumer<android.hardware.display.DisplayTopology>);
    method @FlaggedApi("com.android.server.display.feature.flags.display_topology_api") public void unregisterTopologyListener(@NonNull java.util.function.Consumer<android.hardware.display.DisplayTopology>);
    field @FlaggedApi("com.android.server.display.feature.flags.set_brightness_by_unit") public static final int BRIGHTNESS_UNIT_PERCENTAGE = 0; // 0x0
    field @FlaggedApi("com.android.server.display.feature.flags.display_category_built_in") public static final String DISPLAY_CATEGORY_BUILT_IN_DISPLAYS = "android.hardware.display.category.BUILT_IN_DISPLAYS";
    field public static final String DISPLAY_CATEGORY_PRESENTATION = "android.hardware.display.category.PRESENTATION";
+0 −3
Original line number Diff line number Diff line
@@ -1995,7 +1995,6 @@ public final class DisplayManager {
     * @return The current display topology that represents the relative positions of extended
     * displays.
     */
    @RequiresPermission(MANAGE_DISPLAYS)
    @Nullable
    @FlaggedApi(Flags.FLAG_DISPLAY_TOPOLOGY_API)
    public DisplayTopology getDisplayTopology() {
@@ -2018,7 +2017,6 @@ public final class DisplayManager {
     * @param executor The executor specifying the thread on which the callbacks will be invoked
     * @param listener The listener
     */
    @RequiresPermission(MANAGE_DISPLAYS)
    @FlaggedApi(Flags.FLAG_DISPLAY_TOPOLOGY_API)
    public void registerTopologyListener(@NonNull @CallbackExecutor Executor executor,
            @NonNull Consumer<DisplayTopology> listener) {
@@ -2029,7 +2027,6 @@ public final class DisplayManager {
     * Unregister a display topology listener.
     * @param listener The listener to unregister
     */
    @RequiresPermission(MANAGE_DISPLAYS)
    @FlaggedApi(Flags.FLAG_DISPLAY_TOPOLOGY_API)
    public void unregisterTopologyListener(@NonNull Consumer<DisplayTopology> listener) {
        mGlobal.unregisterTopologyListener(listener);
+0 −3
Original line number Diff line number Diff line
@@ -1456,7 +1456,6 @@ public final class DisplayManagerGlobal {
    /**
     * @see DisplayManager#getDisplayTopology
     */
    @RequiresPermission(MANAGE_DISPLAYS)
    @Nullable
    public DisplayTopology getDisplayTopology() {
        try {
@@ -1484,7 +1483,6 @@ public final class DisplayManagerGlobal {
    /**
     * @see DisplayManager#registerTopologyListener
     */
    @RequiresPermission(MANAGE_DISPLAYS)
    public void registerTopologyListener(@NonNull @CallbackExecutor Executor executor,
            @NonNull Consumer<DisplayTopology> listener, String packageName) {
        if (!DesktopExperienceFlags.DISPLAY_TOPOLOGY.isTrue()) {
@@ -1511,7 +1509,6 @@ public final class DisplayManagerGlobal {
    /**
     * @see DisplayManager#unregisterTopologyListener
     */
    @RequiresPermission(MANAGE_DISPLAYS)
    public void unregisterTopologyListener(@NonNull Consumer<DisplayTopology> listener) {
        if (!DesktopExperienceFlags.DISPLAY_TOPOLOGY.isTrue()) {
            return;
+0 −1
Original line number Diff line number Diff line
@@ -269,7 +269,6 @@ interface IDisplayManager {
    float getDefaultDozeBrightness(int displayId);

    // Get the display topology
    @EnforcePermission("MANAGE_DISPLAYS")
    @nullable
    DisplayTopology getDisplayTopology();

+0 −2
Original line number Diff line number Diff line
@@ -5773,10 +5773,8 @@ public final class DisplayManagerService extends SystemService {
            return ddc.getDefaultDozeBrightness();
        }

        @EnforcePermission(MANAGE_DISPLAYS)
        @Override // Binder call
        public DisplayTopology getDisplayTopology() {
            getDisplayTopology_enforcePermission();
            if (mDisplayTopologyCoordinator == null) {
                return null;
            }
Loading