[PackageManagerService]:Fix system app can't uninstall apps silently
System app in user space except Owner user can't uninstall apps silently Bug: 62057943 Bug: 37324004 Test: manual Change-Id: Ia168a5d757b4d8ae10fe9a82fc786626a3b5b2f7 Signed-off-by: luozhanwei <luozhanwei@xiaomi.com>
This commit is contained in:
committed by
Sudheer Shanka
parent
fbc7cc849f
commit
d8e7206d94
@@ -18253,7 +18253,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);
|
||||
|
||||
Reference in New Issue
Block a user