diff options
| author | 2017-10-05 00:42:18 +0000 | |
|---|---|---|
| committer | 2017-10-05 00:42:18 +0000 | |
| commit | e805aa265f6b41ad7c7a19dfff449acd6ca96acd (patch) | |
| tree | 0a845bb95b52b7b264b477c95da103f05f3fcad2 | |
| parent | 22113f0423f840319d4807fb502f2f364b8cc9f9 (diff) | |
| parent | 31ef7f3ab69d62c6820f9d56a68f0b5a4c277cf8 (diff) | |
Merge "[framework] Compile secondary dex files in isolation" into oc-mr1-dev am: 446e8babd6
am: 31ef7f3ab6
Change-Id: I547b7c8a1755b83811c09ad33aea6c5c2fe9b5aa
| -rw-r--r-- | services/core/java/com/android/server/pm/PackageDexOptimizer.java | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java index 925f595fc9d4..8ebeeae23476 100644 --- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java +++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java @@ -365,18 +365,13 @@ public class PackageDexOptimizer { + " dexoptFlags=" + printDexoptFlags(dexoptFlags) + " target-filter=" + compilerFilter); - String classLoaderContext; - if (dexUseInfo.isUnknownClassLoaderContext() || - dexUseInfo.isUnsupportedClassLoaderContext() || - dexUseInfo.isVariableClassLoaderContext()) { - // If we have an unknown (not yet set), unsupported (custom class loaders), or a - // variable class loader chain, compile without a context and mark the oat file with - // SKIP_SHARED_LIBRARY_CHECK. Note that his might lead to a incorrect compilation. - // TODO(calin): We should just extract in this case. - classLoaderContext = SKIP_SHARED_LIBRARY_CHECK; - } else { - classLoaderContext = dexUseInfo.getClassLoaderContext(); - } + // TODO(calin): b/64530081 b/66984396. Use SKIP_SHARED_LIBRARY_CHECK for the context + // (instead of dexUseInfo.getClassLoaderContext()) in order to compile secondary dex files + // in isolation (and avoid to extract/verify the main apk if it's in the class path). + // Note this trades correctness for performance since the resulting slow down is + // unacceptable in some cases until b/64530081 is fixed. + String classLoaderContext = SKIP_SHARED_LIBRARY_CHECK; + try { for (String isa : dexUseInfo.getLoaderIsas()) { // Reuse the same dexopt path as for the primary apks. We don't need all the |