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

Commit 9af361bb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Deprecate screen brightness boost detection."

parents 0ce8a160 b22da807
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -34021,7 +34021,7 @@ package android.os {
    method public boolean isIgnoringBatteryOptimizations(java.lang.String);
    method public boolean isInteractive();
    method public boolean isPowerSaveMode();
    method public boolean isScreenBrightnessBoosted();
    method public deprecated boolean isScreenBrightnessBoosted();
    method public deprecated boolean isScreenOn();
    method public boolean isSustainedPerformanceModeSupported();
    method public boolean isWakeLockLevelSupported(int);
@@ -34031,7 +34031,7 @@ package android.os {
    field public static final int ACQUIRE_CAUSES_WAKEUP = 268435456; // 0x10000000
    field public static final java.lang.String ACTION_DEVICE_IDLE_MODE_CHANGED = "android.os.action.DEVICE_IDLE_MODE_CHANGED";
    field public static final java.lang.String ACTION_POWER_SAVE_MODE_CHANGED = "android.os.action.POWER_SAVE_MODE_CHANGED";
    field public static final java.lang.String ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED = "android.os.action.SCREEN_BRIGHTNESS_BOOST_CHANGED";
    field public static final deprecated java.lang.String ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED = "android.os.action.SCREEN_BRIGHTNESS_BOOST_CHANGED";
    field public static final deprecated int FULL_WAKE_LOCK = 26; // 0x1a
    field public static final int ON_AFTER_RELEASE = 536870912; // 0x20000000
    field public static final int PARTIAL_WAKE_LOCK = 1; // 0x1
+2 −0
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ interface IPowerManager

    void setStayOnSetting(int val);
    void boostScreenBrightness(long time);

    // --- deprecated ---
    boolean isScreenBrightnessBoosted();

    // temporarily overrides the screen brightness settings to allow the user to
+6 −7
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.content.Context;
import android.util.Log;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@@ -848,15 +849,12 @@ public final class PowerManager {
     * to {@link #boostScreenBrightness(long)}.
     * @return {@code True} if the screen brightness is currently boosted. {@code False} otherwise.
     *
     * @deprecated This call is rarely used and will be phased out soon.
     * @hide
     */
    @SystemApi
    @SystemApi @Deprecated
    public boolean isScreenBrightnessBoosted() {
        try {
            return mService.isScreenBrightnessBoosted();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
        return false;
    }

    /**
@@ -1216,9 +1214,10 @@ public final class PowerManager {
     * Intent that is broadcast when the state of {@link #isScreenBrightnessBoosted()} has changed.
     * This broadcast is only sent to registered receivers.
     *
     * @deprecated This intent is rarely used and will be phased out soon.
     * @hide
     **/
    @SystemApi
    @SystemApi @Deprecated
    public static final String ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED
            = "android.os.action.SCREEN_BRIGHTNESS_BOOST_CHANGED";

+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@
    <protected-broadcast android:name="android.os.action.POWER_SAVE_TEMP_WHITELIST_CHANGED" />
    <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED_INTERNAL" />

    <!-- @deprecated This is rarely used and will be phased out soon. -->
    <protected-broadcast android:name="android.os.action.SCREEN_BRIGHTNESS_BOOST_CHANGED" />

    <protected-broadcast android:name="android.app.action.ENTER_CAR_MODE" />