diff --git a/leankeykeyboard/src/main/java/com/google/android/leanback/ime/LeanbackKeyboardContainer.java b/leankeykeyboard/src/main/java/com/google/android/leanback/ime/LeanbackKeyboardContainer.java index 5087f2b..41b0107 100644 --- a/leankeykeyboard/src/main/java/com/google/android/leanback/ime/LeanbackKeyboardContainer.java +++ b/leankeykeyboard/src/main/java/com/google/android/leanback/ime/LeanbackKeyboardContainer.java @@ -312,12 +312,15 @@ public class LeanbackKeyboardContainer { onShiftDoubleClick(isCapsLockOn()); } - private void setImeOptions(Resources res, EditorInfo info) { + // NOTE: suggestions settings applied here + private void setImeOptions(Resources resources, EditorInfo info) { + // do not erase last keyboard if (mInitialMainKeyboard == null) { mInitialMainKeyboard = mAbcKeyboard; } mSuggestionsEnabled = false; + // fix auto space after period mAutoEnterSpaceEnabled = false; mVoiceEnabled = false; mEscapeNorthEnabled = false; @@ -398,19 +401,19 @@ public class LeanbackKeyboardContainer { if (TextUtils.isEmpty(mEnterKeyText)) { switch (LeanbackUtils.getImeAction(info)) { case EditorInfo.IME_ACTION_GO: - this.mEnterKeyTextResId = R.string.label_go_key; + mEnterKeyTextResId = R.string.label_go_key; return; case EditorInfo.IME_ACTION_SEARCH: - this.mEnterKeyTextResId = R.string.label_search_key; + mEnterKeyTextResId = R.string.label_search_key; return; case EditorInfo.IME_ACTION_SEND: - this.mEnterKeyTextResId = R.string.label_send_key; + mEnterKeyTextResId = R.string.label_send_key; return; case EditorInfo.IME_ACTION_NEXT: - this.mEnterKeyTextResId = R.string.label_next_key; + mEnterKeyTextResId = R.string.label_next_key; return; default: - this.mEnterKeyTextResId = R.string.label_done_key; + mEnterKeyTextResId = R.string.label_done_key; } } diff --git a/leankeykeyboard/src/main/java/com/google/android/pano/util/TouchNavMotionTracker.java b/leankeykeyboard/src/main/java/com/google/android/pano/util/TouchNavMotionTracker.java index eba1561..a111a95 100644 --- a/leankeykeyboard/src/main/java/com/google/android/pano/util/TouchNavMotionTracker.java +++ b/leankeykeyboard/src/main/java/com/google/android/pano/util/TouchNavMotionTracker.java @@ -33,18 +33,18 @@ public class TouchNavMotionTracker { resolutionX = 6.3F; } - this.mResolutionX = resolutionX; + mResolutionX = resolutionX; if (resolutionY <= 0.0F) { resolutionY = 6.3F; } - this.mResolutionY = resolutionY; - this.mMaxFlingVelocityX = this.mResolutionX * 1270.0F; - this.mMaxFlingVelocityY = this.mResolutionY * 1270.0F; - this.mMinFlingVelocityX = this.mResolutionX * 200.0F; - this.mMinFlingVelocityY = this.mResolutionY * 200.0F; - this.mMinScrollX = this.mResolutionX * minScrollDist; - this.mMinScrollY = this.mResolutionY * minScrollDist; + mResolutionY = resolutionY; + mMaxFlingVelocityX = mResolutionX * MAXIMUM_FLING_VELOCITY; + mMaxFlingVelocityY = mResolutionY * MAXIMUM_FLING_VELOCITY; + mMinFlingVelocityX = mResolutionX * MINIMUM_FLING_VELOCITY; + mMinFlingVelocityY = mResolutionY * MINIMUM_FLING_VELOCITY; + mMinScrollX = mResolutionX * minScrollDist; + mMinScrollY = mResolutionY * minScrollDist; } @SuppressLint("NewApi") @@ -77,88 +77,88 @@ public class TouchNavMotionTracker { return new TouchNavMotionTracker(resolutionX, resolutionY, minScrollDist); } - public void addMovement(MotionEvent var1) { - if (this.mVelocityTracker == null) { - this.mVelocityTracker = VelocityTracker.obtain(); + public void addMovement(MotionEvent event) { + if (mVelocityTracker == null) { + mVelocityTracker = VelocityTracker.obtain(); } - this.mVelocityTracker.addMovement(var1); + mVelocityTracker.addMovement(event); } public void clear() { - if (this.mDownEvent != null) { - this.mDownEvent.recycle(); - this.mDownEvent = null; + if (mDownEvent != null) { + mDownEvent.recycle(); + mDownEvent = null; } - if (this.mVelocityTracker != null) { - this.mVelocityTracker.recycle(); - this.mVelocityTracker = null; + if (mVelocityTracker != null) { + mVelocityTracker.recycle(); + mVelocityTracker = null; } } public boolean computeVelocity() { - this.mVelocityTracker.computeCurrentVelocity(1000); - this.mVelX = Math.min(this.mMaxFlingVelocityX, this.mVelocityTracker.getXVelocity()); - this.mVelY = Math.min(this.mMaxFlingVelocityY, this.mVelocityTracker.getYVelocity()); - return Math.abs(this.mVelX) > this.mMinFlingVelocityX || Math.abs(this.mVelY) > this.mMinFlingVelocityY; + mVelocityTracker.computeCurrentVelocity(1000); + mVelX = Math.min(mMaxFlingVelocityX, mVelocityTracker.getXVelocity()); + mVelY = Math.min(mMaxFlingVelocityY, mVelocityTracker.getYVelocity()); + return Math.abs(mVelX) > mMinFlingVelocityX || Math.abs(mVelY) > mMinFlingVelocityY; } public MotionEvent getDownEvent() { - return this.mDownEvent; + return mDownEvent; } - public float getPhysicalX(float var1) { - return var1 / this.mResolutionX; + public float getPhysicalX(float x) { + return x / mResolutionX; } - public float getPhysicalY(float var1) { - return var1 / this.mResolutionY; + public float getPhysicalY(float y) { + return y / mResolutionY; } public float getScrollX() { - return this.mScrollX; + return mScrollX; } public float getScrollY() { - return this.mScrollY; + return mScrollY; } public float getXResolution() { - return this.mResolutionX; + return mResolutionX; } public float getXVel() { - return this.mVelX; + return mVelX; } public float getYResolution() { - return this.mResolutionY; + return mResolutionY; } public float getYVel() { - return this.mVelY; + return mVelY; } - public void setDownEvent(MotionEvent var1) { - if (this.mDownEvent != null && var1 != this.mDownEvent) { - this.mDownEvent.recycle(); + public void setDownEvent(MotionEvent event) { + if (mDownEvent != null && event != mDownEvent) { + mDownEvent.recycle(); } - this.mDownEvent = var1; + mDownEvent = event; } - public boolean setNewValues(float var1, float var2) { - this.mCurrX = var1; - this.mCurrY = var2; - this.mScrollX = this.mCurrX - this.mPrevX; - this.mScrollY = this.mCurrY - this.mPrevY; - return Math.abs(this.mScrollX) > this.mMinScrollX || Math.abs(this.mScrollY) > this.mMinScrollY; + public boolean setNewValues(float currX, float currY) { + mCurrX = currX; + mCurrY = currY; + mScrollX = mCurrX - mPrevX; + mScrollY = mCurrY - mPrevY; + return Math.abs(mScrollX) > mMinScrollX || Math.abs(mScrollY) > mMinScrollY; } public void updatePrevValues() { - this.mPrevX = this.mCurrX; - this.mPrevY = this.mCurrY; + mPrevX = mCurrX; + mPrevY = mCurrY; } } diff --git a/leankeykeyboard/src/main/java/com/google/android/pano/util/TouchNavSpaceTracker.java b/leankeykeyboard/src/main/java/com/google/android/pano/util/TouchNavSpaceTracker.java index 86e5e88..351a3ff 100644 --- a/leankeykeyboard/src/main/java/com/google/android/pano/util/TouchNavSpaceTracker.java +++ b/leankeykeyboard/src/main/java/com/google/android/pano/util/TouchNavSpaceTracker.java @@ -13,581 +13,587 @@ import android.view.ViewConfiguration; import android.view.animation.AccelerateInterpolator; public class TouchNavSpaceTracker { - private static final boolean DEBUG = false; - public static final float DEFAULT_DAMPED_SENSITIVITY = 0.5F; - public static final long DEFAULT_DAMPENING_DURATION_MS = 200L; - public static final long DEFAULT_DAMPING_DURATION_MS = 200L; - public static final float DEFAULT_HORIZONTAL_SIZE_MM = 120.0F; - public static final float DEFAULT_LPF_COEFF = 0.25F; - public static final float DEFAULT_MAX_FLICK_DISTANCE_MM = 40.0F; - public static final long DEFAULT_MAX_FLICK_DURATION_MS = 250L; - public static final float DEFAULT_MIN_FLICK_DISTANCE_MM = 4.0F; - public static final float DEFAULT_SENSITIVITY = 1.0F; - public static final float DEFAULT_VERTICAL_SIZE_MM = 50.0F; - private static final int[] DIRECTIONS = new int[]{1, 3, 2, 6, 4, 12, 8, 9, 1}; - private static final float[] DIRECTION_BOUNDARIES = new float[]{-2.7488935F, -1.9634954F, -1.1780972F, -0.3926991F, 0.3926991F, 1.1780972F, 1.9634954F, 2.7488935F}; - public static final int DIRECTION_DOWN = 2; - public static final int DIRECTION_DOWN_LEFT = 3; - public static final int DIRECTION_DOWN_RIGHT = 6; - public static final int DIRECTION_LEFT = 1; - public static final int DIRECTION_RIGHT = 4; - public static final int DIRECTION_UP = 8; - public static final int DIRECTION_UP_LEFT = 9; - public static final int DIRECTION_UP_RIGHT = 12; - private static final int MSG_LONG_CLICK = 0; - private static final String TAG = "TouchNavSpaceTracker"; - private float mDampedSensitivity; - private float mDampingDuration; - private float mFlickMaxDistance; - private long mFlickMaxDuration; - private float mFlickMaxSquared; - private float mFlickMinDistance; - private float mFlickMinSquared; - private Handler mHandler; - protected TouchNavSpaceTracker.KeyEventListener mKeyEventListener; - private float mLPFCurrX; - private float mLPFCurrY; - private boolean mLPFEnabled; - private long mMovementBlockTime; - private float mPhysicalHeight; - private PointF mPhysicalPosition; - private float mPhysicalWidth; - private float mPixelHeight; - protected TouchNavSpaceTracker.TouchEventListener mPixelListener; - private float mPixelWidth; - private float mPixelsPerMm; - private PointF mPrevPhysPosition; - private float mSensitivity; - private TimeInterpolator mSensitivityInterpolator; - protected final SparseArray mTouchParams; - private float mUnscaledFlickMaxDistance; - private float mUnscaledFlickMinDistance; - private boolean mWasBlocked; + private static final boolean DEBUG = false; + public static final float DEFAULT_DAMPED_SENSITIVITY = 0.5F; + public static final long DEFAULT_DAMPENING_DURATION_MS = 200L; + public static final long DEFAULT_DAMPING_DURATION_MS = 200L; + public static final float DEFAULT_HORIZONTAL_SIZE_MM = 120.0F; + public static final float DEFAULT_LPF_COEFF = 0.25F; + public static final float DEFAULT_MAX_FLICK_DISTANCE_MM = 40.0F; + public static final long DEFAULT_MAX_FLICK_DURATION_MS = 250L; + public static final float DEFAULT_MIN_FLICK_DISTANCE_MM = 4.0F; + public static final float DEFAULT_SENSITIVITY = 1.0F; + public static final float DEFAULT_VERTICAL_SIZE_MM = 50.0F; + private static final int[] DIRECTIONS = new int[]{1, 3, 2, 6, 4, 12, 8, 9, 1}; + private static final float[] DIRECTION_BOUNDARIES = new float[]{-2.7488935F, -1.9634954F, -1.1780972F, -0.3926991F, 0.3926991F, 1.1780972F, + 1.9634954F, 2.7488935F}; + public static final int DIRECTION_DOWN = 2; + public static final int DIRECTION_DOWN_LEFT = 3; + public static final int DIRECTION_DOWN_RIGHT = 6; + public static final int DIRECTION_LEFT = 1; + public static final int DIRECTION_RIGHT = 4; + public static final int DIRECTION_UP = 8; + public static final int DIRECTION_UP_LEFT = 9; + public static final int DIRECTION_UP_RIGHT = 12; + private static final int MSG_LONG_CLICK = 0; + private static final String TAG = "TouchNavSpaceTracker"; + private float mDampedSensitivity; + private float mDampingDuration; + private float mFlickMaxDistance; + private long mFlickMaxDuration; + private float mFlickMaxSquared; + private float mFlickMinDistance; + private float mFlickMinSquared; + private Handler mHandler; + protected TouchNavSpaceTracker.KeyEventListener mKeyEventListener; + private float mLPFCurrX; + private float mLPFCurrY; + private boolean mLPFEnabled; + private long mMovementBlockTime; + private float mPhysicalHeight; + private PointF mPhysicalPosition; + private float mPhysicalWidth; + private float mPixelHeight; + protected TouchNavSpaceTracker.TouchEventListener mPixelListener; + private float mPixelWidth; + private float mPixelsPerMm; + private PointF mPrevPhysPosition; + private float mSensitivity; + private TimeInterpolator mSensitivityInterpolator; + protected final SparseArray mTouchParams; + private float mUnscaledFlickMaxDistance; + private float mUnscaledFlickMinDistance; + private boolean mWasBlocked; - public TouchNavSpaceTracker() { - this((TouchNavSpaceTracker.KeyEventListener)null, (TouchNavSpaceTracker.TouchEventListener)null); - } + public TouchNavSpaceTracker() { + this(null, null); + } - public TouchNavSpaceTracker(TouchNavSpaceTracker.KeyEventListener var1, TouchNavSpaceTracker.TouchEventListener var2) { - this.mPrevPhysPosition = new PointF(Float.MIN_VALUE, Float.MIN_VALUE); - this.mPhysicalPosition = new PointF(Float.MIN_VALUE, Float.MIN_VALUE); - this.mWasBlocked = false; - this.mSensitivityInterpolator = new AccelerateInterpolator(); - this.mDampingDuration = 200.0F; - this.mDampedSensitivity = 0.5F; - this.mSensitivity = 1.0F; - this.mUnscaledFlickMinDistance = 4.0F; - this.mUnscaledFlickMaxDistance = 40.0F; - this.mFlickMinDistance = this.mSensitivity * 4.0F; - this.mFlickMaxDistance = this.mSensitivity * 40.0F; - this.mFlickMinSquared = this.mFlickMinDistance * this.mFlickMinDistance; - this.mFlickMaxSquared = this.mFlickMaxDistance * this.mFlickMaxDistance; - this.mFlickMaxDuration = 250L; - this.mLPFEnabled = false; - this.mHandler = new Handler() { - public void handleMessage(Message var1) { - switch(var1.what) { - case 0: - if (TouchNavSpaceTracker.this.mKeyEventListener != null) { - TouchNavSpaceTracker.this.mKeyEventListener.onKeyLongPress(var1.arg1, (KeyEvent)var1.obj); - return; - } - default: - } - } - }; - this.mKeyEventListener = var1; - this.mPixelListener = var2; - this.mTouchParams = new SparseArray(1); - this.mPhysicalWidth = 120.0F; - this.mPhysicalHeight = 50.0F; - this.mPixelWidth = 0.0F; - this.mPixelHeight = 0.0F; - this.mPixelsPerMm = 0.0F; - } - - private float calculateSensitivity(MotionEvent var1, MotionEvent var2) { - long var4 = var1.getEventTime() - var2.getEventTime(); - float var3; - if (var1.getEventTime() < this.mMovementBlockTime) { - var3 = 0.0F; - this.mWasBlocked = true; - } else if ((float)var4 < this.mDampingDuration) { - var3 = this.mSensitivityInterpolator.getInterpolation((float)var4 / this.mDampingDuration); - var3 = this.mDampedSensitivity + (this.mSensitivity - this.mDampedSensitivity) * var3; - } else { - var3 = this.mSensitivity; - } - - if (var3 != 0.0F && this.mWasBlocked) { - this.mWasBlocked = false; - this.setPhysicalPosition(this.mPhysicalPosition.x, this.mPhysicalPosition.y); - } - - return var3; - } - - private void checkForLongClick(int var1, KeyEvent event) { - if (var1 == 23) { - Message msg = this.mHandler.obtainMessage(0); - msg.arg1 = var1; - msg.obj = event; - if (!this.mHandler.hasMessages(0)) { - this.mHandler.sendMessageDelayed(msg, (long)ViewConfiguration.getLongPressTimeout()); - return; - } - } - - } - - private void clampPosition() { - if (this.mPhysicalPosition.x < 0.0F) { - this.setPhysicalPosition(0.0F, this.mPhysicalPosition.y); - } else if (this.mPhysicalPosition.x > this.mPhysicalWidth) { - this.setPhysicalPosition(this.mPhysicalWidth, this.mPhysicalPosition.y); - } - - if (this.mPhysicalPosition.y < 0.0F) { - this.setPhysicalPosition(this.mPhysicalPosition.x, 0.0F); - } else if (this.mPhysicalPosition.y > this.mPhysicalHeight) { - this.setPhysicalPosition(this.mPhysicalPosition.x, this.mPhysicalHeight); - return; - } - - } - - private int getDpadDirection(float var1, float var2) { - var1 = (float)Math.atan2((double)(-var2), (double)var1); - - int var3; - for(var3 = 0; var3 < DIRECTION_BOUNDARIES.length && var1 >= DIRECTION_BOUNDARIES[var3]; ++var3) { - ; - } - - return DIRECTIONS[var3]; - } - - private float getPhysicalX(float var1) { - return this.mPixelWidth <= 0.0F ? 0.0F : this.mPhysicalWidth * var1 / this.mPixelWidth; - } - - private float getPhysicalY(float var1) { - return this.mPixelHeight <= 0.0F ? 0.0F : this.mPhysicalHeight * var1 / this.mPixelHeight; - } - - private float getPixelX(float var1) { - return this.mPixelWidth * var1 / this.mPhysicalWidth; - } - - private float getPixelY(float var1) { - return this.mPixelHeight * var1 / this.mPhysicalHeight; - } - - private int getPrimaryDpadDirection(float var1, float var2) { - if (Math.abs(var1) > Math.abs(var2)) { - return var1 > 0.0F ? 4 : 1; - } else { - return var2 > 0.0F ? 2 : 8; - } - } - - private float getScaledValue(float var1, float var2) { - return var1 * var2; - } - - private TouchNavMotionTracker getTrackerForDevice(InputDevice var1) { - TouchNavMotionTracker var3 = (TouchNavMotionTracker)this.mTouchParams.get(var1.getId()); - TouchNavMotionTracker var2 = var3; - if (var3 == null) { - var2 = TouchNavMotionTracker.buildTrackerForDevice(var1, 0.1F); - this.mTouchParams.put(var1.getId(), var2); - } - - return var2; - } - - private void setPhysicalSizeInternal(float var1, float var2) { - this.mPhysicalWidth = var1; - this.mPhysicalHeight = var2; - if (this.mPhysicalPosition.x > this.mPhysicalWidth) { - this.mPhysicalPosition.x = this.mPhysicalWidth; - } - - if (this.mPhysicalPosition.y > this.mPhysicalHeight) { - this.mPhysicalPosition.y = this.mPhysicalHeight; - } - - } - - private void updatePhysicalSize() { - if (this.mPixelWidth > 0.0F && this.mPixelHeight > 0.0F && this.mPixelsPerMm > 0.0F) { - this.setPhysicalSizeInternal(this.mPixelWidth / this.mPixelsPerMm, this.mPixelHeight / this.mPixelsPerMm); - } - - } - - public void blockMovementUntil(long var1) { - this.mMovementBlockTime = var1; - } - - public void configureDamping(float var1, long var2) { - this.mDampedSensitivity = var1; - this.mDampingDuration = (float)var2; - } - - public void configureFlicks(float var1, float var2, long var3) { - this.mUnscaledFlickMinDistance = var1; - this.mUnscaledFlickMaxDistance = var2; - this.mFlickMinDistance = this.mSensitivity * var1; - this.mFlickMaxDistance = this.mSensitivity * var2; - this.mFlickMinSquared = this.mFlickMinDistance * this.mFlickMinDistance; - this.mFlickMaxSquared = this.mFlickMaxDistance * this.mFlickMaxDistance; - this.mFlickMaxDuration = var3; - } - - public PointF getCurrentPhysicalPosition() { - return new PointF(this.mPhysicalPosition.x, this.mPhysicalPosition.y); - } - - public PointF getCurrentPixelPosition() { - return new PointF(this.getPixelX(this.mPhysicalPosition.x), this.getPixelY(this.mPhysicalPosition.y)); - } - - public boolean onGenericMotionEvent(MotionEvent event) { - if (event != null && (event.getSource() & InputDevice.SOURCE_TOUCH_NAVIGATION) == InputDevice.SOURCE_TOUCH_NAVIGATION) { - InputDevice var13 = event.getDevice(); - if (var13 == null) { - return false; - } - - TouchNavMotionTracker var19 = this.getTrackerForDevice(var13); - int var10 = event.getActionMasked(); - var19.addMovement(event); - boolean var6; - if ((var10 & 255) == 6) { - var6 = true; - } else { - var6 = false; - } - - int var7; - if (var6) { - var7 = event.getActionIndex(); - } else { - var7 = -1; - } - - float var3 = 0.0F; - float var2 = 0.0F; - int var9 = event.getPointerCount(); - - for(int var8 = 0; var8 < var9; ++var8) { - if (var7 != var8) { - var3 += event.getX(var8); - var2 += event.getY(var8); - } - } - - int var17; - if (var6) { - var17 = var9 - 1; - } else { - var17 = var9; - } - - float var4 = var3 / (float)var17; - float var5 = var2 / (float)var17; - TouchNavSpaceTracker.PhysicalMotionEvent var14 = new TouchNavSpaceTracker.PhysicalMotionEvent(event.getDeviceId(), var19.getPhysicalX(var4), var19.getPhysicalX(var5), event.getEventTime()); - boolean var18 = false; - boolean var12 = false; - boolean var11; - MotionEvent var15; - TouchNavSpaceTracker.PhysicalMotionEvent var16; - switch(var10 & 255) { - case 0: - if (this.mLPFEnabled) { - this.mLPFCurrX = var4; - this.mLPFCurrY = var5; - } - - var19.setNewValues(var4, var5); - var19.updatePrevValues(); - var19.setDownEvent(MotionEvent.obtain(event)); - if (this.mPixelListener != null) { - return false | this.mPixelListener.onDown(var14); - } - break; - case 1: - var15 = var19.getDownEvent(); - if (var15 == null) { - Log.w("TouchNavSpaceTracker", "Up event without down event"); - return false | this.mPixelListener.onUp(var14, this.getPixelX(this.mPhysicalPosition.x), this.getPixelY(this.mPhysicalPosition.y)); - } - - var16 = new TouchNavSpaceTracker.PhysicalMotionEvent(event.getDeviceId(), var19.getPhysicalX(var15.getX()), var19.getPhysicalY(var15.getY()), var15.getEventTime()); - var6 = var18; - if (var19.computeVelocity()) { - var6 = var18; - if (this.mPixelListener != null) { - var2 = this.getPixelX(var19.getPhysicalX(var19.getXVel())); - var3 = this.getPixelY(var19.getPhysicalY(var19.getYVel())); - var18 = false | this.mPixelListener.onFling(var16, var14, var2, var3); - var6 = var18; - if (var14.getTime() - var16.getTime() < this.mFlickMaxDuration) { - var2 = var14.getX() - var16.getX(); - var3 = var14.getY() - var16.getY(); - var4 = var2 * var2 + var3 * var3; - var6 = var18; - if (var4 > this.mFlickMinSquared) { - var6 = var18; - if (var4 < this.mFlickMaxSquared) { - this.mPixelListener.onFlick(var16, var14, this.getDpadDirection(var2, var3), this.getPrimaryDpadDirection(var2, var3)); - var6 = var18; + public TouchNavSpaceTracker(TouchNavSpaceTracker.KeyEventListener keyListener, TouchNavSpaceTracker.TouchEventListener pixelSpaceListener) { + mPrevPhysPosition = new PointF(Float.MIN_VALUE, Float.MIN_VALUE); + mPhysicalPosition = new PointF(Float.MIN_VALUE, Float.MIN_VALUE); + mWasBlocked = false; + mSensitivityInterpolator = new AccelerateInterpolator(); + mDampingDuration = DEFAULT_DAMPING_DURATION_MS; + mDampedSensitivity = DEFAULT_DAMPED_SENSITIVITY; + mSensitivity = DEFAULT_SENSITIVITY; + mUnscaledFlickMinDistance = DEFAULT_MIN_FLICK_DISTANCE_MM; + mUnscaledFlickMaxDistance = DEFAULT_MAX_FLICK_DISTANCE_MM; + mFlickMinDistance = mSensitivity * DEFAULT_MIN_FLICK_DISTANCE_MM; + mFlickMaxDistance = mSensitivity * DEFAULT_MAX_FLICK_DISTANCE_MM; + mFlickMinSquared = mFlickMinDistance * mFlickMinDistance; + mFlickMaxSquared = mFlickMaxDistance * mFlickMaxDistance; + mFlickMaxDuration = DEFAULT_MAX_FLICK_DURATION_MS; + mLPFEnabled = false; + mHandler = new Handler() { + public void handleMessage(Message msg) { + switch (msg.what) { + case 0: + if (TouchNavSpaceTracker.this.mKeyEventListener != null) { + TouchNavSpaceTracker.this.mKeyEventListener.onKeyLongPress(msg.arg1, (KeyEvent) msg.obj); + return; } - } - } - } + default: + } + } + }; + mKeyEventListener = keyListener; + mPixelListener = pixelSpaceListener; + mTouchParams = new SparseArray<>(1); + mPhysicalWidth = DEFAULT_HORIZONTAL_SIZE_MM; + mPhysicalHeight = DEFAULT_VERTICAL_SIZE_MM; + mPixelWidth = 0.0F; + mPixelHeight = 0.0F; + mPixelsPerMm = 0.0F; + } + + private float calculateSensitivity(MotionEvent var1, MotionEvent var2) { + long var4 = var1.getEventTime() - var2.getEventTime(); + float var3; + if (var1.getEventTime() < this.mMovementBlockTime) { + var3 = 0.0F; + this.mWasBlocked = true; + } else if ((float) var4 < this.mDampingDuration) { + var3 = this.mSensitivityInterpolator.getInterpolation((float) var4 / this.mDampingDuration); + var3 = this.mDampedSensitivity + (this.mSensitivity - this.mDampedSensitivity) * var3; + } else { + var3 = this.mSensitivity; + } + + if (var3 != 0.0F && this.mWasBlocked) { + this.mWasBlocked = false; + this.setPhysicalPosition(this.mPhysicalPosition.x, this.mPhysicalPosition.y); + } + + return var3; + } + + private void checkForLongClick(int var1, KeyEvent event) { + if (var1 == 23) { + Message msg = this.mHandler.obtainMessage(0); + msg.arg1 = var1; + msg.obj = event; + if (!this.mHandler.hasMessages(0)) { + this.mHandler.sendMessageDelayed(msg, (long) ViewConfiguration.getLongPressTimeout()); + return; + } + } + + } + + private void clampPosition() { + if (mPhysicalPosition.x < 0.0F) { + setPhysicalPosition(0.0F, mPhysicalPosition.y); + } else if (mPhysicalPosition.x > mPhysicalWidth) { + setPhysicalPosition(mPhysicalWidth, mPhysicalPosition.y); + } + + if (mPhysicalPosition.y < 0.0F) { + setPhysicalPosition(mPhysicalPosition.x, 0.0F); + } else if (mPhysicalPosition.y > mPhysicalHeight) { + setPhysicalPosition(mPhysicalPosition.x, mPhysicalHeight); + } + } + + private int getDpadDirection(final float dx, final float dy) { + final float polar = (float) Math.atan2((double) (-dy), (double) dx); + + int idx; + for (idx = 0; idx < DIRECTION_BOUNDARIES.length && polar >= DIRECTION_BOUNDARIES[idx]; ++idx) { + ; + } + + return DIRECTIONS[idx]; + } + + private float getPhysicalX(float x) { + return this.mPixelWidth <= 0.0F ? 0.0F : this.mPhysicalWidth * x / this.mPixelWidth; + } + + private float getPhysicalY(float y) { + return this.mPixelHeight <= 0.0F ? 0.0F : this.mPhysicalHeight * y / this.mPixelHeight; + } + + private float getPixelX(float x) { + return this.mPixelWidth * x / this.mPhysicalWidth; + } + + private float getPixelY(float y) { + return this.mPixelHeight * y / this.mPhysicalHeight; + } + + private int getPrimaryDpadDirection(float var1, float var2) { + if (Math.abs(var1) > Math.abs(var2)) { + return var1 > 0.0F ? 4 : 1; + } else { + return var2 > 0.0F ? 2 : 8; + } + } + + private float getScaledValue(float var1, float var2) { + return var1 * var2; + } + + private TouchNavMotionTracker getTrackerForDevice(InputDevice device) { + TouchNavMotionTracker var3 = (TouchNavMotionTracker) this.mTouchParams.get(device.getId()); + TouchNavMotionTracker var2 = var3; + if (var3 == null) { + var2 = TouchNavMotionTracker.buildTrackerForDevice(device, 0.1F); + this.mTouchParams.put(device.getId(), var2); + } + + return var2; + } + + private void setPhysicalSizeInternal(float var1, float var2) { + this.mPhysicalWidth = var1; + this.mPhysicalHeight = var2; + if (this.mPhysicalPosition.x > this.mPhysicalWidth) { + this.mPhysicalPosition.x = this.mPhysicalWidth; + } + + if (this.mPhysicalPosition.y > this.mPhysicalHeight) { + this.mPhysicalPosition.y = this.mPhysicalHeight; + } + + } + + private void updatePhysicalSize() { + if (this.mPixelWidth > 0.0F && this.mPixelHeight > 0.0F && this.mPixelsPerMm > 0.0F) { + this.setPhysicalSizeInternal(this.mPixelWidth / this.mPixelsPerMm, this.mPixelHeight / this.mPixelsPerMm); + } + + } + + public void blockMovementUntil(long var1) { + this.mMovementBlockTime = var1; + } + + public void configureDamping(float var1, long var2) { + this.mDampedSensitivity = var1; + this.mDampingDuration = (float) var2; + } + + public void configureFlicks(float var1, float var2, long var3) { + this.mUnscaledFlickMinDistance = var1; + this.mUnscaledFlickMaxDistance = var2; + this.mFlickMinDistance = this.mSensitivity * var1; + this.mFlickMaxDistance = this.mSensitivity * var2; + this.mFlickMinSquared = this.mFlickMinDistance * this.mFlickMinDistance; + this.mFlickMaxSquared = this.mFlickMaxDistance * this.mFlickMaxDistance; + this.mFlickMaxDuration = var3; + } + + public PointF getCurrentPhysicalPosition() { + return new PointF(this.mPhysicalPosition.x, this.mPhysicalPosition.y); + } + + public PointF getCurrentPixelPosition() { + return new PointF(this.getPixelX(this.mPhysicalPosition.x), this.getPixelY(this.mPhysicalPosition.y)); + } + + public boolean onGenericMotionEvent(MotionEvent event) { + if (event != null && (event.getSource() & InputDevice.SOURCE_TOUCH_NAVIGATION) == InputDevice.SOURCE_TOUCH_NAVIGATION) { + InputDevice device = event.getDevice(); + if (device == null) { + return false; } - var2 = this.getPixelX(this.mPhysicalPosition.x); - var3 = this.getPixelY(this.mPhysicalPosition.y); - var11 = this.mPixelListener.onUp(var14, var2, var3); - var19.clear(); - return var6 | var11; - case 2: - if (var19.getDownEvent() == null) { - var19.setDownEvent(MotionEvent.obtain(event)); - if (this.mLPFEnabled) { - this.mLPFCurrX = var4; - this.mLPFCurrY = var5; - } + TouchNavMotionTracker tracker = this.getTrackerForDevice(device); + int action = event.getActionMasked(); + tracker.addMovement(event); + boolean pointerUp; + if ((action & 255) == MotionEvent.ACTION_POINTER_UP) { + pointerUp = true; + } else { + pointerUp = false; } - var3 = var4; - var2 = var5; - if (this.mLPFEnabled) { - this.mLPFCurrX = this.mLPFCurrX * 0.75F + 0.25F * var4; - this.mLPFCurrY = this.mLPFCurrY * 0.75F + 0.25F * var5; - var3 = this.mLPFCurrX; - var2 = this.mLPFCurrY; + int skipIndex; + if (pointerUp) { + skipIndex = event.getActionIndex(); + } else { + skipIndex = -1; } - if (var19.setNewValues(var3, var2)) { - var2 = var19.getPhysicalX(var19.getScrollX()); - var3 = var19.getPhysicalY(var19.getScrollY()); - var4 = this.calculateSensitivity(event, var19.getDownEvent()); - this.mPhysicalPosition.x = this.mPrevPhysPosition.x + this.getScaledValue(var2, var4); - this.mPhysicalPosition.y = this.mPrevPhysPosition.y + this.getScaledValue(var3, var4); - this.clampPosition(); - if (!this.mPhysicalPosition.equals(this.mPrevPhysPosition)) { - var11 = var12; - if (this.mPixelListener != null) { - var11 = var12; - if (this.mPixelHeight > 0.0F) { - var11 = var12; - if (this.mPixelWidth > 0.0F) { - var15 = var19.getDownEvent(); - var16 = new TouchNavSpaceTracker.PhysicalMotionEvent(event.getDeviceId(), var19.getPhysicalX(var15.getX()), var19.getPhysicalY(var15.getY()), var15.getEventTime()); - var2 = this.getPixelX(this.mPhysicalPosition.x); - var3 = this.getPixelY(this.mPhysicalPosition.y); - var11 = false | this.mPixelListener.onMove(var16, var14, var2, var3); + float sumX = 0.0F; + float sumY = 0.0F; + int count = event.getPointerCount(); + + for (int i = 0; i < count; ++i) { + if (skipIndex != i) { + sumX += event.getX(i); + sumY += event.getY(i); + } + } + + int div; + if (pointerUp) { + div = count - 1; + } else { + div = count; + } + + float currX = sumX / (float) div; + float currY = sumY / (float) div; + TouchNavSpaceTracker.PhysicalMotionEvent pe = new TouchNavSpaceTracker.PhysicalMotionEvent(event.getDeviceId(), tracker.getPhysicalX + (currX), tracker.getPhysicalX(currY), event.getEventTime()); + boolean var18 = false; + boolean var12 = false; + boolean var11; + MotionEvent var15; + TouchNavSpaceTracker.PhysicalMotionEvent var16; + switch (action & 255) { + case MotionEvent.ACTION_DOWN: + if (mLPFEnabled) { + mLPFCurrX = currX; + mLPFCurrY = currY; + } + + tracker.setNewValues(currX, currY); + tracker.updatePrevValues(); + tracker.setDownEvent(MotionEvent.obtain(event)); + if (mPixelListener != null) { + return mPixelListener.onDown(pe); + } + break; + case MotionEvent.ACTION_UP: + var15 = tracker.getDownEvent(); + if (var15 == null) { + Log.w("TouchNavSpaceTracker", "Up event without down event"); + return false | this.mPixelListener.onUp(pe, this.getPixelX(this.mPhysicalPosition.x), + this.getPixelY(this.mPhysicalPosition.y)); + } + + var16 = new TouchNavSpaceTracker.PhysicalMotionEvent(event.getDeviceId(), tracker.getPhysicalX(var15.getX()), tracker.getPhysicalY + (var15.getY()), var15.getEventTime()); + pointerUp = var18; + if (tracker.computeVelocity()) { + pointerUp = var18; + if (this.mPixelListener != null) { + sumY = this.getPixelX(tracker.getPhysicalX(tracker.getXVel())); + sumX = this.getPixelY(tracker.getPhysicalY(tracker.getYVel())); + var18 = false | this.mPixelListener.onFling(var16, pe, sumY, sumX); + pointerUp = var18; + if (pe.getTime() - var16.getTime() < this.mFlickMaxDuration) { + sumY = pe.getX() - var16.getX(); + sumX = pe.getY() - var16.getY(); + currX = sumY * sumY + sumX * sumX; + pointerUp = var18; + if (currX > this.mFlickMinSquared) { + pointerUp = var18; + if (currX < this.mFlickMaxSquared) { + this.mPixelListener.onFlick(var16, pe, this.getDpadDirection(sumY, sumX), this.getPrimaryDpadDirection + (sumY, sumX)); + pointerUp = var18; + } + } + } } - } - } + } - this.mPrevPhysPosition.set(this.mPhysicalPosition); - } else { - var11 = false | true; - } + sumY = this.getPixelX(this.mPhysicalPosition.x); + sumX = this.getPixelY(this.mPhysicalPosition.y); + var11 = this.mPixelListener.onUp(pe, sumY, sumX); + tracker.clear(); + return pointerUp | var11; + case MotionEvent.ACTION_MOVE: + if (tracker.getDownEvent() == null) { + tracker.setDownEvent(MotionEvent.obtain(event)); + if (this.mLPFEnabled) { + this.mLPFCurrX = currX; + this.mLPFCurrY = currY; + } + } - var19.updatePrevValues(); - return var11; + sumX = currX; + sumY = currY; + if (this.mLPFEnabled) { + this.mLPFCurrX = this.mLPFCurrX * 0.75F + DEFAULT_LPF_COEFF * currX; + this.mLPFCurrY = this.mLPFCurrY * 0.75F + DEFAULT_LPF_COEFF * currY; + sumX = this.mLPFCurrX; + sumY = this.mLPFCurrY; + } + + if (tracker.setNewValues(sumX, sumY)) { + sumY = tracker.getPhysicalX(tracker.getScrollX()); + sumX = tracker.getPhysicalY(tracker.getScrollY()); + currX = this.calculateSensitivity(event, tracker.getDownEvent()); + this.mPhysicalPosition.x = this.mPrevPhysPosition.x + this.getScaledValue(sumY, currX); + this.mPhysicalPosition.y = this.mPrevPhysPosition.y + this.getScaledValue(sumX, currX); + this.clampPosition(); + if (!this.mPhysicalPosition.equals(this.mPrevPhysPosition)) { + var11 = var12; + if (this.mPixelListener != null) { + var11 = var12; + if (this.mPixelHeight > 0.0F) { + var11 = var12; + if (this.mPixelWidth > 0.0F) { + var15 = tracker.getDownEvent(); + var16 = new TouchNavSpaceTracker.PhysicalMotionEvent(event.getDeviceId(), tracker.getPhysicalX(var15.getX()), + tracker.getPhysicalY(var15.getY()), var15.getEventTime()); + sumY = this.getPixelX(this.mPhysicalPosition.x); + sumX = this.getPixelY(this.mPhysicalPosition.y); + var11 = false | this.mPixelListener.onMove(var16, pe, sumY, sumX); + } + } + } + + this.mPrevPhysPosition.set(this.mPhysicalPosition); + } else { + var11 = false | true; + } + + tracker.updatePrevValues(); + return var11; + } + + return false | true; + case MotionEvent.ACTION_CANCEL: + tracker.clear(); + return false; + default: + return false; + } + } + + return false; + } + + public boolean onKeyDown(int keyCode, KeyEvent event) { + if (event != null && event.getDevice() != null && (event.getDevice().getSources() & InputDevice.SOURCE_TOUCH_NAVIGATION) == InputDevice + .SOURCE_TOUCH_NAVIGATION) { + if (event.getRepeatCount() == 0) { + checkForLongClick(keyCode, event); } - return false | true; - case 3: - var19.clear(); + if (mKeyEventListener != null) { + return mKeyEventListener.onKeyDown(keyCode, event); + } + } + + return false; + } + + public boolean onKeyUp(int keyCode, KeyEvent event) { + if (event != null && event.getDevice() != null && (event.getDevice().getSources() & InputDevice.SOURCE_TOUCH_NAVIGATION) == InputDevice + .SOURCE_TOUCH_NAVIGATION) { + if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { + mHandler.removeMessages(0); + } + + if (mKeyEventListener != null) { + return mKeyEventListener.onKeyUp(keyCode, event); + } + } + + return false; + } + + public void onPause() { + mHandler.removeMessages(0); + } + + public void setKeyEventListener(TouchNavSpaceTracker.KeyEventListener listener) { + mKeyEventListener = listener; + } + + public void setLPFEnabled(boolean enabled) { + mLPFEnabled = enabled; + } + + public void setPhysicalDensity(float density) { + mPixelsPerMm = density; + if (density > 0.0F) { + updatePhysicalSize(); + } + + } + + public void setPhysicalPosition(float x, float y) { + mPhysicalPosition.x = x; + mPhysicalPosition.y = y; + mPrevPhysPosition.x = x; + mPrevPhysPosition.y = y; + clampPosition(); + } + + public void setPhysicalSize(float widthMm, float heightMm) { + if (mPixelsPerMm <= 0.0F) { + setPhysicalSizeInternal(widthMm, heightMm); + } + } + + public void setPixelPosition(float x, float y) { + setPhysicalPosition(getPhysicalX(x), getPhysicalY(y)); + } + + public void setPixelSize(float width, float height) { + mPixelHeight = height; + mPixelWidth = width; + updatePhysicalSize(); + } + + public void setSensitivity(float sensitivity) { + mSensitivity = sensitivity; + configureFlicks(mUnscaledFlickMinDistance, mUnscaledFlickMaxDistance, mFlickMaxDuration); + } + + public void setTouchEventListener(TouchNavSpaceTracker.TouchEventListener listener) { + mPixelListener = listener; + } + + public void unblockMovement() { + this.mMovementBlockTime = 0L; + } + + public interface KeyEventListener { + boolean onKeyDown(int keyCode, KeyEvent event); + + boolean onKeyLongPress(int keyCode, KeyEvent event); + + boolean onKeyUp(int keyCode, KeyEvent event); + } + + public static class PhysicalMotionEvent { + private final int mDeviceId; + private final long mTime; + // $FF: renamed from: mX float + private final float field_6; + // $FF: renamed from: mY float + private final float field_7; + + public PhysicalMotionEvent(int var1, float var2, float var3, long var4) { + this.mDeviceId = var1; + this.field_6 = var2; + this.field_7 = var3; + this.mTime = var4; + } + + public final InputDevice getDevice() { + return InputDevice.getDevice(this.getDeviceId()); + } + + public final int getDeviceId() { + return this.mDeviceId; + } + + public final long getTime() { + return this.mTime; + } + + public final float getX() { + return this.field_6; + } + + public final float getY() { + return this.field_7; + } + } + + public static class SimpleTouchEventListener implements TouchNavSpaceTracker.KeyEventListener, TouchNavSpaceTracker.TouchEventListener { + public boolean onDown(TouchNavSpaceTracker.PhysicalMotionEvent var1) { return false; - default: + } + + public boolean onFlick(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, int var3, int var4) { return false; - } - } + } - return false; - } + public boolean onFling(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, float var3, float var4) { + return false; + } - public boolean onKeyDown(int keyCode, KeyEvent event) { - if (event != null && event.getDevice() != null && (event.getDevice().getSources() & InputDevice.SOURCE_TOUCH_NAVIGATION) == InputDevice.SOURCE_TOUCH_NAVIGATION) { - if (event.getRepeatCount() == 0) { - checkForLongClick(keyCode, event); - } + public boolean onKeyDown(int keyCode, KeyEvent event) { + return false; + } - if (mKeyEventListener != null) { - return mKeyEventListener.onKeyDown(keyCode, event); - } - } + public boolean onKeyLongPress(int keyCode, KeyEvent event) { + return false; + } - return false; - } + public boolean onKeyUp(int keyCode, KeyEvent event) { + return false; + } - public boolean onKeyUp(int keyCode, KeyEvent event) { - if (event != null && event.getDevice() != null && (event.getDevice().getSources() & InputDevice.SOURCE_TOUCH_NAVIGATION) == InputDevice.SOURCE_TOUCH_NAVIGATION) { - if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { - mHandler.removeMessages(0); - } + public boolean onMove(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, float var3, float var4) { + return false; + } - if (mKeyEventListener != null) { - return mKeyEventListener.onKeyUp(keyCode, event); - } - } + public boolean onUp(TouchNavSpaceTracker.PhysicalMotionEvent var1, float var2, float var3) { + return false; + } + } - return false; - } + public interface TouchEventListener { + boolean onDown(TouchNavSpaceTracker.PhysicalMotionEvent var1); - public void onPause() { - mHandler.removeMessages(0); - } + boolean onFlick(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, int var3, int var4); - public void setKeyEventListener(TouchNavSpaceTracker.KeyEventListener listener) { - mKeyEventListener = listener; - } + boolean onFling(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, float var3, float var4); - public void setLPFEnabled(boolean enabled) { - mLPFEnabled = enabled; - } + boolean onMove(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, float var3, float var4); - public void setPhysicalDensity(float density) { - mPixelsPerMm = density; - if (density > 0.0F) { - updatePhysicalSize(); - } - - } - - public void setPhysicalPosition(float x, float y) { - mPhysicalPosition.x = x; - mPhysicalPosition.y = y; - mPrevPhysPosition.x = x; - mPrevPhysPosition.y = y; - clampPosition(); - } - - public void setPhysicalSize(float widthMm, float heightMm) { - if (mPixelsPerMm <= 0.0F) { - setPhysicalSizeInternal(widthMm, heightMm); - } - } - - public void setPixelPosition(float x, float y) { - setPhysicalPosition(getPhysicalX(x), getPhysicalY(y)); - } - - public void setPixelSize(float width, float height) { - mPixelHeight = height; - mPixelWidth = width; - updatePhysicalSize(); - } - - public void setSensitivity(float sensitivity) { - mSensitivity = sensitivity; - configureFlicks(mUnscaledFlickMinDistance, mUnscaledFlickMaxDistance, mFlickMaxDuration); - } - - public void setTouchEventListener(TouchNavSpaceTracker.TouchEventListener listener) { - mPixelListener = listener; - } - - public void unblockMovement() { - this.mMovementBlockTime = 0L; - } - - public interface KeyEventListener { - boolean onKeyDown(int keyCode, KeyEvent event); - - boolean onKeyLongPress(int keyCode, KeyEvent event); - - boolean onKeyUp(int keyCode, KeyEvent event); - } - - public static class PhysicalMotionEvent { - private final int mDeviceId; - private final long mTime; - // $FF: renamed from: mX float - private final float field_6; - // $FF: renamed from: mY float - private final float field_7; - - public PhysicalMotionEvent(int var1, float var2, float var3, long var4) { - this.mDeviceId = var1; - this.field_6 = var2; - this.field_7 = var3; - this.mTime = var4; - } - - public final InputDevice getDevice() { - return InputDevice.getDevice(this.getDeviceId()); - } - - public final int getDeviceId() { - return this.mDeviceId; - } - - public final long getTime() { - return this.mTime; - } - - public final float getX() { - return this.field_6; - } - - public final float getY() { - return this.field_7; - } - } - - public static class SimpleTouchEventListener implements TouchNavSpaceTracker.KeyEventListener, TouchNavSpaceTracker.TouchEventListener { - public boolean onDown(TouchNavSpaceTracker.PhysicalMotionEvent var1) { - return false; - } - - public boolean onFlick(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, int var3, int var4) { - return false; - } - - public boolean onFling(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, float var3, float var4) { - return false; - } - - public boolean onKeyDown(int keyCode, KeyEvent event) { - return false; - } - - public boolean onKeyLongPress(int keyCode, KeyEvent event) { - return false; - } - - public boolean onKeyUp(int keyCode, KeyEvent event) { - return false; - } - - public boolean onMove(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, float var3, float var4) { - return false; - } - - public boolean onUp(TouchNavSpaceTracker.PhysicalMotionEvent var1, float var2, float var3) { - return false; - } - } - - public interface TouchEventListener { - boolean onDown(TouchNavSpaceTracker.PhysicalMotionEvent var1); - - boolean onFlick(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, int var3, int var4); - - boolean onFling(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, float var3, float var4); - - boolean onMove(TouchNavSpaceTracker.PhysicalMotionEvent var1, TouchNavSpaceTracker.PhysicalMotionEvent var2, float var3, float var4); - - boolean onUp(TouchNavSpaceTracker.PhysicalMotionEvent var1, float var2, float var3); - } + boolean onUp(TouchNavSpaceTracker.PhysicalMotionEvent var1, float var2, float var3); + } }