[RESTRICT AUTOMERGE][pm] still allow debuggable for system app downgrades
Turns out we do have internal tests that downgrades system apps, so adding this exception to allow for that.
BUG: 267232653
BUG: 256202273
Test: manual
Change-Id: Ie281bbdc8788ee64ff99a7c5150da7ce7926235e
(cherry picked from commit ceeca68b8c)
This commit is contained in:
committed by
Song Chun Fan
parent
858113a72b
commit
b050c4ba02
@@ -15029,6 +15029,9 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
if (disabledPs != null) {
|
if (disabledPs != null) {
|
||||||
dataOwnerPkg = disabledPs.pkg;
|
dataOwnerPkg = disabledPs.pkg;
|
||||||
}
|
}
|
||||||
|
if (!Build.IS_DEBUGGABLE && !dataOwnerPkg.isDebuggable()) {
|
||||||
|
// Only restrict non-debuggable builds and non-debuggable version of
|
||||||
|
// the app
|
||||||
try {
|
try {
|
||||||
checkDowngrade(dataOwnerPkg, pkgLite);
|
checkDowngrade(dataOwnerPkg, pkgLite);
|
||||||
} catch (PackageManagerException e) {
|
} catch (PackageManagerException e) {
|
||||||
@@ -15041,6 +15044,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (installedPkg != null) {
|
if (installedPkg != null) {
|
||||||
if ((installFlags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
|
if ((installFlags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user