From d983ba5cac232c01dff818556b57f497f7d99854 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Thu, 3 Oct 2013 08:49:36 -0700 Subject: Add PowerManager method to assign blame to a single uid Currently used by audioflinger to account for recording wakelocks. b/10985160 Change-Id: I18fc8487f2a197bf02b5269a4bcae9e75b6c2207 --- services/java/com/android/server/power/PowerManagerService.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'services') diff --git a/services/java/com/android/server/power/PowerManagerService.java b/services/java/com/android/server/power/PowerManagerService.java index fe09a33..4407de6 100644 --- a/services/java/com/android/server/power/PowerManagerService.java +++ b/services/java/com/android/server/power/PowerManagerService.java @@ -579,6 +579,12 @@ public final class PowerManagerService extends IPowerManager.Stub } @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) { if (lock == null) { -- cgit v1.1