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:740256b41ba113708655f82dc5664291bf79edd0 Merged-In: I417cec27697a210416027e862a5e5d207d268b82 Change-Id: I417cec27697a210416027e862a5e5d207d268b82