Remove unused default object of GestureStrokePreviewParams
This change also fixes build broken by Id615556766. Change-Id: I16605cc3b65e3e9ab2d5a498825c31d9b4046b73main
parent
6e97efef78
commit
081989ca30
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue