Re-land gesture detection for hybrid platform views (#61013)

This commit is contained in:
Kaushik Iska
2020-07-07 17:49:54 -07:00
committed by GitHub
parent 3176232cb4
commit ff6b7809bc
7 changed files with 64 additions and 1 deletions

View File

@@ -17,6 +17,8 @@ import static android.view.MotionEvent.PointerProperties;
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public class MotionEventCodec {
private static long MOTION_EVENT_ID = 1;
public static HashMap<String, Object> encode(MotionEvent event) {
ArrayList<HashMap<String,Object>> pointerProperties = new ArrayList<>();
ArrayList<HashMap<String,Object>> pointerCoords = new ArrayList<>();
@@ -46,6 +48,7 @@ public class MotionEventCodec {
eventMap.put("edgeFlags", event.getEdgeFlags());
eventMap.put("source", event.getSource());
eventMap.put("flags", event.getFlags());
eventMap.put("motionEventId", MOTION_EVENT_ID++);
return eventMap;
}