summaryrefslogtreecommitdiff
path: root/tools/aapt/AaptAssets.cpp
diff options
context:
space:
mode:
author Roozbeh Pournader <roozbeh@google.com> 2016-03-03 23:45:22 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-03-03 23:45:24 +0000
commit950c9f2a95eabe3d9e50a58b11cdecb7ff857555 (patch)
tree6f5e1e558e812fe64ac694fdd83bbe86f964ff16 /tools/aapt/AaptAssets.cpp
parent4a6688371fd8992c0ac9e97015bcb1128efece50 (diff)
parent7960898f6f886aadda1dd3d7a89106dde9f44217 (diff)
Merge "Fix script-related parts of locale resource matching" into nyc-dev
Diffstat (limited to 'tools/aapt/AaptAssets.cpp')
-rw-r--r--tools/aapt/AaptAssets.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 3b01827e13d8..cbd8480efc12 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -373,7 +373,7 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
void AaptLocaleValue::initFromResTable(const ResTable_config& config) {
config.unpackLanguage(language);
config.unpackRegion(region);
- if (config.localeScriptWasProvided) {
+ if (config.localeScript[0] && !config.localeScriptWasComputed) {
memcpy(script, config.localeScript, sizeof(config.localeScript));
}
@@ -388,10 +388,10 @@ void AaptLocaleValue::writeTo(ResTable_config* out) const {
if (script[0]) {
memcpy(out->localeScript, script, sizeof(out->localeScript));
- out->localeScriptWasProvided = true;
+ out->localeScriptWasComputed = false;
} else {
out->computeScript();
- out->localeScriptWasProvided = false;
+ out->localeScriptWasComputed = true;
}
if (variant[0]) {