Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24ab5f29 authored by Songchun Fan's avatar Songchun Fan Committed by Presubmit Automerger Backend
Browse files

[automerge] [RESTRICT AUTOMERGE][pm] still allow debuggable for system app...

[automerge] [RESTRICT AUTOMERGE][pm] still allow debuggable for system app downgrades 2p: 636cdf22

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21266989

Bug: 267232653
Bug: 256202273
Change-Id: Iba1c01bf07da821a05d3439df54e811ccfdf4505
parents d1e75ee9 636cdf22
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -26891,10 +26891,13 @@ public class PackageManagerService extends IPackageManager.Stub
                    if (disabledPs != null) {
                        dataOwnerPkg = disabledPs.getPkg();
                    }
                    if (!Build.IS_DEBUGGABLE && !dataOwnerPkg.isDebuggable()) {
                        // Only restrict non-debuggable builds and non-debuggable version of the app
                        try {
                            checkDowngrade(dataOwnerPkg, pkgLite);
                        } catch (PackageManagerException e) {
                        String errorMsg = "System app: " + packageName + " cannot be downgraded to"
                            String errorMsg = "System app: " + packageName
                                    + " cannot be downgraded to"
                                    + " older than its preloaded version on the system image. "
                                    + e.getMessage();
                            Slog.w(TAG, errorMsg);
@@ -26903,6 +26906,7 @@ public class PackageManagerService extends IPackageManager.Stub
                    }
                }
            }
        }
        return PackageManager.INSTALL_SUCCEEDED;
    }