diff options
| author | 2025-02-27 16:17:08 -0800 | |
|---|---|---|
| committer | 2025-02-27 16:17:08 -0800 | |
| commit | ea3ea6be67f3ae417f817e3a87d1b09cace81417 (patch) | |
| tree | 4bdea433e2c7ef082aba220f686ed17b238a2e8c | |
| parent | e22a4ae136d9d9f6dc42d22f821701cb9690622d (diff) | |
| parent | 4d3662fc7412d43e17f3dbcf6d69b2d58a9380c2 (diff) | |
Merge "Use autoclick left click icon on accessibility button" into main
5 files changed, 28 insertions, 2 deletions
diff --git a/core/java/com/android/internal/accessibility/dialog/AccessibilityTargetHelper.java b/core/java/com/android/internal/accessibility/dialog/AccessibilityTargetHelper.java index 6498c53a63e2..a2d6c2b51835 100644 --- a/core/java/com/android/internal/accessibility/dialog/AccessibilityTargetHelper.java +++ b/core/java/com/android/internal/accessibility/dialog/AccessibilityTargetHelper.java @@ -215,7 +215,6 @@ public final class AccessibilityTargetHelper { Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED); targets.add(colorInversion); - // TODO(b/394683600): Update Icon with the autoclick asset. final ToggleAllowListingFeatureTarget autoclick = new ToggleAllowListingFeatureTarget(context, shortcutType, @@ -224,7 +223,7 @@ public final class AccessibilityTargetHelper { AUTOCLICK_COMPONENT_NAME.flattenToString(), uid, context.getString(R.string.autoclick_feature_name), - context.getDrawable(R.drawable.ic_accessibility_generic), + context.getDrawable(R.drawable.ic_accessibility_autoclick), Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED); targets.add(autoclick); diff --git a/core/res/res/drawable/ic_accessibility_autoclick.xml b/core/res/res/drawable/ic_accessibility_autoclick.xml new file mode 100644 index 000000000000..44d34d33e98e --- /dev/null +++ b/core/res/res/drawable/ic_accessibility_autoclick.xml @@ -0,0 +1,8 @@ +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/accessibility_autoclick_background" /> + <foreground> + <inset + android:drawable="@drawable/ic_accessibility_autoclick_foreground" + android:inset="@dimen/accessibility_icon_foreground_padding_ratio" /> + </foreground> +</adaptive-icon> diff --git a/core/res/res/drawable/ic_accessibility_autoclick_foreground.xml b/core/res/res/drawable/ic_accessibility_autoclick_foreground.xml new file mode 100644 index 000000000000..0a76a1b989e0 --- /dev/null +++ b/core/res/res/drawable/ic_accessibility_autoclick_foreground.xml @@ -0,0 +1,17 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="40dp" + android:height="41dp" + android:viewportWidth="40" + android:viewportHeight="41"> + + <path + android:fillColor="#67D4FF" + android:pathData="M0 20.3789C0 9.33321 8.95431 0.378906 20 0.378906C31.0457 0.378906 40 9.33321 40 20.3789C40 31.4246 31.0457 40.3789 20 40.3789C8.95431 40.3789 0 31.4246 0 20.3789Z" /> + <path + android:fillColor="#04409F" + android:pathData="M28.9564 32.0587L24.0973 27.1996L22.6765 31.4904L19.2666 20.124L30.633 23.5339L26.3422 24.9547L31.2013 29.8138L28.9564 32.0587Z" /> + <path + android:fillColor="#04409F" + android:fillType="evenOdd" + android:pathData="M8.01596 20.8918C8.10753 22.8222 8.63239 24.6433 9.60868 26.3343C10.9014 28.5733 12.8274 30.221 15.1666 31.2713C16.9169 32.0453 18.7173 32.3866 20.5679 32.2953L19.9158 30.1502C18.5615 30.1389 17.2456 29.8364 15.9682 29.2427C14.0941 28.3832 12.6373 27.0532 11.5977 25.2526C10.7841 23.8434 10.3491 22.3305 10.2925 20.7139C10.2607 19.104 10.2783 17.806 10.9916 16.3295C10.9916 16.3295 11.4971 15.2881 11.6974 14.9932C11.8978 14.6983 12.7644 13.5882 12.7644 13.5882L11.3665 11.8494C11.3665 11.8494 10.6288 12.6605 10.291 13.1593C10.1116 13.4242 9.64185 14.1332 9.64185 14.1332L9.07295 15.2304C8.24895 17.0214 7.92073 18.8842 8.01596 20.8918ZM31.9633 21.2755L29.8026 20.6995C29.8208 20.1549 29.797 19.6129 29.7312 19.0733C29.6285 18.1723 29.3858 17.2999 29.0031 16.4562L30.8819 15.3714C31.3937 16.4747 31.7295 17.6169 31.8895 18.798C32.0056 19.6202 32.0302 20.4461 31.9633 21.2755ZM18.4931 8.55776C17.312 8.71775 16.1653 9.04578 15.053 9.54184L16.1513 11.4442C16.995 11.0615 17.8674 10.8188 18.7684 10.7161C19.6851 10.6043 20.6091 10.6137 21.5403 10.7441L22.1061 8.63249C20.8942 8.41364 19.6899 8.38872 18.4931 8.55776ZM24.1807 9.18837L23.6149 11.3C24.4865 11.6526 25.2869 12.0987 26.0158 12.6382C26.7448 13.1776 27.379 13.824 27.9183 14.5773L29.7972 13.4925C29.1223 12.5043 28.3055 11.6502 27.347 10.9302C26.4042 10.2011 25.3487 9.62046 24.1807 9.18837Z" /> +</vector> diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml index 4e93c44e44bd..bf1423bda7e4 100644 --- a/core/res/res/values/colors.xml +++ b/core/res/res/values/colors.xml @@ -557,6 +557,7 @@ <color name="accessibility_magnification_background">#F50D60</color> <color name="accessibility_daltonizer_background">#00BCD4</color> <color name="accessibility_color_inversion_background">#546E7A</color> + <color name="accessibility_autoclick_background">#67D4FF</color> <!-- Fullscreen magnification thumbnail color --> <color name="accessibility_magnification_thumbnail_stroke_color">#0C0C0C</color> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index c8c1e73bfba2..a18c1d4df98b 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -5652,6 +5652,7 @@ <java-symbol type="id" name="accessibility_autoclick_position_button" /> <java-symbol type="drawable" name="accessibility_autoclick_pause" /> <java-symbol type="drawable" name="accessibility_autoclick_resume" /> + <java-symbol type="drawable" name="ic_accessibility_autoclick" /> <!-- For HapticFeedbackConstants configurability defined at HapticFeedbackCustomization --> <java-symbol type="string" name="config_hapticFeedbackCustomizationFile" /> |