List of usage examples for android.view InputEvent getDevice
public final InputDevice getDevice()
From source file:ch.jeda.platform.android.CanvasFragment.java
private static EventSource mapDevice(final android.view.InputEvent event) { final android.view.InputDevice device = event.getDevice(); final int id = device.getId(); if (!INPUT_DEVICE_MAP.containsKey(id)) { INPUT_DEVICE_MAP.put(id, new EventSource(device.getName())); }/* w w w . jav a2 s . co m*/ return INPUT_DEVICE_MAP.get(id); }
From source file:com.google.fpl.voltair.VoltAirActivity.java
private static boolean isFromSource(InputEvent event, int querySource) { return isSourceType(event.getDevice(), querySource); }