summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andrew Johnson <aqj@google.com> 2016-03-30 17:16:45 -0400
committer Andrew Johnson <aqj@google.com> 2016-03-30 20:24:48 -0400
commit299e488ee28e75b96c23a8a37fdff2ec0f4ccb98 (patch)
tree1fd31bc0dca0ab40da1a47bd3e56baae31f53256
parent8a8e8ea19a825dd45117909df2f0140ca20565e7 (diff)
Removing assignments to localeScriptWasComputed in aapt.
On certain devices running Android M with unknown vendor modifications. Setting the localeScriptWasComputed bit in the resource parameters struct causes the translations for many languages to fail to load. The app then defaults to English. This has been reported on the following devices: Motorola XT1086, XT1096, and XT1586, HTC One, and Huawei MediaPad 10 LINK. This change works around the issue by never setting localeScriptWasComputed in aapt and instead always writing the default value of false. Bug: 27872476 Change-Id: Id638d1d0e5f9dcb1c02e65d67667d76174c69b9e
-rw-r--r--tools/aapt/AaptAssets.cpp4
-rw-r--r--tools/aapt2/Locale.cpp4
2 files changed, 0 insertions, 8 deletions
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index cbd8480efc12..c1cfd0b5f1e7 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -388,10 +388,6 @@ void AaptLocaleValue::writeTo(ResTable_config* out) const {
if (script[0]) {
memcpy(out->localeScript, script, sizeof(out->localeScript));
- out->localeScriptWasComputed = false;
- } else {
- out->computeScript();
- out->localeScriptWasComputed = true;
}
if (variant[0]) {
diff --git a/tools/aapt2/Locale.cpp b/tools/aapt2/Locale.cpp
index 12f56fc11226..be576613b9b2 100644
--- a/tools/aapt2/Locale.cpp
+++ b/tools/aapt2/Locale.cpp
@@ -268,10 +268,6 @@ void LocaleValue::writeTo(ResTable_config* out) const {
if (script[0]) {
memcpy(out->localeScript, script, sizeof(out->localeScript));
- out->localeScriptWasComputed = false;
- } else {
- out->computeScript();
- out->localeScriptWasComputed = true;
}
if (variant[0]) {