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

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

Merge "Make isInteractive(display) a testAPI" into main

parents b9c54446 0ec09c63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2493,6 +2493,7 @@ package android.os {
    method public boolean areAutoPowerSaveModesEnabled();
    method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_LOW_POWER_STANDBY, android.Manifest.permission.DEVICE_POWER}) public void forceLowPowerStandbyActive(boolean);
    method @FlaggedApi("android.os.battery_saver_supported_check_api") public boolean isBatterySaverSupported();
    method public boolean isInteractive(int);
    field public static final String ACTION_ENHANCED_DISCHARGE_PREDICTION_CHANGED = "android.os.action.ENHANCED_DISCHARGE_PREDICTION_CHANGED";
    field @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public static final int SYSTEM_WAKELOCK = -2147483648; // 0x80000000
  }
+2 −0
Original line number Diff line number Diff line
@@ -2139,6 +2139,8 @@ UnflaggedApi: android.os.BugreportParams#BUGREPORT_MODE_MAX_VALUE:
    New API must be flagged with @FlaggedApi: field android.os.BugreportParams.BUGREPORT_MODE_MAX_VALUE
UnflaggedApi: android.os.PowerManager#isBatterySaverSupported():
    New API must be flagged with @FlaggedApi: method android.os.PowerManager.isBatterySaverSupported()
UnflaggedApi: android.os.PowerManager#isInteractive(int):
    New API must be flagged with @FlaggedApi: method android.os.PowerManager.isInteractive(int)
UnflaggedApi: android.os.UserHandle#USER_CURRENT:
    New API must be flagged with @FlaggedApi: field android.os.UserHandle.USER_CURRENT
UnflaggedApi: android.os.UserManager#getAliveUsers():
+6 −4
Original line number Diff line number Diff line
@@ -1823,14 +1823,16 @@ public final class PowerManager {
    }

    /**
     * Returns the interactive state for a specific display, which may not be the same as the
     * global wakefulness (which is true when any display is awake).
     * Returns true if the specified display is in an interactive state. This may not be the
     * same as the global wakefulness (which is true when any display is interactive).
     * @see #isInteractive()
     *
     * @param displayId
     * @return whether the given display is present and interactive, or false
     * @param displayId The Display ID to check for interactivity.
     * @return True if the display is in an interactive state.
     *
     * @hide
     */
    @TestApi
    public boolean isInteractive(int displayId) {
        return mInteractiveCache.query(displayId);
    }