[pm] allow debuggable apps to be downgraded on release builds
By preserving the INSTALL_REQUEST_DOWNGRADE flag throughout the installation session, we can check whether the app is debuggable and downgradable at a later stage of the installation during isDowngradePermitted(). If the app is debuggable and the downgrade has been requested, the installation should be allowed. BUG: 272769908 Test: atest CtsPermissionTestCases android.permission.cts.LocationAccessCheckTest#notificationIsNotShownAfterAppDoesNotRequestLocationAnymore Change-Id: Ic5d9c7b65a70ba343a0bb1c5405537fc37f7ec8c
This commit is contained in:
@@ -724,7 +724,6 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
|
||||
params.installFlags |= PackageManager.INSTALL_ALLOW_DOWNGRADE;
|
||||
} else {
|
||||
params.installFlags &= ~PackageManager.INSTALL_ALLOW_DOWNGRADE;
|
||||
params.installFlags &= ~PackageManager.INSTALL_REQUEST_DOWNGRADE;
|
||||
}
|
||||
|
||||
if (mDisableVerificationForUid != INVALID_UID) {
|
||||
|
||||
Reference in New Issue
Block a user