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

Commit c5a7c295 authored by Denny cy Lee's avatar Denny cy Lee
Browse files

DeviceIdle: Support aggressive/unaggressive doze mode

Test: atest com.android.server.DeviceIdleControllerTest
Bug: 121167278
Change-Id: I3bc645a23a6a93e120f12a9a3fa5cf038fa6ca8f
parent e07fb110
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -45,4 +45,6 @@ interface IDeviceIdleController {
    void exitIdle(String reason);
    boolean registerMaintenanceActivityListener(IMaintenanceActivityListener listener);
    void unregisterMaintenanceActivityListener(IMaintenanceActivityListener listener);
    int setPreIdleTimeoutMode(int Mode);
    void resetPreIdleTimeoutMode();
}
+19 −0
Original line number Diff line number Diff line
@@ -1723,6 +1723,25 @@ public final class PowerManager {
    public static final String ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED
            = "android.os.action.SCREEN_BRIGHTNESS_BOOST_CHANGED";

    /**
     * Constant for PreIdleTimeout normal mode (default mode, not short nor extend timeout) .
     * @hide
     */
    public static final int PRE_IDLE_TIMEOUT_MODE_NORMAL = 0;

    /**
     * Constant for PreIdleTimeout long mode (extend timeout to keep in inactive mode
     * longer).
     * @hide
     */
    public static final int PRE_IDLE_TIMEOUT_MODE_LONG = 1;

    /**
     * Constant for PreIdleTimeout short mode (short timeout to go to doze mode quickly)
     * @hide
     */
    public static final int PRE_IDLE_TIMEOUT_MODE_SHORT = 2;

    /**
     * A wake lock is a mechanism to indicate that your application needs
     * to have the device stay on.
+291 −2

File changed.

Preview size limit exceeded, changes collapsed.

+119 −0

File changed.

Preview size limit exceeded, changes collapsed.