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

Commit 18d95418 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

OtaDexopt: Special-case system app classpaths am: 3f95d0bb

am: 6c22810f

Change-Id: Id9b936123e43c0ced3f1ab4f4aab629b707562a1
parents be1adf2e 6c22810f
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 */);