Loading core/java/android/view/PointerIcon.java +4 −6 Original line number Diff line number Diff line Loading @@ -17,8 +17,6 @@ package android.view; import android.annotation.NonNull; import android.os.UserHandle; import android.provider.Settings; import android.util.SparseArray; import com.android.internal.util.XmlUtils; Loading Loading @@ -142,6 +140,9 @@ 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 final int mStyle; private int mSystemIconResourceId; private Bitmap mBitmap; Loading Loading @@ -210,10 +211,7 @@ 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) ? int defStyle = sUseLargeIcons ? com.android.internal.R.style.LargePointer : com.android.internal.R.style.Pointer; TypedArray a = context.obtainStyledAttributes(null, com.android.internal.R.styleable.Pointer, Loading services/core/java/com/android/server/input/InputManagerService.java +11 −2 Original line number Diff line number Diff line Loading @@ -320,12 +320,13 @@ public class InputManagerService extends IInputManager.Stub public void onReceive(Context context, Intent intent) { updatePointerSpeedFromSettings(); updateShowTouchesFromSettings(); nativeReloadPointerIcons(mPtr); updateAccessibilityLargePointerFromSettings(); } }, new IntentFilter(Intent.ACTION_USER_SWITCHED), null, mHandler); updatePointerSpeedFromSettings(); updateShowTouchesFromSettings(); updateAccessibilityLargePointerFromSettings(); } // TODO(BT) Pass in paramter for bluetooth system Loading Loading @@ -1366,13 +1367,21 @@ public class InputManagerService extends IInputManager.Stub }, UserHandle.USER_ALL); } public void updateAccessibilityLargePointerFromSettings() { final int accessibilityConfig = Settings.Secure.getIntForUser( mContext.getContentResolver(), Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON, 0, UserHandle.USER_CURRENT); PointerIcon.sUseLargeIcons = (accessibilityConfig == 1); nativeReloadPointerIcons(mPtr); } private void registerAccessibilityLargePointerSettingObserver() { mContext.getContentResolver().registerContentObserver( Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON), true, new ContentObserver(mHandler) { @Override public void onChange(boolean selfChange) { nativeReloadPointerIcons(mPtr); updateAccessibilityLargePointerFromSettings(); } }, UserHandle.USER_ALL); } Loading Loading
core/java/android/view/PointerIcon.java +4 −6 Original line number Diff line number Diff line Loading @@ -17,8 +17,6 @@ package android.view; import android.annotation.NonNull; import android.os.UserHandle; import android.provider.Settings; import android.util.SparseArray; import com.android.internal.util.XmlUtils; Loading Loading @@ -142,6 +140,9 @@ 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 final int mStyle; private int mSystemIconResourceId; private Bitmap mBitmap; Loading Loading @@ -210,10 +211,7 @@ 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) ? int defStyle = sUseLargeIcons ? com.android.internal.R.style.LargePointer : com.android.internal.R.style.Pointer; TypedArray a = context.obtainStyledAttributes(null, com.android.internal.R.styleable.Pointer, Loading
services/core/java/com/android/server/input/InputManagerService.java +11 −2 Original line number Diff line number Diff line Loading @@ -320,12 +320,13 @@ public class InputManagerService extends IInputManager.Stub public void onReceive(Context context, Intent intent) { updatePointerSpeedFromSettings(); updateShowTouchesFromSettings(); nativeReloadPointerIcons(mPtr); updateAccessibilityLargePointerFromSettings(); } }, new IntentFilter(Intent.ACTION_USER_SWITCHED), null, mHandler); updatePointerSpeedFromSettings(); updateShowTouchesFromSettings(); updateAccessibilityLargePointerFromSettings(); } // TODO(BT) Pass in paramter for bluetooth system Loading Loading @@ -1366,13 +1367,21 @@ public class InputManagerService extends IInputManager.Stub }, UserHandle.USER_ALL); } public void updateAccessibilityLargePointerFromSettings() { final int accessibilityConfig = Settings.Secure.getIntForUser( mContext.getContentResolver(), Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON, 0, UserHandle.USER_CURRENT); PointerIcon.sUseLargeIcons = (accessibilityConfig == 1); nativeReloadPointerIcons(mPtr); } private void registerAccessibilityLargePointerSettingObserver() { mContext.getContentResolver().registerContentObserver( Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON), true, new ContentObserver(mHandler) { @Override public void onChange(boolean selfChange) { nativeReloadPointerIcons(mPtr); updateAccessibilityLargePointerFromSettings(); } }, UserHandle.USER_ALL); } Loading