diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-04-03 20:49:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-03 20:49:57 +0000 |
commit | 5d5902d140040936fa6aa7e443220140af0e9843 (patch) | |
tree | cfc9a20d5497876e4bee650fdce84c708a326507 /services | |
parent | 35fc6a02aeded9578375af5828e14043164028d5 (diff) | |
parent | ef640cdfb29caf9d0abf4aba020afbc3eb3e0443 (diff) | |
download | frameworks_base-5d5902d140040936fa6aa7e443220140af0e9843.zip frameworks_base-5d5902d140040936fa6aa7e443220140af0e9843.tar.gz frameworks_base-5d5902d140040936fa6aa7e443220140af0e9843.tar.bz2 |
Merge "Don't allow -1 uids for wake locks."
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/power/PowerManagerService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java index a388318..80c3c8e 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java @@ -2541,6 +2541,9 @@ public final class PowerManagerService extends com.android.server.SystemService @Override // Binder call public void acquireWakeLockWithUid(IBinder lock, int flags, String tag, String packageName, int uid) { + if (uid < 0) { + uid = Binder.getCallingUid(); + } acquireWakeLock(lock, flags, tag, packageName, new WorkSource(uid), null); } |