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

Commit 95867a65 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Add PowerManager method to assign blame to a single uid" into klp-dev

parents 8e0ca288 d983ba5c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -23,9 +23,10 @@ import android.os.WorkSource;

interface IPowerManager
{
    // WARNING: The first two methods must remain the first two methods because their
    // WARNING: The first three methods must remain the first three methods because their
    // transaction numbers must not change unless IPowerManager.cpp is also updated.
    void acquireWakeLock(IBinder lock, int flags, String tag, String packageName, in WorkSource ws);
    void acquireWakeLockWithUid(IBinder lock, int flags, String tag, String packageName, int uidtoblame);
    void releaseWakeLock(IBinder lock, int flags);

    void updateWakeLockWorkSource(IBinder lock, in WorkSource ws);
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@
    <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />
    <assign-permission name="android.permission.WAKE_LOCK" uid="media" />
    <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="media" />
    <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="media" />

    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />
+6 −0
Original line number Diff line number Diff line
@@ -579,6 +579,12 @@ public final class PowerManagerService extends IPowerManager.Stub
        updatePowerStateLocked();
    }

    @Override // Binder call
    public void acquireWakeLockWithUid(IBinder lock, int flags, String tag, String packageName,
            int uid) {
        acquireWakeLock(lock, flags, tag, packageName, new WorkSource(uid));
    }

    @Override // Binder call
    public void acquireWakeLock(IBinder lock, int flags, String tag, String packageName,
            WorkSource ws) {