Call getPackageInfo() with cleared calling identity in ensureSystemPackageName(). am: e693b797bc
Change-Id: I1061e87f4d472ae30c94ad13e0915a49258b3a6d
This commit is contained in:
@@ -20628,8 +20628,13 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
if (packageName == null) {
|
||||
return null;
|
||||
}
|
||||
if (getPackageInfo(packageName, MATCH_FACTORY_ONLY, UserHandle.USER_SYSTEM) == null) {
|
||||
return null;
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
if (getPackageInfo(packageName, MATCH_FACTORY_ONLY, UserHandle.USER_SYSTEM) == null) {
|
||||
return null;
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
return packageName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user