OSDN Git Service

DO NOT MERGE Allow for HTML styling in mobile data type content descriptions
authorEvan Laird <evanlaird@google.com>
Tue, 24 Sep 2019 23:14:05 +0000 (19:14 -0400)
committerEvan Laird <evanlaird@google.com>
Wed, 25 Sep 2019 11:13:24 +0000 (11:13 +0000)
commita3b5dd1b8993184db77a582e525da1282aa593c8
tree02eb897455aaae87b18a37dcc2ecd38a0282c283
parent786e8a2849e46bc1182fd99a56817d10aaaef434
DO NOT MERGE Allow for HTML styling in mobile data type content descriptions

This CL implements a (somewhat hacky) way to enable HTML attributes in
the mobile data type content description strings. This way we can use
some basic styling in the Quick Settings cellular data tile which uses
it in a TextView.

We do this by assuming that the content description is valid, escaped
HTML, and send two separate CharSequences to all of the listeners, all
of which can then decide if they need the regular content description or
the prettified version.

Test: atest SystemUITests; system ui demo mode
Bug: 141177147
Change-Id: Idf387111b0cdc34ad3762eac0ec6c2b484b393e3
Merged-In: Idf387111b0cdc34ad3762eac0ec6c2b484b393e3
16 files changed:
packages/SystemUI/res/values/strings.xml
packages/SystemUI/src/com/android/systemui/qs/QSCarrierGroup.java
packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/EthernetSignalController.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalController.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
packages/SystemUI/tests/src/com/android/systemui/qs/QSCarrierGroupTest.java
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CallbackHandlerTest.java
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java