Merge "Adjust forced dexopt in case of stripped APKs." am: 5669550a83 am: f59dd816b1 am: 8d76994c5b
am: 384683ef0a
Change-Id: I3f3a130059f0f878f2c84b368a2f12cc86076b67
This commit is contained in:
@@ -634,9 +634,13 @@ public class PackageDexOptimizer {
|
||||
|
||||
@Override
|
||||
protected int adjustDexoptNeeded(int dexoptNeeded) {
|
||||
// Ensure compilation, no matter the current state.
|
||||
// TODO: The return value is wrong when patchoat is needed.
|
||||
return DexFile.DEX2OAT_FROM_SCRATCH;
|
||||
if (dexoptNeeded == DexFile.NO_DEXOPT_NEEDED) {
|
||||
// Ensure compilation by pretending a compiler filter change on the
|
||||
// apk/odex location (the reason for the '-'. A positive value means
|
||||
// the 'oat' location).
|
||||
return -DexFile.DEX2OAT_FOR_FILTER;
|
||||
}
|
||||
return dexoptNeeded;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user