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

Unified Diff: base/android/java/src/org/chromium/base/BuildInfo.java

Issue 1187433006: Load language .pak files directly from the apk when using splits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@locale-res-or-file
Patch Set: Created 5 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
Index: base/android/java/src/org/chromium/base/BuildInfo.java
diff --git a/base/android/java/src/org/chromium/base/BuildInfo.java b/base/android/java/src/org/chromium/base/BuildInfo.java
index 54f611d5092ea4595f5d07b6345952d039bd144f..6964ec430ad952977aa107216c9cb56f0326a1a1 100644
--- a/base/android/java/src/org/chromium/base/BuildInfo.java
+++ b/base/android/java/src/org/chromium/base/BuildInfo.java
@@ -4,6 +4,7 @@
package org.chromium.base;
+import android.annotation.TargetApi;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
@@ -122,4 +123,14 @@ public class BuildInfo {
public static int getSdkInt() {
return Build.VERSION.SDK_INT;
}
+
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ @CalledByNative
+ public static boolean hasApkSplits(Context context) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
+ return false;
+ }
+ ApplicationInfo appInfo = context.getApplicationInfo();
+ return appInfo.splitSourceDirs != null && appInfo.splitSourceDirs.length > 0;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698