| 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 179e4d60fb73ffdca37c893fc943b834cd70fdab..2a4b19fb12dcbcc2c7fc03455ae49122a22421a6 100644
|
| --- a/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java
|
| +++ b/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java
|
| @@ -221,7 +221,7 @@ final class ClassLoaderPatcher {
|
| private static Object[] makeNativePathElements(File[] paths)
|
| throws ReflectiveOperationException {
|
| Object[] entries = new Object[paths.length];
|
| - if (Build.VERSION.CODENAME.startsWith("O")) {
|
| + if (Build.VERSION.SDK_INT >= 26) {
|
| Class<?> entryClazz = Class.forName("dalvik.system.DexPathList$NativeLibraryElement");
|
| for (int i = 0; i < paths.length; ++i) {
|
| entries[i] = Reflect.newInstance(entryClazz, paths[i]);
|
| @@ -253,7 +253,7 @@ final class ClassLoaderPatcher {
|
| dexFile = Reflect.invokeMethod(clazz, "loadDexFile", file, optimizedDirectory);
|
| }
|
| Object dexElement;
|
| - if (Build.VERSION.CODENAME.startsWith("O")) {
|
| + if (Build.VERSION.SDK_INT >= 26) {
|
| dexElement = Reflect.newInstance(entryClazz, dexFile, file);
|
| } else {
|
| dexElement = Reflect.newInstance(entryClazz, emptyDir, false, file, dexFile);
|
|
|