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

Commit e56a3449 authored by Jun Mukai's avatar Jun Mukai Committed by Android (Google) Code Review
Browse files

Merge "Introduce accessibility large pointer icons."

parents 644c6f70 19a56019
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4930,6 +4930,15 @@ public final class Settings {
        public static final String ACCESSIBILITY_AUTOCLICK_DELAY =
                "accessibility_autoclick_delay";

        /**
         * Whether or not larger size icons are used for the pointer of mouse/trackpad for
         * accessibility.
         * (0 = false, 1 = true)
         * @hide
         */
        public static final String ACCESSIBILITY_LARGE_POINTER_ICON =
                "accessibility_large_pointer_icon";

        /**
         * The timeout for considering a press to be a long press in milliseconds.
         * @hide
+8 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.view;

import android.os.UserHandle;
import android.provider.Settings;
import com.android.internal.util.XmlUtils;

import android.annotation.XmlRes;
@@ -199,9 +201,14 @@ public final class PointerIcon implements Parcelable {
            styleIndex = getSystemIconStyleIndex(STYLE_DEFAULT);
        }

        int accessibilityConfig = Settings.Secure.getIntForUser(
                    context.getContentResolver(), Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON,
                    0, UserHandle.USER_CURRENT);
        int defStyle = (accessibilityConfig == 1) ?
                com.android.internal.R.style.LargePointer : com.android.internal.R.style.Pointer;
        TypedArray a = context.obtainStyledAttributes(null,
                com.android.internal.R.styleable.Pointer,
                com.android.internal.R.attr.pointerStyle, 0);
                0, defStyle);
        int resourceId = a.getResourceId(styleIndex, -1);
        a.recycle();

+2.3 KiB
Loading image diff...
+1.14 KiB
Loading image diff...
+1.06 KiB
Loading image diff...
Loading