summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-09-24 11:24:26 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-24 11:24:26 -0700
commit9b93f4def131845200997c861858f34cc15c8dee (patch)
tree7c16c2f719c4e1b5826ae1961c5c798e477a0772
parent7451f15e7464fe8dd117b74c6dcff780785e0007 (diff)
parent03bdc8a8f756a951b460b01cbd4d01c2ffd05041 (diff)
downloadframeworks_base-9b93f4def131845200997c861858f34cc15c8dee.zip
frameworks_base-9b93f4def131845200997c861858f34cc15c8dee.tar.gz
frameworks_base-9b93f4def131845200997c861858f34cc15c8dee.tar.bz2
Merge "Fix security check for private allocateAppWidgetId api" into jb-mr1-dev
-rw-r--r--services/java/com/android/server/AppWidgetServiceImpl.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java
index fcc8a06..fa8f4b4 100644
--- a/services/java/com/android/server/AppWidgetServiceImpl.java
+++ b/services/java/com/android/server/AppWidgetServiceImpl.java
@@ -1398,8 +1398,7 @@ class AppWidgetServiceImpl {
int enforceSystemOrCallingUid(String packageName) throws IllegalArgumentException {
int callingUid = Binder.getCallingUid();
- int uid = Process.myUid();
- if (UserHandle.getAppId(uid) == Process.SYSTEM_UID || uid == 0) {
+ if (UserHandle.getAppId(callingUid) == Process.SYSTEM_UID || callingUid == 0) {
return callingUid;
}
return enforceCallingUid(packageName);