Don't allow downgrade of apexes unless INSTALL_ALLOW_DOWNGRADE is set
Extracted check on whenever downgrades are allowed to
PackageManagerServiceUtils# isDowngradePermitteisDowngradePermitted
method to share it between PackageManagerService and StagingManager.
E2E test will happen in a follow-up CL. Need to refactor
ApexE2EBaseHostTest a bit before.
Bug: 124859257
Test: manually tried to downgrade using adb install with and without -d
Change-Id: Iaf0110965a4e7a82ae07f708368807aaac8cc4ec
3 files changed