Index: build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java |
diff --git a/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java b/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java |
index ac51be9e9a656ca385fbc987ae8ad7451aaf412a..2253ba1bfe7ddd6da3390beac8c52a2f4e27ec41 100644 |
--- a/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java |
+++ b/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java |
@@ -231,7 +231,8 @@ final class ClassLoaderPatcher { |
for (int i = 0; i < files.length; ++i) { |
File file = files[i]; |
Object dexFile; |
- if ("N".equals(Build.VERSION.CODENAME)) { |
+ if (Build.VERSION.CODENAME.equals("N") |
+ || Build.VERSION.SDK_INT > Build.VERSION_CODES.M) { |
// loadDexFile requires that ret contain all previously added elements. |
dexFile = Reflect.invokeMethod(clazz, "loadDexFile", file, optimizedDirectory, |
mClassLoader, ret); |