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

Commit 170cf793 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "OtaDexopt: Special-case system app classpaths am: 3f95d0bb am:...

Merge "OtaDexopt: Special-case system app classpaths am: 3f95d0bb am: 6c22810f" into nyc-dev-plus-aosp
parents 1b332aa4 18d95418
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@ public class OtaDexoptService extends IOtaDexopt.Stub {
    private final static String TAG = "OTADexopt";
    private final static boolean DEBUG_DEXOPT = true;

    // The synthetic library dependencies denoting "no checks."
    private final static String[] NO_LIBRARIES = new String[] { "&" };

    private final Context mContext;
    private final PackageManagerService mPackageManagerService;

@@ -202,7 +205,13 @@ public class OtaDexoptService extends IOtaDexopt.Stub {
        PackageDexOptimizer optimizer = new OTADexoptPackageDexOptimizer(
                collectingInstaller, mPackageManagerService.mInstallLock, mContext);

        optimizer.performDexOpt(pkg, pkg.usesLibraryFiles,
        String[] libraryDependencies = pkg.usesLibraryFiles;
        if (pkg.isSystemApp()) {
            // For system apps, we want to avoid classpaths checks.
            libraryDependencies = NO_LIBRARIES;
        }

        optimizer.performDexOpt(pkg, libraryDependencies,
                null /* ISAs */, false /* checkProfiles */,
                getCompilerFilterForReason(compilationReason),
                null /* CompilerStats.PackageStats */);