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

Commit dc51f5fb authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Remove the "android" package from dexopting." into udc-dev am:...

Merge "Merge "Remove the "android" package from dexopting." into udc-dev am: bc95ba32 am: c06af1b5"
parents 03b29c39 a40c2f03
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -745,6 +745,9 @@ public final class DexOptHelper {
        applyPackageFilter(snapshot, remainingPredicate, result, remainingPkgSettings, sortTemp,
        applyPackageFilter(snapshot, remainingPredicate, result, remainingPkgSettings, sortTemp,
                packageManagerService);
                packageManagerService);


        // Make sure the system server isn't in the result, because it can never be dexopted here.
        result.removeIf(pkgSetting -> PLATFORM_PACKAGE_NAME.equals(pkgSetting.getPackageName()));

        if (debug) {
        if (debug) {
            Log.i(TAG, "Packages to be dexopted: " + packagesToString(result));
            Log.i(TAG, "Packages to be dexopted: " + packagesToString(result));
            Log.i(TAG, "Packages skipped from dexopt: " + packagesToString(remainingPkgSettings));
            Log.i(TAG, "Packages skipped from dexopt: " + packagesToString(remainingPkgSettings));
+3 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@ import static android.content.pm.PackageManager.FLAG_PERMISSION_USER_FIXED;
import static android.content.pm.PackageManager.FLAG_PERMISSION_USER_SET;
import static android.content.pm.PackageManager.FLAG_PERMISSION_USER_SET;


import static com.android.server.LocalManagerRegistry.ManagerNotFoundException;
import static com.android.server.LocalManagerRegistry.ManagerNotFoundException;
import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;


import android.accounts.IAccountManager;
import android.accounts.IAccountManager;
import android.annotation.NonNull;
import android.annotation.NonNull;
@@ -1954,6 +1955,8 @@ class PackageManagerShellCommand extends ShellCommand {
        List<String> packageNames = null;
        List<String> packageNames = null;
        if (allPackages) {
        if (allPackages) {
            packageNames = mInterface.getAllPackages();
            packageNames = mInterface.getAllPackages();
            // Compiling the system server is only supported from odrefresh, so skip it.
            packageNames.removeIf(packageName -> PLATFORM_PACKAGE_NAME.equals(packageName));
        } else {
        } else {
            String packageName = getNextArg();
            String packageName = getNextArg();
            if (packageName == null) {
            if (packageName == null) {