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

Commit 4527135d authored by Chris Ye's avatar Chris Ye Committed by Android (Google) Code Review
Browse files

Merge "Add cpp native headers for IPowerManager.aidl parcelables."

parents 38ffc11f 590ff6e8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -478,6 +478,7 @@ filegroup {
        "core/java/android/os/IThermalEventListener.aidl",
        "core/java/android/os/IThermalStatusListener.aidl",
        "core/java/android/os/IThermalService.aidl",
        "core/java/android/os/IPowerManager.aidl",
    ],
    path: "core/java",
}
+1 −1
Original line number Diff line number Diff line
@@ -16,4 +16,4 @@

package android.os;

parcelable BatterySaverPolicyConfig;
parcelable BatterySaverPolicyConfig cpp_header "android/BatterySaverPolicyConfig.h";
+29 −5
Original line number Diff line number Diff line
@@ -25,11 +25,6 @@ import android.os.WorkSource;

interface IPowerManager
{
    // WARNING: When methods are inserted or deleted, the transaction IDs in
    // frameworks/native/include/powermanager/IPowerManager.h must be updated to match the order in this file.
    //
    // When a method's argument list is changed, BnPowerManager's corresponding serialization code (if any) in
    // frameworks/native/services/powermanager/IPowerManager.cpp must be updated.
    void acquireWakeLock(IBinder lock, int flags, String tag, String packageName, in WorkSource ws,
            String historyTag);
    void acquireWakeLockWithUid(IBinder lock, int flags, String tag, String packageName,
@@ -78,6 +73,12 @@ interface IPowerManager
    void setStayOnSetting(int val);
    void boostScreenBrightness(long time);

    // Do not use, will be deprecated soon.  b/151831987
    oneway void acquireWakeLockAsync(IBinder lock, int flags, String tag, String packageName,
            in WorkSource ws, String historyTag);
    oneway void releaseWakeLockAsync(IBinder lock, int flags);
    oneway void updateWakeLockUidsAsync(IBinder lock, in int[] uids);

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

@@ -97,4 +98,27 @@ interface IPowerManager

    // Forces the system to suspend even if there are held wakelocks.
    boolean forceSuspend();

    const int LOCATION_MODE_NO_CHANGE = 0;
    const int LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 1;
    const int LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 2;
    const int LOCATION_MODE_FOREGROUND_ONLY = 3;
    const int LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 4;
    const int MIN_LOCATION_MODE = 0;
    const int MAX_LOCATION_MODE = 4;

    const int GO_TO_SLEEP_REASON_MIN = 0;
    const int GO_TO_SLEEP_REASON_APPLICATION = 0;
    const int GO_TO_SLEEP_REASON_TIMEOUT = 2;
    const int GO_TO_SLEEP_REASON_LID_SWITCH = 3;
    const int GO_TO_SLEEP_REASON_POWER_BUTTON = 4;
    const int GO_TO_SLEEP_REASON_HDMI = 5;
    const int GO_TO_SLEEP_REASON_SLEEP_BUTTON = 6;
    const int GO_TO_SLEEP_REASON_ACCESSIBILITY = 7;
    const int GO_TO_SLEEP_REASON_FORCE_SUSPEND = 8;
    const int GO_TO_SLEEP_REASON_INATTENTIVE = 9;
    const int GO_TO_SLEEP_REASON_QUIESCENT = 10;
    const int GO_TO_SLEEP_REASON_MAX = 10;
    const int GO_TO_SLEEP_FLAG_NO_DOZE = 1 << 0;

}
+1 −1
Original line number Diff line number Diff line
@@ -16,4 +16,4 @@

package android.os;

parcelable PowerSaveState;
 No newline at end of file
parcelable PowerSaveState cpp_header "android/PowerSaveState.h";
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -15,4 +15,4 @@

package android.os;

parcelable WorkSource;
parcelable WorkSource cpp_header "android/WorkSource.h";
Loading