diff options
author | 2013-12-20 15:00:04 +0900 | |
---|---|---|
committer | 2013-12-20 15:25:24 +0900 | |
commit | 081989ca30a6f3f10c37c9d582de18fc29fd2df7 (patch) | |
tree | 4dff06c7c83bc418ab3bede80ef0fbe3895bfe97 /java/src | |
parent | 6e97efef78f32daebed7ec3b0624cd645072ec84 (diff) | |
download | latinime-081989ca30a6f3f10c37c9d582de18fc29fd2df7.tar.gz latinime-081989ca30a6f3f10c37c9d582de18fc29fd2df7.tar.xz latinime-081989ca30a6f3f10c37c9d582de18fc29fd2df7.zip |
Remove unused default object of GestureStrokePreviewParams
This change also fixes build broken by Id615556766.
Change-Id: I16605cc3b65e3e9ab2d5a498825c31d9b4046b73
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java | 6 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/GestureStrokeWithPreviewPoints.java | 21 |
2 files changed, 10 insertions, 17 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java b/java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java index 0c1181721..4f78e6b52 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java +++ b/java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java @@ -84,12 +84,12 @@ public class GestureStroke { public final float mRecognitionSpeedThreshold; // keyWidth/sec // Default GestureStroke parameters. - private static final GestureStrokeParams DEFAULT = new GestureStrokeParams(); + public static final GestureStrokeParams DEFAULT = new GestureStrokeParams(); private GestureStrokeParams() { // These parameter values are default and intended for testing. mStaticTimeThresholdAfterFastTyping = 350; // msec - mDetectFastMoveSpeedThreshold = 1.5f; // keyWidth / sec + mDetectFastMoveSpeedThreshold = 1.5f; // keyWidth/sec mDynamicThresholdDecayDuration = 450; // msec mDynamicTimeThresholdFrom = 300; // msec mDynamicTimeThresholdTo = 20; // msec @@ -98,7 +98,7 @@ public class GestureStroke { // The following parameters' change will affect the result of regression test. mSamplingMinimumDistance = 1.0f / 6.0f; // keyWidth mRecognitionMinimumTime = 100; // msec - mRecognitionSpeedThreshold = 5.5f; // keyWidth / sec + mRecognitionSpeedThreshold = 5.5f; // keyWidth/sec } public GestureStrokeParams(final TypedArray mainKeyboardViewAttr) { diff --git a/java/src/com/android/inputmethod/keyboard/internal/GestureStrokeWithPreviewPoints.java b/java/src/com/android/inputmethod/keyboard/internal/GestureStrokeWithPreviewPoints.java index ec6e4df01..9ce204393 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/GestureStrokeWithPreviewPoints.java +++ b/java/src/com/android/inputmethod/keyboard/internal/GestureStrokeWithPreviewPoints.java @@ -45,17 +45,10 @@ public final class GestureStrokeWithPreviewPoints extends GestureStroke { public final double mMaxInterpolationDistanceThreshold; // in pixel public final int mMaxInterpolationSegments; - private static final GestureStrokePreviewParams DEFAULT = new GestureStrokePreviewParams(); - + private static final float DEFAULT_MIN_SAMPLING_DISTANCE = 0.0f; // dp private static final int DEFAULT_MAX_INTERPOLATION_ANGULAR_THRESHOLD = 15; // in degree - - private GestureStrokePreviewParams() { - mMinSamplingDistance = 0.0d; - mMaxInterpolationAngularThreshold = - degreeToRadian(DEFAULT_MAX_INTERPOLATION_ANGULAR_THRESHOLD); - mMaxInterpolationDistanceThreshold = mMinSamplingDistance; - mMaxInterpolationSegments = 4; - } + private static final float DEFAULT_MAX_INTERPOLATION_DISTANCE_THRESHOLD = 0.0f; // dp + private static final int DEFAULT_MAX_INTERPOLATION_SEGMENTS = 4; private static double degreeToRadian(final int degree) { return degree / 180.0d * Math.PI; @@ -64,18 +57,18 @@ public final class GestureStrokeWithPreviewPoints extends GestureStroke { public GestureStrokePreviewParams(final TypedArray mainKeyboardViewAttr) { mMinSamplingDistance = mainKeyboardViewAttr.getDimension( R.styleable.MainKeyboardView_gestureTrailMinSamplingDistance, - (float)DEFAULT.mMinSamplingDistance); + DEFAULT_MIN_SAMPLING_DISTANCE); final int interpolationAngularDegree = mainKeyboardViewAttr.getInteger(R.styleable .MainKeyboardView_gestureTrailMaxInterpolationAngularThreshold, 0); mMaxInterpolationAngularThreshold = (interpolationAngularDegree <= 0) - ? DEFAULT.mMaxInterpolationAngularThreshold + ? degreeToRadian(DEFAULT_MAX_INTERPOLATION_ANGULAR_THRESHOLD) : degreeToRadian(interpolationAngularDegree); mMaxInterpolationDistanceThreshold = mainKeyboardViewAttr.getDimension(R.styleable .MainKeyboardView_gestureTrailMaxInterpolationDistanceThreshold, - (float)DEFAULT.mMaxInterpolationDistanceThreshold); + DEFAULT_MAX_INTERPOLATION_DISTANCE_THRESHOLD); mMaxInterpolationSegments = mainKeyboardViewAttr.getInteger( R.styleable.MainKeyboardView_gestureTrailMaxInterpolationSegments, - DEFAULT.mMaxInterpolationSegments); + DEFAULT_MAX_INTERPOLATION_SEGMENTS); } } |