Ignore sharedUserId when package already left shared UID
After a package has left shared UID, its non-shared UID state should be preserved after the next scan (e.g. reboot or an APK upgrade), or else the app would observe data loss. Bug: 235460457 Test: atest CtsSharedUserMigrationTestCases Change-Id: I692fe3ff59b43f2fc0ee53de0ce8a2f38cd29f02
This commit is contained in:
@@ -3701,8 +3701,9 @@ final class InstallPackageHelper {
|
||||
parsedPackage.getPackageName());
|
||||
|
||||
boolean ignoreSharedUserId = false;
|
||||
if (installedPkgSetting == null) {
|
||||
// We can directly ignore sharedUserSetting for new installs
|
||||
if (installedPkgSetting == null || !installedPkgSetting.hasSharedUser()) {
|
||||
// Directly ignore sharedUserSetting for new installs, or if the app has
|
||||
// already left shared UID
|
||||
ignoreSharedUserId = parsedPackage.isLeavingSharedUid();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user