From c29a6191ca7fe25b470bb981fae02c138b1a2597 Mon Sep 17 00:00:00 2001 From: Tobias Thierer Date: Mon, 4 Mar 2019 15:59:32 +0000 Subject: [PATCH] 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 --- packages/SystemUI/res/values/donottranslate.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/res/values/donottranslate.xml b/packages/SystemUI/res/values/donottranslate.xml index 38f469e6eda3b..67293c57e344b 100644 --- a/packages/SystemUI/res/values/donottranslate.xml +++ b/packages/SystemUI/res/values/donottranslate.xml @@ -18,8 +18,8 @@ --> - @*android:string/system_ui_date_pattern + @*android:string/system_ui_date_pattern - eeeMMMd + eeeMMMd