diff options
author | newt@chromium.org <newt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-27 20:03:40 +0000 |
---|---|---|
committer | newt@chromium.org <newt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-27 20:03:40 +0000 |
commit | e5e3129f1cc5ce8a01e7941ad4a8254deccf6a28 (patch) | |
tree | ebeb5327ce86d30bcef0b9cf6b4928de28114cfc /remoting/android | |
parent | 785d5143b5ae1c800ea1b3cb0f32b63c53b86ab2 (diff) | |
download | chromium_src-e5e3129f1cc5ce8a01e7941ad4a8254deccf6a28.zip chromium_src-e5e3129f1cc5ce8a01e7941ad4a8254deccf6a28.tar.gz chromium_src-e5e3129f1cc5ce8a01e7941ad4a8254deccf6a28.tar.bz2 |
Use SparseArrays instead of HashMaps with Integer keys.
BUG=347356
NOTRY=true
Review URL: https://codereview.chromium.org/182533003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253912 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/android')
-rw-r--r-- | remoting/android/java/src/org/chromium/chromoting/TapGestureDetector.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/remoting/android/java/src/org/chromium/chromoting/TapGestureDetector.java b/remoting/android/java/src/org/chromium/chromoting/TapGestureDetector.java index fa30b02..32c37d7 100644 --- a/remoting/android/java/src/org/chromium/chromoting/TapGestureDetector.java +++ b/remoting/android/java/src/org/chromium/chromoting/TapGestureDetector.java @@ -8,11 +8,10 @@ import android.content.Context; import android.graphics.PointF; import android.os.Handler; import android.os.Message; +import android.util.SparseArray; import android.view.MotionEvent; import android.view.ViewConfiguration; -import java.util.HashMap; - /** * This class detects multi-finger tap and long-press events. This is provided since the stock * Android gesture-detectors only detect taps/long-presses made with one finger. @@ -49,7 +48,7 @@ public class TapGestureDetector { * Stores the location of each down MotionEvent (by pointer ID), for detecting motion of any * pointer beyond the TouchSlop region. */ - private HashMap<Integer, PointF> mInitialPositions = new HashMap<Integer, PointF>(); + private SparseArray<PointF> mInitialPositions = new SparseArray<PointF>(); /** * Threshold squared-distance, in pixels, to use for motion-detection. If a finger moves less |