Merge "[PackageManagerService]:Fix system app can't uninstall apps silently" into oc-dev

This commit is contained in:
Sudheer Shanka
2017-05-25 19:17:44 +00:00
committed by Android (Google) Code Review

View File

@@ -18371,7 +18371,7 @@ public class PackageManagerService extends IPackageManager.Stub
private boolean isCallerAllowedToSilentlyUninstall(int callingUid, String pkgName) {
if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID
|| callingUid == Process.SYSTEM_UID) {
|| UserHandle.getAppId(callingUid) == Process.SYSTEM_UID) {
return true;
}
final int callingUserId = UserHandle.getUserId(callingUid);