summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tobias Thierer <tobiast@google.com> 2019-03-04 15:59:32 +0000
committer Tobias Thierer <tobiast@google.com> 2019-03-04 16:09:56 +0000
commitc29a6191ca7fe25b470bb981fae02c138b1a2597 (patch)
tree18d8b48312f0d2c0da46af2a2a2241f87121e6a7
parent3005a80e5f8700e4b98450675fcf50001d49f0c5 (diff)
Work around unintentionally translated String resource crashing SystemUI.
A resource file name donottranslate.xml stops the Android Studio linter complaining about untranslated string resources, but this is inconsistent with current aapt behavior because aapt doesn't implicitly infer translatable="false" for such strings. Therefore, pseudo translations are generated for pseudo locales such as en-XA, even though that was not intended. This looks to be a bug in aapt. As a short-term workaround to stop SystemUI crashing, this CL explicitly marks the offending Strings as translatable="false", which should stop them being translated into pseudo locales and therefore stop SystemUI crashing. Bug: 126423638 Test: Treehugger Change-Id: Ice903070ea89dbef17b347c5e0ccd6a8d896e432
-rw-r--r--packages/SystemUI/res/values/donottranslate.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SystemUI/res/values/donottranslate.xml b/packages/SystemUI/res/values/donottranslate.xml
index 38f469e6eda3..67293c57e344 100644
--- a/packages/SystemUI/res/values/donottranslate.xml
+++ b/packages/SystemUI/res/values/donottranslate.xml
@@ -18,8 +18,8 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Date format for display: should match the lockscreen in /policy. -->
- <string name="system_ui_date_pattern">@*android:string/system_ui_date_pattern</string>
+ <string name="system_ui_date_pattern" translatable="false">@*android:string/system_ui_date_pattern</string>
<!-- Date format for the always on display. -->
- <item type="string" name="system_ui_aod_date_pattern">eeeMMMd</item>
+ <item type="string" name="system_ui_aod_date_pattern" translatable="false">eeeMMMd</item>
</resources>