From 4a18c3e9b1bc98aa9e2f30d963bbd8f4f4adc430 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Sat, 22 Oct 2022 01:09:59 +0100 Subject: [PATCH] Rename pointer-related members to be more specific. mIcon / mIconType weren't specific enough to be immediately related to pointer icons. Rename them just to make that connection more obvious. Bug: 254277939 Test: simple IDE-assisted refactor Change-Id: Iffe3dd9a7bc2a8166ec411ff6b2f9c8c4d74738d --- .../server/input/InputManagerService.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java index c973cb8488803..b518b28683337 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java @@ -303,9 +303,9 @@ public class InputManagerService extends IInputManager.Stub private final AdditionalDisplayInputProperties mCurrentDisplayProperties = new AdditionalDisplayInputProperties(); @GuardedBy("mAdditionalDisplayInputPropertiesLock") - private int mIconType = PointerIcon.TYPE_NOT_SPECIFIED; + private int mPointerIconType = PointerIcon.TYPE_NOT_SPECIFIED; @GuardedBy("mAdditionalDisplayInputPropertiesLock") - private PointerIcon mIcon; + private PointerIcon mPointerIcon; // Holds all the registered gesture monitors that are implemented as spy windows. The spy // windows are mapped by their InputChannel tokens. @@ -2326,12 +2326,12 @@ public class InputManagerService extends IInputManager.Stub throw new IllegalArgumentException("Use setCustomPointerIcon to set custom pointers"); } synchronized (mAdditionalDisplayInputPropertiesLock) { - mIcon = null; - mIconType = iconType; + mPointerIcon = null; + mPointerIconType = iconType; if (!mCurrentDisplayProperties.pointerIconVisible) return; - mNative.setPointerIconType(mIconType); + mNative.setPointerIconType(mPointerIconType); } } @@ -2340,12 +2340,12 @@ public class InputManagerService extends IInputManager.Stub public void setCustomPointerIcon(PointerIcon icon) { Objects.requireNonNull(icon); synchronized (mAdditionalDisplayInputPropertiesLock) { - mIconType = PointerIcon.TYPE_CUSTOM; - mIcon = icon; + mPointerIconType = PointerIcon.TYPE_CUSTOM; + mPointerIcon = icon; if (!mCurrentDisplayProperties.pointerIconVisible) return; - mNative.setCustomPointerIcon(mIcon); + mNative.setCustomPointerIcon(mPointerIcon); } } @@ -3846,11 +3846,11 @@ public class InputManagerService extends IInputManager.Stub if (properties.pointerIconVisible != mCurrentDisplayProperties.pointerIconVisible) { mCurrentDisplayProperties.pointerIconVisible = properties.pointerIconVisible; if (properties.pointerIconVisible) { - if (mIconType == PointerIcon.TYPE_CUSTOM) { - Objects.requireNonNull(mIcon); - mNative.setCustomPointerIcon(mIcon); + if (mPointerIconType == PointerIcon.TYPE_CUSTOM) { + Objects.requireNonNull(mPointerIcon); + mNative.setCustomPointerIcon(mPointerIcon); } else { - mNative.setPointerIconType(mIconType); + mNative.setPointerIconType(mPointerIconType); } } else { mNative.setPointerIconType(PointerIcon.TYPE_NULL);