Merge "Fix security check for private allocateAppWidgetId api" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9b93f4def1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user