public class SpeedAnglesClassifier extends StrokeClassifier
AnglesClassifier
(without splitting it into two parts). The classifier ignores
the last point of a stroke because the UP event comes in with some delay and this ruins the
smoothness of this curve. Additionally, the classifier classifies calculates the percentage of
angles which value is in [PI - ANGLE_DEVIATION, 2* PI) interval. The reason why the classifier
does that is because the speed of a good stroke is most often increases, so most of these angels
should be in this interval.GENERIC, LEFT_AFFORDANCE, mClassifierData, NOTIFICATION_DISMISS, NOTIFICATION_DOUBLE_TAP, NOTIFICATION_DRAG_DOWN, QUICK_SETTINGS, RIGHT_AFFORDANCE, UNLOCK
Constructor and Description |
---|
SpeedAnglesClassifier(ClassifierData classifierData) |
Modifier and Type | Method and Description |
---|---|
float |
getFalseTouchEvaluation(int type,
Stroke stroke) |
String |
getTag() |
void |
onTouchEvent(MotionEvent event)
Informs the classifier that a new touch event has occurred
|
onSensorChanged
public SpeedAnglesClassifier(ClassifierData classifierData)
public String getTag()
getTag
in class Classifier
public void onTouchEvent(MotionEvent event)
Classifier
onTouchEvent
in class Classifier
public float getFalseTouchEvaluation(int type, Stroke stroke)
getFalseTouchEvaluation
in class StrokeClassifier
type
- the type of action for which this method is calledstroke
- the stroke for which the evaluation will be calculated