* Update the point list representing a possible gesture
* @param context The application context to handle event
*/
public void update(ApplicationContext context) {
while (true) {
final MotionEvent event = context.pollMotion();
if (event == null)
break;
if (this.capturing == false && event.getKind() == MotionEvent.Kind.ACTION_DOWN) {
this.points = new ArrayList<>();
this.capturing = true;
this.setGesture(GestureID.UNKNOWN);
this.points.add(new Point(event.getX(), event.getY()));
} else if (this.capturing == true && event.getKind() == MotionEvent.Kind.ACTION_UP) {
this.capturing = false;
this.analyze();
} else if (this.capturing == true && event.getKind() == MotionEvent.Kind.ACTION_MOVE) {
this.points.add(new Point(event.getX(), event.getY()));
}
}
}