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

Unified Diff: ui/android/java/src/org/chromium/ui/base/ResourceBundle.java

Issue 2404043002: Revert of Store only locale paks rather than all assets within BuildConfig.java (Closed)
Patch Set: Created 4 years, 2 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 | « build/config/android/rules.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/ResourceBundle.java
diff --git a/ui/android/java/src/org/chromium/ui/base/ResourceBundle.java b/ui/android/java/src/org/chromium/ui/base/ResourceBundle.java
index c1965b4b77c707e4b45b922e4827567b404f5a9a..bc82307fcebac87f799629f8850526b231069f04 100644
--- a/ui/android/java/src/org/chromium/ui/base/ResourceBundle.java
+++ b/ui/android/java/src/org/chromium/ui/base/ResourceBundle.java
@@ -8,6 +8,7 @@
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
+import java.io.File;
import java.util.Arrays;
/**
@@ -16,10 +17,13 @@
*/
@JNINamespace("ui")
public class ResourceBundle {
+ private static final String ASSET_DIR = "assets";
+
@CalledByNative
private static String getLocalePakResourcePath(String locale) {
- if (Arrays.binarySearch(BuildConfig.UNCOMPRESSED_LOCALES, locale) >= 0) {
- return "assets/" + locale + ".pak";
+ String fileName = locale + ".pak";
+ if (Arrays.binarySearch(BuildConfig.UNCOMPRESSED_ASSETS, fileName) >= 0) {
+ return new File(ASSET_DIR, fileName).toString();
}
return null;
}
« no previous file with comments | « build/config/android/rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698