@Implementation(minSdk = LOLLIPOP) @HiddenApi protected static float nativeGetRawAxisValue( long nativePtr, int axis, int pointerIndex, int historyPos) { NativeInput.MotionEvent event = getNativeMotionEvent(nativePtr); int pointerCount = event.getPointerCount(); validatePointerIndex(pointerIndex, pointerCount); if (historyPos == HISTORY_CURRENT) { return event.getRawAxisValue(axis, pointerIndex); } else { int historySize = event.getHistorySize(); validateHistoryPos(historyPos, historySize); return event.getHistoricalRawAxisValue(axis, pointerIndex, historyPos); } }
public float getHistoricalRawX(int pointerIndex, int historicalIndex) { return getHistoricalRawAxisValue(AMOTION_EVENT_AXIS_X, pointerIndex, historicalIndex); }
public float getHistoricalRawY(int pointerIndex, int historicalIndex) { return getHistoricalRawAxisValue(AMOTION_EVENT_AXIS_Y, pointerIndex, historicalIndex); }
public float getHistoricalRawY(int pointerIndex, int historicalIndex) { return getHistoricalRawAxisValue(AMOTION_EVENT_AXIS_Y, pointerIndex, historicalIndex); }
public float getHistoricalRawX(int pointerIndex, int historicalIndex) { return getHistoricalRawAxisValue(AMOTION_EVENT_AXIS_X, pointerIndex, historicalIndex); }
@Implementation(minSdk = LOLLIPOP) @HiddenApi protected static float nativeGetRawAxisValue( long nativePtr, int axis, int pointerIndex, int historyPos) { NativeInput.MotionEvent event = getNativeMotionEvent(nativePtr); int pointerCount = event.getPointerCount(); validatePointerIndex(pointerIndex, pointerCount); if (historyPos == HISTORY_CURRENT) { return event.getRawAxisValue(axis, pointerIndex); } else { int historySize = event.getHistorySize(); validateHistoryPos(historyPos, historySize); return event.getHistoricalRawAxisValue(axis, pointerIndex, historyPos); } }