Show QS shortcut option if the a11y feature provides a tile.
Bug: 314852953 Test: atest com.android.settings.accessibility Test: atest com.android.settings.accessibility.shortcuts Test: manual Flag: ACONFIG android.view.accessibility.a11y_qs_shortcut STAGING Change-Id: Id7a6b3adfd4c4f3cb2b9f7fe15269b57a3d00543
This commit is contained in:
56
res/drawable/accessibility_shortcut_type_quick_settings.xml
Normal file
56
res/drawable/accessibility_shortcut_type_quick_settings.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~
|
||||
~ Copyright 2024 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
|
||||
~
|
||||
~ https://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.
|
||||
~
|
||||
~
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="312dp"
|
||||
android:height="130dp"
|
||||
android:viewportWidth="312"
|
||||
android:viewportHeight="130">
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M24,0L288,0A24,24 0,0 1,312 24L312,106A24,24 0,0 1,288 130L24,130A24,24 0,0 1,0 106L0,24A24,24 0,0 1,24 0z"/>
|
||||
<path
|
||||
android:pathData="M24,0L288,0A24,24 0,0 1,312 24L312,106A24,24 0,0 1,288 130L24,130A24,24 0,0 1,0 106L0,24A24,24 0,0 1,24 0z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M209,139.62H210V138.62V32C210,24.82 204.18,19 197,19H115C107.82,19 102,24.82 102,32V138.62V139.62H103H209Z"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#6D6D6D"/>
|
||||
<path
|
||||
android:pathData="M103,32C103,25.37 108.37,20 115,20H197C203.63,20 209,25.37 209,32V91.93H103V32Z"
|
||||
android:fillColor="#484848"/>
|
||||
<path
|
||||
android:pathData="M113.31,38.93L149.48,38.93A4,4 0,0 1,153.48 42.93L153.48,52.6A4,4 0,0 1,149.48 56.6L113.31,56.6A4,4 0,0 1,109.31 52.6L109.31,42.93A4,4 0,0 1,113.31 38.93z"
|
||||
android:fillColor="#69B2C9"/>
|
||||
<path
|
||||
android:pathData="M113.31,61.64L149.48,61.64A4,4 0,0 1,153.48 65.64L153.48,75.31A4,4 0,0 1,149.48 79.31L113.31,79.31A4,4 0,0 1,109.31 75.31L109.31,65.64A4,4 0,0 1,113.31 61.64z"
|
||||
android:fillColor="#646464"/>
|
||||
<path
|
||||
android:pathData="M162.52,38.93L198.69,38.93A4,4 0,0 1,202.69 42.93L202.69,52.6A4,4 0,0 1,198.69 56.6L162.52,56.6A4,4 0,0 1,158.52 52.6L158.52,42.93A4,4 0,0 1,162.52 38.93z"
|
||||
android:fillColor="#646464"/>
|
||||
<path
|
||||
android:pathData="M162.52,61.64L198.69,61.64A4,4 0,0 1,202.69 65.64L202.69,75.31A4,4 0,0 1,198.69 79.31L162.52,79.31A4,4 0,0 1,158.52 75.31L158.52,65.64A4,4 0,0 1,162.52 61.64z"
|
||||
android:fillColor="#646464"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<string name="accessibility_shortcut_nav_button_pref" translatable="false">shortcut_nav_button_pref</string>
|
||||
<string name="accessibility_shortcut_fab_pref" translatable="false">shortcut_fab_pref</string>
|
||||
<string name="accessibility_shortcut_triple_tap_pref" translatable="false">shortcut_triple_tap_pref</string>
|
||||
<string name="accessibility_shortcut_two_fingers_double_tap_pref" translatable="false">shortcut_two_fingers_double_tap_pref</string>
|
||||
<string name="accessibility_shortcut_two_finger_double_tap_pref" translatable="false">shortcut_two_finger_double_tap_pref</string>
|
||||
<string name="accessibility_shortcut_quick_settings_pref" translatable="false">shortcut_quick_settings_pref</string>
|
||||
<string name="accessibility_shortcuts_advanced_collapsed" translatable="false">advanced_shortcuts_collapsed</string>
|
||||
</resources>
|
||||
@@ -4835,6 +4835,8 @@
|
||||
<string name="accessibility_tutorial_dialog_title_triple">Triple tap screen to open</string>
|
||||
<!-- Title for the accessibility tutorial dialog in accessibility service with two finger double tap. [CHAR LIMIT=100] -->
|
||||
<string name="accessibility_tutorial_dialog_title_two_finger_double">Two finger double tap screen to open</string>
|
||||
<!-- Title for the accessibility tutorial dialog in accessibility service with quick setting shortcut. [CHAR LIMIT=100] -->
|
||||
<string name="accessibility_tutorial_dialog_title_quick_setting">Quick Settings shortcut</string>
|
||||
<!-- Title for the accessibility tutorial dialog in accessibility service with gesture. [CHAR LIMIT=50] -->
|
||||
<string name="accessibility_tutorial_dialog_title_gesture">Use gesture to open</string>
|
||||
<!-- Title for the accessibility tutorial dialog in gesture navigation settings. [CHAR LIMIT=50] -->
|
||||
@@ -4849,6 +4851,8 @@
|
||||
<string name="accessibility_tutorial_dialog_message_triple">To start and stop magnification, triple-tap anywhere on your screen.</string>
|
||||
<!-- Instruction for the accessibility tutorial dialog in accessibility service with two finger double tap. [CHAR LIMIT=100] -->
|
||||
<string name="accessibility_tutorial_dialog_message_two_finger_triple">To start and stop magnification, double-tap anywhere on your screen with two fingers.</string>
|
||||
<!-- Instruction for the accessibility tutorial dialog in accessibility service with triple tap. [CHAR LIMIT=NONE]-->
|
||||
<string name="accessibility_tutorial_dialog_message_quick_setting">To use this feature, swipe down from the top of your screen.</string>
|
||||
<!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using gesture navigation and touch exploration is not enabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_tutorial_dialog_message_gesture">To use this feature, swipe up from the bottom of the screen with 2 fingers.\n\nTo switch between features, swipe up with 2 fingers and hold.</string>
|
||||
<!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using gesture navigation and touch exploration is enabled. [CHAR LIMIT=NONE] -->
|
||||
@@ -4863,10 +4867,10 @@
|
||||
<string name="accessibility_tutorial_dialog_link_button">Button settings</string>
|
||||
<!-- Title for accessibility shortcut preference for accessibility apps. [CHAR LIMIT=40] -->
|
||||
<string name="accessibility_shortcut_title"><xliff:g id="service" example="Select to Speak">%1$s</xliff:g> shortcut</string>
|
||||
<!-- Title for software shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_edit_summary_software">Accessibility button</string>
|
||||
<!-- Title for software shortcut gesture in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_edit_summary_software_gesture">Accessibility gesture</string>
|
||||
<!-- Shown as one of the item in the chosen accessibility shortcut types list presented as a label next to the shortcut toggle. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_edit_summary_software">accessibility button</string>
|
||||
<!-- Shown as one of the item in the chosen accessibility shortcut types list presented as a label next to the shortcut toggle. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_edit_summary_software_gesture">accessibility gesture</string>
|
||||
<!-- Title for software shortcut in gesture mode in accessibility edit shortcut dialog while using gesture navigation is enabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_edit_dialog_title_software_gesture">Swipe up with 2 fingers</string>
|
||||
<!-- Title for software shortcut in gesture mode in accessibility edit shortcut dialog while using gesture navigation and touch exploration are enabled. [CHAR LIMIT=NONE] -->
|
||||
@@ -4885,6 +4889,12 @@
|
||||
<string name="accessibility_shortcut_edit_dialog_summary_software_floating"><annotation id="link">More options</annotation></string>
|
||||
<!-- Footer to show help link content description. [CHAR LIMIT=NONE] -->
|
||||
<string name="footer_learn_more_content_description">Learn more about <xliff:g id="service" example="Select to Speak">%1$s</xliff:g></string>
|
||||
<!-- Title for quick settings shortcut option in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_edit_dialog_title_quick_settings">Quick Settings</string>
|
||||
<!-- Summary for quick settings shortcut option in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_edit_dialog_summary_quick_settings">Swipe down from the top of your screen</string>
|
||||
<!-- Shown as one of the item in the chosen accessibility shortcut types list presented as a label next to the shortcut toggle. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_feature_shortcut_setting_summary_quick_settings">Quick Settings</string>
|
||||
<!-- Title for hardware shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_edit_dialog_title_hardware">Hold volume keys</string>
|
||||
<!-- Part of list to compose user's accessibility shortcut list. [CHAR LIMIT=NONE] -->
|
||||
|
||||
@@ -25,6 +25,14 @@
|
||||
settings:allowDividerAbove="false"
|
||||
settings:allowDividerBelow="false"/>
|
||||
|
||||
<com.android.settings.accessibility.shortcuts.ShortcutOptionPreference
|
||||
android:key="@string/accessibility_shortcut_quick_settings_pref"
|
||||
android:persistent="false"
|
||||
android:selectable="true"
|
||||
settings:allowDividerAbove="false"
|
||||
settings:allowDividerBelow="false"
|
||||
settings:controller="com.android.settings.accessibility.shortcuts.QuickSettingsShortcutOptionController" />
|
||||
|
||||
<com.android.settings.accessibility.shortcuts.ShortcutOptionPreference
|
||||
android:key="@string/accessibility_shortcut_fab_pref"
|
||||
android:persistent="false"
|
||||
@@ -58,12 +66,12 @@
|
||||
settings:controller="com.android.settings.accessibility.shortcuts.VolumeKeysShortcutOptionController" />
|
||||
|
||||
<com.android.settings.accessibility.shortcuts.ShortcutOptionPreference
|
||||
android:key="@string/accessibility_shortcut_two_fingers_double_tap_pref"
|
||||
android:key="@string/accessibility_shortcut_two_finger_double_tap_pref"
|
||||
android:persistent="false"
|
||||
android:selectable="true"
|
||||
settings:allowDividerAbove="false"
|
||||
settings:allowDividerBelow="false"
|
||||
settings:controller="com.android.settings.accessibility.shortcuts.TwoFingersDoubleTapShortcutOptionController" />
|
||||
settings:controller="com.android.settings.accessibility.shortcuts.TwoFingerDoubleTapShortcutOptionController" />
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/ic_keyboard_arrow_down"
|
||||
|
||||
Reference in New Issue
Block a user