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

Commit 8719b6d9 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [9945838, 9945224, 9945858e, 9945662, 9944632, 9945840,...

Merge cherrypicks of [9945838, 9945224, 9945858e, 9945662, 9944632, 9945840, 9945841, 9945683, 9945684, 9945664, 9945860] into qt-qpr1-b-release

Change-Id: I0bf029b0e0e395b4620a3fb23b715719c374b2a9
parents 275afdec 28433f7f
Loading
Loading
Loading
Loading
+21 −17
Original line number Diff line number Diff line
@@ -19046,10 +19046,11 @@ public class PackageManagerService extends IPackageManager.Stub
     * Tries to delete system package.
     */
    private void deleteSystemPackageLIF(DeletePackageAction action, PackageSetting deletedPs,
            int[] allUserHandles, int flags, PackageRemovedInfo outInfo, boolean writeSettings)
            int[] allUserHandles, int flags, @Nullable PackageRemovedInfo outInfo,
            boolean writeSettings)
            throws SystemDeleteException {
        final boolean applyUserRestrictions
                = (allUserHandles != null) && (outInfo.origUsers != null);
        final boolean applyUserRestrictions =
                (allUserHandles != null) && outInfo != null && (outInfo.origUsers != null);
        final PackageParser.Package deletedPkg = deletedPs.pkg;
        // Confirm if the system package has been updated
        // An updated system app can be deleted. This will also have to restore
@@ -19070,6 +19071,7 @@ public class PackageManagerService extends IPackageManager.Stub
            }
        }
        if (outInfo != null) {
            // Delete the updated package
            outInfo.isRemovedPackageSystemUpdate = true;
            if (outInfo.removedChildPackages != null) {
@@ -19087,6 +19089,7 @@ public class PackageManagerService extends IPackageManager.Stub
                    }
                }
            }
        }
        if (disabledPs.versionCode < deletedPs.versionCode) {
            // Delete data for downgrades
@@ -19115,7 +19118,8 @@ public class PackageManagerService extends IPackageManager.Stub
        if (DEBUG_REMOVE) Slog.d(TAG, "Re-installing system package: " + disabledPs);
        try {
            installPackageFromSystemLIF(disabledPs.codePathString, allUserHandles,
                    outInfo.origUsers, deletedPs.getPermissionsState(), writeSettings);
                    outInfo == null ? null : outInfo.origUsers, deletedPs.getPermissionsState(),
                    writeSettings);
        } catch (PackageManagerException e) {
            Slog.w(TAG, "Failed to restore system package:" + deletedPkg.packageName + ": "
                    + e.getMessage());