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

Commit 36dea102 authored by Steve Kondik's avatar Steve Kondik
Browse files

pm: Don't try to create oat dirs for prebundled apps on system

 * Because it's obviously not possible. Add a special case for these.
 * Eliminates the persistent "Starting Android..." on every boot.

Change-Id: I7d3005e1093d5c5854357b7fd9c2676b089ebb83
parent 69668f11
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.Nullable;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageParser;
import android.os.Environment;
import android.os.PowerManager;
import android.os.UserHandle;
import android.os.WorkSource;
@@ -224,6 +225,11 @@ final class PackageDexOptimizer {
        File codePath = new File(pkg.codePath);
        if (codePath.isDirectory()) {
            File oatDir = getOatDir(codePath);
            // skip the prebundled apps dir since it's actually read-only
            if (oatDir.getAbsolutePath().startsWith(
                        Environment.getPrebundledDirectory().getAbsolutePath())) {
                return null;
            }
            mPackageManagerService.mInstaller.createOatDir(oatDir.getAbsolutePath(),
                    dexInstructionSet);
            return oatDir.getAbsolutePath();