Loading
[UidMigration] fix update uninstallation with sharedUserMaxSdkVersion
When a system app is re-enabled after the update is uninstalled, when the system app has shared uid, the current code doesn't support directly reusing the disabled package setting. Instead, the preloaded version is re-scanned and installed as a new app, which can bring breaking behavior of changed UIDs when the manifest has sharedUserMaxSdkVersion. This change fixes the bug where registerExistingAppId fails when it comes to shared uid, therefore directly reuses the disabled package setting, consistent with the behavior for non-shared-uid system apps. FLAG: EXEMPT BUGFIX Test: manually with system-app-test.sh BUG: 454062218 (cherry picked from commit 6b5ea2f7fbf50313d46e54e0d8f8c18c398e4869) Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:445138b31bc4a08afa70dcae78850d3958dbae97 Merged-In: I1add6ba4a9c0a30a1c029974e70c21eb7a0fe5d5 Change-Id: I1add6ba4a9c0a30a1c029974e70c21eb7a0fe5d5