Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c29a6191 authored by Tobias Thierer's avatar Tobias Thierer
Browse files

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
parent 3005a80e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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>