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:12:37 +0000 (11:12 +0000)
commit83c87e50b1833ba9e154c62085557bd00a8d9691
tree5e129112585b907cd534895b6fc1756d431569c4
parent10000738e4e4ae9ea0440c43c4eb4f94c52e0b76
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
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