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

Commit c9af40a4 authored by android-build-team Robot's avatar android-build-team Robot Committed by android-build-merger
Browse files

Merge "Resets system flags when updating PackageSettings" into pi-dev am: f8f6e5af

am: 91bb146d

Change-Id: Ibb8f601122bd57972eb8b03051c166e699b3d220
parents ed786222 91bb146d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -844,7 +844,12 @@ public final class Settings {
        }
        // If what we are scanning is a system (and possibly privileged) package,
        // then make it so, regardless of whether it was previously installed only
        // in the data partition.
        // in the data partition. Reset first.
        pkgSetting.pkgFlags &= ~ApplicationInfo.FLAG_SYSTEM;
        pkgSetting.pkgPrivateFlags &= ~(ApplicationInfo.PRIVATE_FLAG_PRIVILEGED
                | ApplicationInfo.PRIVATE_FLAG_OEM
                | ApplicationInfo.PRIVATE_FLAG_VENDOR
                | ApplicationInfo.PRIVATE_FLAG_PRODUCT);
        pkgSetting.pkgFlags |= pkgFlags & ApplicationInfo.FLAG_SYSTEM;
        pkgSetting.pkgPrivateFlags |=
                pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;