Merge "Adjust forced dexopt in case of stripped APKs." am: 5669550a83 am: f59dd816b1

am: 8d76994c5b

Change-Id: I87acb3200de0e731eab78107d30c3c8999674c6d
This commit is contained in:
Nicolas Geoffray
2017-05-04 11:53:58 +00:00
committed by android-build-merger

View File

@@ -634,9 +634,13 @@ public class PackageDexOptimizer {
@Override @Override
protected int adjustDexoptNeeded(int dexoptNeeded) { protected int adjustDexoptNeeded(int dexoptNeeded) {
// Ensure compilation, no matter the current state. if (dexoptNeeded == DexFile.NO_DEXOPT_NEEDED) {
// TODO: The return value is wrong when patchoat is needed. // Ensure compilation by pretending a compiler filter change on the
return DexFile.DEX2OAT_FROM_SCRATCH; // apk/odex location (the reason for the '-'. A positive value means
// the 'oat' location).
return -DexFile.DEX2OAT_FOR_FILTER;
}
return dexoptNeeded;
} }
@Override @Override