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

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

Merge "Reset gSystemIcons when accessibility large icon settings has changed."

parents 03c75de3 1f3dbffa
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -139,9 +139,7 @@ public final class PointerIcon implements Parcelable {

    private static final PointerIcon gNullIcon = new PointerIcon(STYLE_NULL);
    private static final SparseArray<PointerIcon> gSystemIcons = new SparseArray<PointerIcon>();

    /** @hide */
    public static boolean sUseLargeIcons = false;
    private static boolean sUseLargeIcons = false;

    private final int mStyle;
    private int mSystemIconResourceId;
@@ -234,6 +232,15 @@ public final class PointerIcon implements Parcelable {
        return icon;
    }

    /**
     * Updates wheter accessibility large icons are used or not.
     * @hide
     */
    public static void setUseLargeIcons(boolean use) {
        sUseLargeIcons = use;
        gSystemIcons.clear();
    }

    /**
     * Creates a custom pointer from the given bitmap and hotspot information.
     *
+1 −1
Original line number Diff line number Diff line
@@ -1602,7 +1602,7 @@ public class InputManagerService extends IInputManager.Stub
        final int accessibilityConfig = Settings.Secure.getIntForUser(
                mContext.getContentResolver(), Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON,
                0, UserHandle.USER_CURRENT);
        PointerIcon.sUseLargeIcons = (accessibilityConfig == 1);
        PointerIcon.setUseLargeIcons(accessibilityConfig == 1);
        nativeReloadPointerIcons(mPtr);
    }