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 1c9a2138b8b217d5e567d8851cdc0a686c3d57b5..c382799003489ba328a4b60fd7290c5218b53554 100644 |
--- a/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java |
+++ b/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java |
@@ -150,11 +150,11 @@ |
// Switched from an array to an ArrayList in Lollipop. |
if (currentDirs instanceof List) { |
List<File> dirsAsList = (List<File>) currentDirs; |
- dirsAsList.add(0, nativeLibDir); |
+ dirsAsList.add(nativeLibDir); |
} else { |
File[] dirsAsArray = (File[]) currentDirs; |
Reflect.setField(dexPathList, "nativeLibraryDirectories", |
- Reflect.concatArrays(newDirs, dirsAsArray)); |
+ Reflect.concatArrays(dirsAsArray, newDirs)); |
} |
Object[] nativeLibraryPathElements; |
@@ -168,7 +168,7 @@ |
Object[] additionalElements = makeNativePathElements(newDirs); |
Reflect.setField( |
dexPathList, "nativeLibraryPathElements", |
- Reflect.concatArrays(additionalElements, nativeLibraryPathElements)); |
+ Reflect.concatArrays(nativeLibraryPathElements, additionalElements)); |
} |
private static void copyChangedFiles(File srcDir, File dstDir) throws IOException { |