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

Commit 24f516cf authored by Martijn Coenen's avatar Martijn Coenen Committed by Automerger Merge Worker
Browse files

Merge "Enable default stopped state for system apps" into udc-dev am:...

Merge "Enable default stopped state for system apps" into udc-dev am: b1c7e145 am: 6de909b1 am: e9252c37

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



Change-Id: Ibd51e7654b096d5721f7df2b4dca697a91cd2865
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c7d0751f e9252c37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6415,7 +6415,7 @@
        Packages can be added by OEMs in an allowlist, to prevent them from being scanned as
        "stopped" during initial boot of a device, or after an OTA update. Stopped state of
        an app is not changed during subsequent reboots.  -->
    <bool name="config_stopSystemPackagesByDefault">false</bool>
    <bool name="config_stopSystemPackagesByDefault">true</bool>

    <!-- Whether to show weather on the lock screen by default. -->
    <bool name="config_lockscreenWeatherEnabledByDefault">false</bool>
+14 −4
Original line number Diff line number Diff line
@@ -4360,12 +4360,22 @@ final class InstallPackageHelper {

        // A new application appeared on /system, and we are seeing it for the first time.
        // Its also not updated as we don't have a copy of it on /data. So, scan it in a
        // STOPPED state. Ignore if it's an APEX package since stopped state does not affect them.
        // STOPPED state.
        // We'll skip this step under the following conditions:
        //   - It's "android"
        //   - It's an APEX or overlay package since stopped state does not affect them.
        //   - It is enumerated with a <initial-package-state> tag having the stopped attribute
        //     set to false
        final boolean isApexPkg = (scanFlags & SCAN_AS_APEX) != 0;
        if (mPm.mShouldStopSystemPackagesByDefault && scanSystemPartition
                && !pkgAlreadyExists && !isApexPkg) {
        if (mPm.mShouldStopSystemPackagesByDefault
                && scanSystemPartition
                && !pkgAlreadyExists
                && !isApexPkg
                && !parsedPackage.isOverlayIsStatic()
        ) {
            String packageName = parsedPackage.getPackageName();
            if (!mPm.mInitialNonStoppedSystemPackages.contains(packageName)) {
            if (!mPm.mInitialNonStoppedSystemPackages.contains(packageName)
                    && !"android".contentEquals(packageName)) {
                scanFlags |= SCAN_AS_STOPPED_SYSTEM_APP;
            }
        }