Fix certain Accessibility Settings subpages use wrong resources

Root cause: Portrait mode does not always respect the sw600dp qualifier and instead uses the phone (default) resources.
Solution: Using the product to customize the tablet and phone cases is better way than using the configuration qualifier.

Bug: 269130587
Test: Manual testing
Change-Id: I90cc44f1e9bccf8950a4d89f70119ba5e3c0bfdc
This commit is contained in:
menghanli
2023-02-14 17:13:36 +08:00
parent 44b02abb2a
commit bea25c7513
55 changed files with 108 additions and 41 deletions

View File

@@ -692,4 +692,19 @@
<!-- Whether auto data switching on secondary SIM enables cross-SIM calling on both SIMs. -->
<bool name="config_auto_data_switch_enables_cross_sim_calling">false</bool>
<!-- The illustration for those screen are not in one of below type. This file should be a video in JSON format. -->
<item name="a11y_timeout_banner" type="raw" product="default">@raw/accessibility_timeout_banner</item>
<item name="a11y_timeout_banner" type="raw" product="tablet">@raw/accessibility_timeout_banner_tablet</item>
<item name="a11y_shortcut_type_triple_tap" type="raw" product="default">@raw/accessibility_shortcut_type_triple_tap</item>
<item name="a11y_shortcut_type_triple_tap" type="raw" product="tablet">@raw/accessibility_shortcut_type_triple_tap_tablet</item>
<item name="a11y_color_inversion_banner" type="raw" product="default">@raw/accessibility_color_inversion_banner</item>
<item name="a11y_color_inversion_banner" type="raw" product="tablet">@raw/accessibility_color_inversion_banner_tablet</item>
<item name="a11y_magnification_banner" type="raw" product="default">@raw/accessibility_magnification_banner</item>
<item name="a11y_magnification_banner" type="raw" product="tablet">@raw/accessibility_magnification_banner_tablet</item>
<item name="a11y_extra_dim_banner" type="raw" product="default">@raw/extra_dim_banner</item>
<item name="a11y_extra_dim_banner" type="raw" product="tablet">@raw/extra_dim_banner_tablet</item>
</resources>

58
res/values/drawables.xml Normal file
View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<drawable name="a11y_shortcut_type_software_gesture_talkback" product="default">@drawable/accessibility_shortcut_type_software_gesture_talkback</drawable>
<drawable name="a11y_shortcut_type_software_gesture_talkback" product="tablet">@drawable/accessibility_shortcut_type_software_gesture_talkback_tablet</drawable>
<drawable name="a11y_button_preview_base" product="default">@drawable/accessibility_button_preview_base</drawable>
<drawable name="a11y_button_preview_base" product="tablet">@drawable/accessibility_button_preview_base_tablet</drawable>
<drawable name="a11y_button_preview_large_floating_menu" product="default">@drawable/accessibility_button_preview_large_floating_menu</drawable>
<drawable name="a11y_button_preview_large_floating_menu" product="tablet">@drawable/accessibility_button_preview_large_floating_menu_tablet</drawable>
<drawable name="a11y_button_preview_small_floating_menu" product="default">@drawable/accessibility_button_preview_small_floating_menu</drawable>
<drawable name="a11y_button_preview_small_floating_menu" product="tablet">@drawable/accessibility_button_preview_small_floating_menu_tablet</drawable>
<drawable name="a11y_button_preview_three_finger" product="default">@drawable/accessibility_button_preview_three_finger</drawable>
<drawable name="a11y_button_preview_three_finger" product="tablet">@drawable/accessibility_button_preview_three_finger_tablet</drawable>
<drawable name="a11y_button_preview_two_finger" product="default">@drawable/accessibility_button_preview_two_finger</drawable>
<drawable name="a11y_button_preview_two_finger" product="tablet">@drawable/accessibility_button_preview_two_finger_tablet</drawable>
<drawable name="a11y_captioning_banner" product="default">@drawable/accessibility_captioning_banner</drawable>
<drawable name="a11y_captioning_banner" product="tablet">@drawable/accessibility_captioning_banner_tablet</drawable>
<drawable name="a11y_shortcut_type_hardware" product="default">@drawable/accessibility_shortcut_type_hardware</drawable>
<drawable name="a11y_shortcut_type_hardware" product="tablet">@drawable/accessibility_shortcut_type_hardware_tablet</drawable>
<drawable name="a11y_shortcut_type_software" product="default">@drawable/accessibility_shortcut_type_software</drawable>
<drawable name="a11y_shortcut_type_software" product="tablet">@drawable/accessibility_shortcut_type_software_tablet</drawable>
<drawable name="a11y_shortcut_type_software_floating" product="default">@drawable/accessibility_shortcut_type_software_floating</drawable>
<drawable name="a11y_shortcut_type_software_floating" product="tablet">@drawable/accessibility_shortcut_type_software_floating_tablet</drawable>
<drawable name="a11y_shortcut_type_software_gesture" product="default">@drawable/accessibility_shortcut_type_software_gesture</drawable>
<drawable name="a11y_shortcut_type_software_gesture" product="tablet">@drawable/accessibility_shortcut_type_software_gesture_tablet</drawable>
<drawable name="a11y_magnification_mode_fullscreen" product="default">@drawable/accessibility_magnification_mode_fullscreen</drawable>
<drawable name="a11y_magnification_mode_fullscreen" product="tablet">@drawable/accessibility_magnification_mode_fullscreen_tablet</drawable>
<drawable name="a11y_magnification_mode_switch" product="default">@drawable/accessibility_magnification_mode_switch</drawable>
<drawable name="a11y_magnification_mode_switch" product="tablet">@drawable/accessibility_magnification_mode_switch_tablet</drawable>
<drawable name="a11y_magnification_mode_window" product="default">@drawable/accessibility_magnification_mode_window</drawable>
<drawable name="a11y_magnification_mode_window" product="tablet">@drawable/accessibility_magnification_mode_window_tablet</drawable>
</resources>