summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-07-07 10:26:42 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-07 10:26:42 +0000
commit23902f5f4d0d6665d6837d3d085d3c11b5aa1ec0 (patch)
treec3b8ee550ca4d07abdc2588c4675612177d79cde /libs
parente8e61e09353e2a1deb5b6d9f545ba6dfa20e9f64 (diff)
parent10eb3b0665dd7c636af5f0d657512c1a2e309e0c (diff)
downloadframeworks_base-23902f5f4d0d6665d6837d3d085d3c11b5aa1ec0.zip
frameworks_base-23902f5f4d0d6665d6837d3d085d3c11b5aa1ec0.tar.gz
frameworks_base-23902f5f4d0d6665d6837d3d085d3c11b5aa1ec0.tar.bz2
am 10eb3b06: am e0849423: am 501bb0a5: Merge "Fix issue when converting fil->tl."
* commit '10eb3b0665dd7c636af5f0d657512c1a2e309e0c': Fix issue when converting fil->tl.
Diffstat (limited to 'libs')
-rw-r--r--libs/androidfw/AssetManager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index 19265f6..4ba20d7 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -376,7 +376,6 @@ void AssetManager::setLocaleLocked(const char* locale)
delete[] mLocale;
}
-
// If we're attempting to set a locale that starts with "fil",
// we should convert it to "tl" for backwards compatibility since
// we've been using "tl" instead of "fil" prior to L.
@@ -385,7 +384,10 @@ void AssetManager::setLocaleLocked(const char* locale)
// instead of attempting a fallback.
if (strncmp(locale, kFilPrefix, kFilPrefixLen) == 0) {
Vector<String8> locales;
- getLocales(&locales);
+ ResTable* res = mResources;
+ if (res != NULL) {
+ res->getLocales(&locales);
+ }
const size_t localesSize = locales.size();
bool hasFil = false;
for (size_t i = 0; i < localesSize; ++i) {