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:4b32b0bd6876ecc25d60d95431763bf618699880 Merged-In: I417cec27697a210416027e862a5e5d207d268b82 Change-Id: I417cec27697a210416027e862a5e5d207d268b82