Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2035c2a authored by Yuhan Yang's avatar Yuhan Yang
Browse files

Update mouse key shortcut icon

Screenshot: go/screenshot-3kkif395ykasqkp

Bug: 394683600
Test: manually verified on test device
Flag: com.android.server.accessibility.enable_mouse_key_enhancement
Change-Id: Ie43931237e9b86b4da8c355d13babb36f4e00e73
parent 817428e7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -228,7 +228,6 @@ public final class AccessibilityTargetHelper {
                        Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED);
        targets.add(autoclick);

        // TODO(b/394683600): Update Icon with the mouse keys asset.
        final ToggleAllowListingFeatureTarget mouseKeys =
                new ToggleAllowListingFeatureTarget(context,
                        shortcutType,
@@ -236,8 +235,8 @@ public final class AccessibilityTargetHelper {
                                MOUSE_KEYS_COMPONENT_NAME.flattenToString()),
                        MOUSE_KEYS_COMPONENT_NAME.flattenToString(),
                        uid,
                        context.getString(R.string.autoclick_feature_name),
                        context.getDrawable(R.drawable.ic_accessibility_generic),
                        context.getString(R.string.mouse_keys_feature_name),
                        context.getDrawable(R.drawable.ic_accessibility_mouse_keys),
                        Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED);
        targets.add(mouseKeys);

+24 −0
Original line number Diff line number Diff line
<!--
   Copyright (C) 2025 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.
-->

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/accessibility_mouse_keys_background" />
    <foreground>
        <inset
            android:drawable="@drawable/ic_accessibility_mouse_keys_foreground"
            android:inset="@dimen/accessibility_icon_foreground_padding_ratio" />
    </foreground>
</adaptive-icon>
+45 −0
Original line number Diff line number Diff line
<!--
   Copyright (C) 2025 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.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:viewportWidth="40"
    android:viewportHeight="40"
    android:width="40dp"
    android:height="40dp">
    <path
        android:pathData="M0 20C0 8.95431 8.95431 0 20 0V0C31.0457 0 40 8.95431 40 20V20C40 31.0457 31.0457 40 20 40V40C8.95431 40 0 31.0457 0 20V20Z"
        android:fillColor="#67D4FF" />
    <path
        android:pathData="M10 11.3845C10 10.6199 10.6309 10 11.4091 10H14.2273C15.0055 10 15.6364 10.6199 15.6364 11.3845V14.1535C15.6364 14.9182 15.0055 15.5381 14.2273 15.5381H11.4091C10.6309 15.5381 10 14.9182 10 14.1535V11.3845Z"
        android:fillColor="#04409F" />
    <path
        android:pathData="M10 18.3071C10 17.5424 10.6309 16.9226 11.4091 16.9226H14.2273C15.0055 16.9226 15.6364 17.5424 15.6364 18.3071V21.0761C15.6364 21.8407 15.0055 22.4606 14.2273 22.4606H11.4091C10.6309 22.4606 10 21.8407 10 21.0761V18.3071Z"
        android:fillColor="#04409F" />
    <path
        android:pathData="M10 25.2296C10 24.465 10.6309 23.8451 11.4091 23.8451H14.2273C15.0055 23.8451 15.6364 24.465 15.6364 25.2296V27.9987C15.6364 28.7633 15.0055 29.3832 14.2273 29.3832H11.4091C10.6309 29.3832 10 28.7633 10 27.9987V25.2296Z"
        android:fillColor="#04409F" />
    <path
        android:pathData="M19.4158 15.5381C20.3817 14.9071 21.4871 14.466 22.677 14.2692C22.6802 14.2311 22.6818 14.1925 22.6818 14.1535V11.3845C22.6818 10.6199 22.0509 10 21.2727 10H18.4545C17.6763 10 17.0455 10.6199 17.0455 11.3845V14.1535C17.0455 14.9182 17.6763 15.5381 18.4545 15.5381H19.4158Z"
        android:fillColor="#04409F" />
    <path
        android:pathData="M24.0909 14.1535C25.7871 14.1535 27.3666 14.6443 28.6904 15.4892C29.288 15.3288 29.7273 14.7916 29.7273 14.1535V11.3845C29.7273 10.6199 29.0964 10 28.3182 10H25.5C24.7218 10 24.0909 10.6199 24.0909 11.3845V14.1535Z"
        android:fillColor="#04409F" />
    <path
        android:pathData="M24.2083 31.6042C22.3883 31.6042 20.852 30.9984 19.5994 29.787C18.3665 28.5563 17.75 27.0468 17.75 25.2585V22.576C17.75 20.7877 18.3665 19.2878 19.5994 18.0763C20.852 16.8456 22.3883 16.2303 24.2083 16.2303C26.0284 16.2303 27.5549 16.8456 28.7879 18.0763C30.0404 19.2878 30.6667 20.7877 30.6667 22.576V25.2585C30.6667 27.0468 30.0404 28.5563 28.7879 29.787C27.5549 30.9984 26.0284 31.6042 24.2083 31.6042ZM24.2083 29.3255C25.363 29.3255 26.3415 28.9313 27.1439 28.1429C27.9463 27.3353 28.3475 26.3738 28.3475 25.2585V24.1047H20.0691V25.2585C20.0691 26.3738 20.4703 27.3353 21.2727 28.1429C22.0947 28.9313 23.0732 29.3255 24.2083 29.3255ZM20.1278 21.8549H23.0634V18.5667C22.2806 18.7974 21.625 19.2012 21.0966 19.7781C20.5682 20.355 20.2453 21.0473 20.1278 21.8549ZM25.3532 21.8549H28.2888C28.1518 21.0473 27.8191 20.355 27.2907 19.7781C26.7819 19.2012 26.136 18.7974 25.3532 18.5667V21.8549Z"
        android:fillType="evenOdd"
        android:fillColor="#04409F" />
</vector>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -723,6 +723,7 @@
    <color name="accessibility_daltonizer_background">#00BCD4</color>
    <color name="accessibility_color_inversion_background">#546E7A</color>
    <color name="accessibility_autoclick_background">#67D4FF</color>
    <color name="accessibility_mouse_keys_background">#67D4FF</color>

    <!-- Fullscreen magnification thumbnail color -->
    <color name="accessibility_magnification_thumbnail_stroke_color">#0C0C0C</color>
+1 −0
Original line number Diff line number Diff line
@@ -5872,6 +5872,7 @@
  <java-symbol type="drawable" name="accessibility_autoclick_pause" />
  <java-symbol type="drawable" name="accessibility_autoclick_resume" />
  <java-symbol type="drawable" name="ic_accessibility_autoclick" />
  <java-symbol type="drawable" name="ic_accessibility_mouse_keys" />

  <!-- Accessibility autoclick scroll panel related -->
  <java-symbol type="layout" name="accessibility_autoclick_scroll_panel" />