summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-04-03 20:49:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-03 20:49:57 +0000
commit5d5902d140040936fa6aa7e443220140af0e9843 (patch)
treecfc9a20d5497876e4bee650fdce84c708a326507 /services
parent35fc6a02aeded9578375af5828e14043164028d5 (diff)
parentef640cdfb29caf9d0abf4aba020afbc3eb3e0443 (diff)
downloadframeworks_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.java3
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);
}