From 4e668167f9ff6dc1ba0738d928caa95e1732c084 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Mon, 28 Nov 2022 11:01:32 -0800 Subject: [PATCH] PointerEvents: Delete unused method Summary: Changelog: [Internal] - Clean up unused function for PointerEvents Reviewed By: vincentriemer, mdvacca Differential Revision: D41089897 fbshipit-source-id: 8c44b88d919f771fdafb2402ec71366dad6c6ed6 --- .../uimanager/events/PointerEventHelper.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEventHelper.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEventHelper.java index 544a9e8a31c..48408d7bcb5 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEventHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEventHelper.java @@ -11,9 +11,7 @@ import android.view.InputDevice; import android.view.MotionEvent; import android.view.View; import androidx.annotation.Nullable; -import com.facebook.common.logging.FLog; import com.facebook.react.R; -import com.facebook.react.common.ReactConstants; /** Class responsible for generating catalyst touch events based on android {@link MotionEvent}. */ public class PointerEventHelper { @@ -52,31 +50,6 @@ public class PointerEventHelper { public static final String POINTER_OVER = "topPointerOver"; public static final String POINTER_OUT = "topPointerOut"; - /** We don't dispatch capture events from native; that's currently handled by JS. */ - public static @Nullable String getDispatchableEventName(EVENT event) { - switch (event) { - case LEAVE: - return PointerEventHelper.POINTER_LEAVE; - case DOWN: - return PointerEventHelper.POINTER_DOWN; - case MOVE: - return PointerEventHelper.POINTER_MOVE; - case ENTER: - return PointerEventHelper.POINTER_ENTER; - case CANCEL: - return PointerEventHelper.POINTER_CANCEL; - case UP: - return PointerEventHelper.POINTER_UP; - case OVER: - return PointerEventHelper.POINTER_OVER; - case OUT: - return PointerEventHelper.POINTER_OUT; - default: - FLog.e(ReactConstants.TAG, "No dispatchable event name for type: " + event); - return null; - } - } - // https://w3c.github.io/pointerevents/#the-buttons-property public static int getButtons(String eventName, String pointerType, int buttonState) { if (isExitEvent(eventName)) {