Merge "Do not update PointerIcon when stylus is not hovering" into udc-dev

This commit is contained in:
Haoyu Zhang
2023-04-10 19:39:02 +00:00
committed by Android (Google) Code Review

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