diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-08-18 17:14:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-16 03:56:00 +0000 |
commit | 89e4ae2f504b4c55d7823c3f04d4894de0d8e471 (patch) | |
tree | a673760a24d19882b1809c51c3ac0ff9e967fb85 /services/core/java/com/android/server/power | |
parent | 57137289a2798b8c19f1e9f16bd3f0a71f1b916a (diff) | |
parent | d953c53d3b04d772bb1b62ede1c2011641ca82b5 (diff) | |
download | frameworks_base-89e4ae2f504b4c55d7823c3f04d4894de0d8e471.zip frameworks_base-89e4ae2f504b4c55d7823c3f04d4894de0d8e471.tar.gz frameworks_base-89e4ae2f504b4c55d7823c3f04d4894de0d8e471.tar.bz2 |
Merge "Work on issue #16629489: Google (Play?) Services eating through battery" into lmp-dev
Diffstat (limited to 'services/core/java/com/android/server/power')
-rw-r--r-- | services/core/java/com/android/server/power/PowerManagerService.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java index 41db2c3..9734bd4 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java @@ -862,7 +862,8 @@ public final class PowerManagerService extends com.android.server.SystemService } } - private void updateWakeLockWorkSourceInternal(IBinder lock, WorkSource ws, String historyTag) { + private void updateWakeLockWorkSourceInternal(IBinder lock, WorkSource ws, String historyTag, + int callingUid) { synchronized (mLock) { int index = findWakeLockIndexLocked(lock); if (index < 0) { @@ -870,7 +871,8 @@ public final class PowerManagerService extends com.android.server.SystemService Slog.d(TAG, "updateWakeLockWorkSourceInternal: lock=" + Objects.hashCode(lock) + " [not found], ws=" + ws); } - throw new IllegalArgumentException("Wake lock not active"); + throw new IllegalArgumentException("Wake lock not active: " + lock + + " from uid " + callingUid); } WakeLock wakeLock = mWakeLocks.get(index); @@ -2834,9 +2836,10 @@ public final class PowerManagerService extends com.android.server.SystemService ws = null; } + final int callingUid = Binder.getCallingUid(); final long ident = Binder.clearCallingIdentity(); try { - updateWakeLockWorkSourceInternal(lock, ws, historyTag); + updateWakeLockWorkSourceInternal(lock, ws, historyTag, callingUid); } finally { Binder.restoreCallingIdentity(ident); } |