Skip to content

Commit

Permalink
Update the logic to check for the source of a MotionEvent
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal] Update logic to check for source of MotionEvent for PointerEvents

Reviewed By: lunaleaps

Differential Revision: D41851881

fbshipit-source-id: af3a49d75fc3d58e70d210e7f93d3a6dba90d1c3
  • Loading branch information
m4gr3d authored and facebook-github-bot committed Dec 9, 2022
1 parent bc26a1b commit 4f142bf
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ public static boolean supportsHover(MotionEvent motionEvent) {
return true;
}

int source = motionEvent.getSource();
return source == InputDevice.SOURCE_MOUSE;
return motionEvent.isFromSource(InputDevice.SOURCE_MOUSE);
}

public static boolean isExitEvent(String eventName) {
Expand Down

0 comments on commit 4f142bf

Please sign in to comment.