diff options
author | Michael Jurka <mikejurka@google.com> | 2012-09-24 11:24:26 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-24 11:24:26 -0700 |
commit | 9b93f4def131845200997c861858f34cc15c8dee (patch) | |
tree | 7c16c2f719c4e1b5826ae1961c5c798e477a0772 | |
parent | 7451f15e7464fe8dd117b74c6dcff780785e0007 (diff) | |
parent | 03bdc8a8f756a951b460b01cbd4d01c2ffd05041 (diff) | |
download | frameworks_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.java | 3 |
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); |