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

Commit f59dd816 authored by Nicolas Geoffray's avatar Nicolas Geoffray Committed by android-build-merger
Browse files

Merge "Adjust forced dexopt in case of stripped APKs."

am: 5669550a

Change-Id: I1ca14c8eee35cb3f793b2a004f5bd6f6b8ca6120
parents 0f722b52 5669550a
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -549,9 +549,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