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

Commit cdd64207 authored by Nicolas Geoffray's avatar Nicolas Geoffray Committed by android-build-merger
Browse files

Merge "resolve merge conflicts of c2421a2a to oc-dev-plus-aosp" into oc-dev-plus-aosp

am: 39fea6b6

Change-Id: I492f304537eb73c630d92de77505840cdd4f9257
parents 020e5676 39fea6b6
Loading
Loading
Loading
Loading
+4 −7
Original line number Original line Diff line number Diff line
@@ -57,6 +57,9 @@ import static com.android.server.pm.InstructionSets.getDexCodeInstructionSets;


import static com.android.server.pm.PackageManagerService.WATCHDOG_TIMEOUT;
import static com.android.server.pm.PackageManagerService.WATCHDOG_TIMEOUT;
import static com.android.server.pm.PackageManagerServiceCompilerMapping.getNonProfileGuidedCompilerFilter;
import static com.android.server.pm.PackageManagerServiceCompilerMapping.getNonProfileGuidedCompilerFilter;

import static dalvik.system.DexFile.getNonProfileGuidedCompilerFilter;
import static dalvik.system.DexFile.getSafeModeCompilerFilter;
import static dalvik.system.DexFile.isProfileGuidedCompilerFilter;
import static dalvik.system.DexFile.isProfileGuidedCompilerFilter;


/**
/**
@@ -381,13 +384,7 @@ public class PackageDexOptimizer {
        int flags = info.flags;
        int flags = info.flags;
        boolean vmSafeMode = (flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
        boolean vmSafeMode = (flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
        if (vmSafeMode) {
        if (vmSafeMode) {
            // For the compilation, it doesn't really matter what we return here because installd
            return getSafeModeCompilerFilter(targetCompilerFilter);
            // will replace the filter with 'quicken' anyway.
            // However, we return a non profile guided filter so that we simplify the logic of
            // merging profiles.
            // TODO(calin): safe mode path could be simplified if we pass 'quicken' from
            //              here rather than letting installd decide on the filter.
            return getNonProfileGuidedCompilerFilter(targetCompilerFilter);
        }
        }


        if (isProfileGuidedCompilerFilter(targetCompilerFilter) && isUsedByOtherApps) {
        if (isProfileGuidedCompilerFilter(targetCompilerFilter) && isUsedByOtherApps) {
+2 −1
Original line number Original line Diff line number Diff line
@@ -97,11 +97,12 @@ import static com.android.server.pm.InstructionSets.getPreferredInstructionSet;
import static com.android.server.pm.InstructionSets.getPrimaryInstructionSet;
import static com.android.server.pm.InstructionSets.getPrimaryInstructionSet;
import static com.android.server.pm.PackageManagerServiceCompilerMapping.getCompilerFilterForReason;
import static com.android.server.pm.PackageManagerServiceCompilerMapping.getCompilerFilterForReason;
import static com.android.server.pm.PackageManagerServiceCompilerMapping.getDefaultCompilerFilter;
import static com.android.server.pm.PackageManagerServiceCompilerMapping.getDefaultCompilerFilter;
import static com.android.server.pm.PackageManagerServiceCompilerMapping.getNonProfileGuidedCompilerFilter;
import static com.android.server.pm.PermissionsState.PERMISSION_OPERATION_FAILURE;
import static com.android.server.pm.PermissionsState.PERMISSION_OPERATION_FAILURE;
import static com.android.server.pm.PermissionsState.PERMISSION_OPERATION_SUCCESS;
import static com.android.server.pm.PermissionsState.PERMISSION_OPERATION_SUCCESS;
import static com.android.server.pm.PermissionsState.PERMISSION_OPERATION_SUCCESS_GIDS_CHANGED;
import static com.android.server.pm.PermissionsState.PERMISSION_OPERATION_SUCCESS_GIDS_CHANGED;
import static dalvik.system.DexFile.getNonProfileGuidedCompilerFilter;
import android.Manifest;
import android.Manifest;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
+0 −7
Original line number Original line Diff line number Diff line
@@ -111,11 +111,4 @@ public class PackageManagerServiceCompilerMapping {


        return value;
        return value;
    }
    }

    /**
     * Return the non-profile-guided filter corresponding to the given filter.
     */
    public static String getNonProfileGuidedCompilerFilter(String filter) {
        return DexFile.getNonProfileGuidedCompilerFilter(filter);
    }
}
}