Merge "Do not clear a shared user's permissions on an app install."
This commit is contained in:
@@ -7397,8 +7397,10 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
|
||||
if (replace) {
|
||||
ps.installPermissionsFixed = false;
|
||||
origPermissions = new PermissionsState(permissionsState);
|
||||
permissionsState.reset();
|
||||
if (!ps.isSharedUser()) {
|
||||
origPermissions = new PermissionsState(permissionsState);
|
||||
permissionsState.reset();
|
||||
}
|
||||
}
|
||||
|
||||
permissionsState.setGlobalGids(mGlobalGids);
|
||||
|
||||
@@ -74,4 +74,8 @@ final class PackageSetting extends PackageSettingBase {
|
||||
public boolean isSystem() {
|
||||
return (pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0;
|
||||
}
|
||||
|
||||
public boolean isSharedUser() {
|
||||
return sharedUser != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user