Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2161)

Unified Diff: build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java

Issue 2921313002: Fix incremental build for Android O (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698