Add sys config to handle apexes that are allowed to be updated
Unlike staged installer check, we can't check if given APEX package is allowed to be updated at session creation time, since we don't have knowledge of the package being installed yet. Instead, the check is implemented in PackageInstallerSession#handleInstall. Like staged install check, allowed apex update check has similar exemptions (adb is allowed to update any APEX, `adb shell pm --bypass-allowed-apex-update-check` makes next install session bypass the check). In order to implement these exemptions, a new INSTALL_DISABLE_ALLOWED_APEX_UPDATE_CHECK flag that can only be set by system is added. PackageInstallerSession will skip the APEX update checks if INSTALL_DISABLE_ALLOWED_APEX_UPDATE_CHECK is set. Bug: 189274479 Test: atest CtsStagedInstallHostTestCases Test: atest GtsStagedInstallHostTestCases Test: atest FrameworksServicesTests:SystemConfigTest Change-Id: I22921a3ac4d43011b565733d7a7183e5cdb4fe80 Merged-In: I22921a3ac4d43011b565733d7a7183e5cdb4fe80 (cherry picked from commit aafaaec0)
Loading
Please register or sign in to comment