From 205018a854be36908bf622ab050cb2ef48955628 Mon Sep 17 00:00:00 2001 From: Lauren Winston Date: Mon, 25 Jul 2022 22:58:56 +0000 Subject: [PATCH] Add a cursor preference to Accessibility Settings Bug: 240194047 Test: atest SoftwareCursorPreferencesControllerTest and SoftwareCursorTogglerPreferenceControllerTest Change-Id: I97e226d8d8c0bcdfd0e2612e86b81987480063d1 --- color-check-baseline.xml | 16 ++ .../ic_accessibility_software_cursor.xml | 35 +++++ res/values/strings.xml | 8 + res/xml/accessibility_cursor_settings.xml | 25 ++++ res/xml/accessibility_settings.xml | 11 ++ .../CursorPreferenceFragment.java | 49 ++++++ .../SoftwareCursorPreferenceController.java | 40 +++++ ...twareCursorTogglePreferenceController.java | 83 +++++++++++ ...oftwareCursorPreferenceControllerTest.java | 57 +++++++ ...eCursorTogglePreferenceControllerTest.java | 139 ++++++++++++++++++ 10 files changed, 463 insertions(+) create mode 100644 res/drawable/ic_accessibility_software_cursor.xml create mode 100644 res/xml/accessibility_cursor_settings.xml create mode 100644 src/com/android/settings/accessibility/CursorPreferenceFragment.java create mode 100644 src/com/android/settings/accessibility/SoftwareCursorPreferenceController.java create mode 100644 src/com/android/settings/accessibility/SoftwareCursorTogglePreferenceController.java create mode 100644 tests/unit/src/com/android/settings/accessibility/SoftwareCursorPreferenceControllerTest.java create mode 100644 tests/unit/src/com/android/settings/accessibility/SoftwareCursorTogglePreferenceControllerTest.java diff --git a/color-check-baseline.xml b/color-check-baseline.xml index 9cf2d2a0d6d..c4adad2147b 100644 --- a/color-check-baseline.xml +++ b/color-check-baseline.xml @@ -2861,6 +2861,22 @@ column="13"/> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 9ad46800a10..7f49c6e4832 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5132,6 +5132,12 @@ Turn screen darker Interaction controls + + Software Cursor + + Control your Android device using an on screen cursor + + Software Cursor Timing controls @@ -5869,6 +5875,8 @@ Ease of use, ease of access, assistance, assistive Window Magnifier, Zoom, Magnification, Low vision, Enlarge, make bigger + + Cursor, Trackpad, Software Cursor, Mouse diff --git a/res/xml/accessibility_cursor_settings.xml b/res/xml/accessibility_cursor_settings.xml new file mode 100644 index 00000000000..6bc50bb58ae --- /dev/null +++ b/res/xml/accessibility_cursor_settings.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml index caba41588b7..0df28ecdb95 100644 --- a/res/xml/accessibility_settings.xml +++ b/res/xml/accessibility_settings.xml @@ -102,6 +102,17 @@ settings:keywords="@string/keywords_vibration" android:summary="@string/accessibility_vibration_settings_summary"/> + + +