diff options
author | Steve Kondik <steve@cyngn.com> | 2015-12-16 01:44:34 -0500 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-12-16 01:45:41 -0500 |
commit | 36dea102342f686b6caad89a358745d9f2e72071 (patch) | |
tree | 58b129f32997b5dbc8ee0e70e9a8ca58d335e32b /services | |
parent | 69668f1178435acff1a9295d0d27b70f9a7989fa (diff) | |
download | frameworks_base-36dea102342f686b6caad89a358745d9f2e72071.zip frameworks_base-36dea102342f686b6caad89a358745d9f2e72071.tar.gz frameworks_base-36dea102342f686b6caad89a358745d9f2e72071.tar.bz2 |
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
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageDexOptimizer.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java index b692def..f73cb0a 100644 --- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java +++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java @@ -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(); |