diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-28 02:35:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-28 02:35:07 +0000 |
commit | 281998c825ad48d842bb653e2f462719fdb0c1d9 (patch) | |
tree | bc8bfcce809257b3ddbb423a9808082292b9f6a3 /java/com/android/incallui/answer/impl/classifier/AccelerationClassifier.java | |
parent | fc81a030a7b4f6d4a497f71aed593d398795e7da (diff) | |
parent | 183cb71663320f16149d83eeebaff7795a4b55f2 (diff) |
Merge "Remove field prefixes."
Diffstat (limited to 'java/com/android/incallui/answer/impl/classifier/AccelerationClassifier.java')
-rw-r--r-- | java/com/android/incallui/answer/impl/classifier/AccelerationClassifier.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/java/com/android/incallui/answer/impl/classifier/AccelerationClassifier.java b/java/com/android/incallui/answer/impl/classifier/AccelerationClassifier.java index ac504444e..ae0d1c800 100644 --- a/java/com/android/incallui/answer/impl/classifier/AccelerationClassifier.java +++ b/java/com/android/incallui/answer/impl/classifier/AccelerationClassifier.java @@ -29,10 +29,10 @@ import java.util.Map; * the speed of a part. */ class AccelerationClassifier extends StrokeClassifier { - private final Map<Stroke, Data> mStrokeMap = new ArrayMap<>(); + private final Map<Stroke, Data> strokeMap = new ArrayMap<>(); public AccelerationClassifier(ClassifierData classifierData) { - mClassifierData = classifierData; + this.classifierData = classifierData; } @Override @@ -45,23 +45,23 @@ class AccelerationClassifier extends StrokeClassifier { int action = event.getActionMasked(); if (action == MotionEvent.ACTION_DOWN) { - mStrokeMap.clear(); + strokeMap.clear(); } for (int i = 0; i < event.getPointerCount(); i++) { - Stroke stroke = mClassifierData.getStroke(event.getPointerId(i)); + Stroke stroke = classifierData.getStroke(event.getPointerId(i)); Point point = stroke.getPoints().get(stroke.getPoints().size() - 1); - if (mStrokeMap.get(stroke) == null) { - mStrokeMap.put(stroke, new Data(point)); + if (strokeMap.get(stroke) == null) { + strokeMap.put(stroke, new Data(point)); } else { - mStrokeMap.get(stroke).addPoint(point); + strokeMap.get(stroke).addPoint(point); } } } @Override public float getFalseTouchEvaluation(Stroke stroke) { - Data data = mStrokeMap.get(stroke); + Data data = strokeMap.get(stroke); return 2 * SpeedRatioEvaluator.evaluate(data.maxSpeedRatio); } |