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

Commit 9355a212 authored by Shubang Lu's avatar Shubang Lu
Browse files

Add isAmbientBacklightEnabled

Test: mmm
Flag: android.media.tv.flags.media_quality_fw
Bug: 377079429
Change-Id: I91e79755c28dc0218f72610d5d7a580df357940c
parent e46861ea
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -67,4 +67,5 @@ interface IMediaQualityManager {

    void setAmbientBacklightSettings(in AmbientBacklightSettings settings);
    void setAmbientBacklightEnabled(in boolean enabled);
    boolean isAmbientBacklightEnabled();
}
+12 −0
Original line number Diff line number Diff line
@@ -678,6 +678,18 @@ public final class MediaQualityManager {
        }
    }

    /**
     * Returns {@code true} if ambient backlight is enabled; {@code false} otherwise.
     * @hide
     */
    public boolean isAmbientBacklightEnabled() {
        try {
            return mService.isAmbientBacklightEnabled();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Enables or disables the ambient backlight detection.
     *
+5 −0
Original line number Diff line number Diff line
@@ -358,5 +358,10 @@ public class MediaQualityService extends SystemService {
        public boolean isAutoSoundQualityEnabled() {
            return false;
        }

        @Override
        public boolean isAmbientBacklightEnabled() {
            return false;
        }
    }
}