From eef8f55dc6f0a2dc6507bde6f5793bd94296b913 Mon Sep 17 00:00:00 2001 From: Prabir Pradhan Date: Mon, 27 Mar 2023 21:35:01 +0000 Subject: [PATCH] Add sysprop to force enabling stylus pointer icon for debugging This will make developing and testing the stylus pointer icon pipeline easier. Bug: 274664001 Test: adb shell setprop persist.debug.input.force_enable_stylus_pointer_icon 1 Change-Id: I893a11140c18f28a8b04186a225de882fef5dad4 --- core/java/android/hardware/input/InputManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java index e7385b62faa65..9cacfff4b33a2 100644 --- a/core/java/android/hardware/input/InputManager.java +++ b/core/java/android/hardware/input/InputManager.java @@ -39,6 +39,7 @@ import android.os.InputEventInjectionSync; import android.os.RemoteException; import android.os.SystemClock; import android.os.Vibrator; +import android.sysprop.InputProperties; import android.util.Log; import android.view.Display; import android.view.InputDevice; @@ -1123,7 +1124,8 @@ public final class InputManager { public boolean isStylusPointerIconEnabled() { if (mIsStylusPointerIconEnabled == null) { mIsStylusPointerIconEnabled = getContext().getResources() - .getBoolean(com.android.internal.R.bool.config_enableStylusPointerIcon); + .getBoolean(com.android.internal.R.bool.config_enableStylusPointerIcon) + || InputProperties.force_enable_stylus_pointer_icon().orElse(false); } return mIsStylusPointerIconEnabled; }