From 3eef2a0542e8a36224cfb9ba628f7e208aab96e2 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Thu, 5 May 2022 16:44:48 -0700 Subject: [PATCH] Fix CDM dialog for accessibility 1. Support RTL language. 2. Make Info, Vendor and permission icon darker in dark mode. 3. Increase the size of back button 4. Increase the size of vendor, info icon 5. Make CDM dialog rotateable in landscape mode 6. Add ScrollView for CDM dialog 7. Add a lable for Info icon Test: atest CtsCompanionDeviceManagerCoreTestCases atest CtsCompanionDeviceManagerUiAutomationTestCases atest CtsOsTestCases:CompanionDeviceManagerTest Fix: 231387185, 231387975, 231395535, 231397714, 231407966, 231407973, 231410305 Change-Id: I0df377f6b30e933ea8674291b2c8bf26c7f8ab36 --- .../AndroidManifest.xml | 1 + .../res/drawable-night/ic_apps.xml | 27 ++ .../res/drawable-night/ic_info.xml | 25 ++ .../res/drawable-night/ic_notifications.xml | 26 ++ .../res/drawable-night/ic_storage.xml | 25 ++ .../res/drawable/helper_back_button.xml | 4 +- .../res/drawable/ic_apps.xml | 3 +- .../res/drawable/ic_notifications.xml | 2 +- .../res/drawable/ic_storage.xml | 2 +- .../res/layout/activity_confirmation.xml | 237 +++++++++--------- .../res/layout/helper_confirmation.xml | 101 ++++---- .../res/layout/list_item_device.xml | 5 +- .../res/layout/list_item_permission.xml | 6 +- .../res/layout/vendor_header.xml | 24 +- .../res/values/strings.xml | 6 + .../res/values/styles.xml | 15 +- .../res/values/themes.xml | 4 +- .../CompanionDeviceActivity.java | 9 +- 18 files changed, 330 insertions(+), 192 deletions(-) create mode 100644 packages/CompanionDeviceManager/res/drawable-night/ic_apps.xml create mode 100644 packages/CompanionDeviceManager/res/drawable-night/ic_info.xml create mode 100644 packages/CompanionDeviceManager/res/drawable-night/ic_notifications.xml create mode 100644 packages/CompanionDeviceManager/res/drawable-night/ic_storage.xml diff --git a/packages/CompanionDeviceManager/AndroidManifest.xml b/packages/CompanionDeviceManager/AndroidManifest.xml index 8b5d214f7a105..16cd2e55136cc 100644 --- a/packages/CompanionDeviceManager/AndroidManifest.xml +++ b/packages/CompanionDeviceManager/AndroidManifest.xml @@ -46,6 +46,7 @@ android:launchMode="singleInstance" android:excludeFromRecents="true" android:permission="android.permission.BIND_COMPANION_DEVICE_MANAGER_SERVICE" + android:configChanges="orientation|screenSize" android:theme="@style/ChooserActivity"/> + + + + \ No newline at end of file diff --git a/packages/CompanionDeviceManager/res/drawable-night/ic_info.xml b/packages/CompanionDeviceManager/res/drawable-night/ic_info.xml new file mode 100644 index 0000000000000..5689e34d08862 --- /dev/null +++ b/packages/CompanionDeviceManager/res/drawable-night/ic_info.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/CompanionDeviceManager/res/drawable-night/ic_notifications.xml b/packages/CompanionDeviceManager/res/drawable-night/ic_notifications.xml new file mode 100644 index 0000000000000..06bfad5b8efd8 --- /dev/null +++ b/packages/CompanionDeviceManager/res/drawable-night/ic_notifications.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/CompanionDeviceManager/res/drawable-night/ic_storage.xml b/packages/CompanionDeviceManager/res/drawable-night/ic_storage.xml new file mode 100644 index 0000000000000..f8aef33c88eac --- /dev/null +++ b/packages/CompanionDeviceManager/res/drawable-night/ic_storage.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/CompanionDeviceManager/res/drawable/helper_back_button.xml b/packages/CompanionDeviceManager/res/drawable/helper_back_button.xml index 8e92051faf6c7..6ce1f12636387 100644 --- a/packages/CompanionDeviceManager/res/drawable/helper_back_button.xml +++ b/packages/CompanionDeviceManager/res/drawable/helper_back_button.xml @@ -18,6 +18,6 @@ - + \ No newline at end of file diff --git a/packages/CompanionDeviceManager/res/drawable/ic_apps.xml b/packages/CompanionDeviceManager/res/drawable/ic_apps.xml index d1ec8637775c5..7295e78b16cbe 100644 --- a/packages/CompanionDeviceManager/res/drawable/ic_apps.xml +++ b/packages/CompanionDeviceManager/res/drawable/ic_apps.xml @@ -19,7 +19,8 @@ android:width="24dp" android:height="24dp" android:viewportWidth="24" - android:viewportHeight="24"> + android:viewportHeight="24" + android:tint="@android:color/system_accent1_600"> + android:tint="@android:color/system_accent1_600"> \ No newline at end of file diff --git a/packages/CompanionDeviceManager/res/drawable/ic_storage.xml b/packages/CompanionDeviceManager/res/drawable/ic_storage.xml index 406a3b5dada5b..3e033d372e723 100644 --- a/packages/CompanionDeviceManager/res/drawable/ic_storage.xml +++ b/packages/CompanionDeviceManager/res/drawable/ic_storage.xml @@ -20,7 +20,7 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" - android:tint="?attr/colorControlNormal"> + android:tint="@android:color/system_accent1_600"> \ No newline at end of file diff --git a/packages/CompanionDeviceManager/res/layout/activity_confirmation.xml b/packages/CompanionDeviceManager/res/layout/activity_confirmation.xml index c0e6c09d69ed0..520ade892f513 100644 --- a/packages/CompanionDeviceManager/res/layout/activity_confirmation.xml +++ b/packages/CompanionDeviceManager/res/layout/activity_confirmation.xml @@ -12,135 +12,142 @@ See the License for the specific language governing permissions and limitations under the License. --> - - + android:layout_height="match_parent" + style="@style/ScrollViewStyle"> - - - - - - - - + android:layout_height="wrap_content" + android:baselineAligned="false"> - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +