Do not update PointerIcon when stylus is not hovering

Updated maybeUpdatePointerIcon so that it only updates hover icon when
stylus is hovering.

Bug: 275851541
Test: manually tested
Change-Id: I08166f2fad3fe6da50bc142bc03223b99538780e
This commit is contained in:
Haoyu Zhang
2023-03-29 14:33:09 -07:00
parent 74b386c973
commit d0f6cb39f3

View File

@@ -6946,6 +6946,7 @@ public final class ViewRootImpl implements ViewParent,
return;
}
final boolean needsStylusPointerIcon = event.isStylusPointer()
&& event.isHoverEvent()
&& mInputManager.isStylusPointerIconEnabled();
if (needsStylusPointerIcon || event.isFromSource(InputDevice.SOURCE_MOUSE)) {
if (event.getActionMasked() == MotionEvent.ACTION_HOVER_ENTER