Pressure info in captured gestures.
Change-Id: If72f8d5ea0cb748f60357441153d5fb8ac1b8143
This commit is contained in:
@@ -63,11 +63,15 @@ public class GestureRecorder {
|
||||
}
|
||||
}
|
||||
public String toJson() {
|
||||
return String.format("{\"type\":\"motion\", \"time\":%d, \"action\":\"%s\", \"x\":%.2f, \"y\":%.2f}",
|
||||
return String.format(
|
||||
("{\"type\":\"motion\", \"time\":%d, \"action\":\"%s\", "
|
||||
+ "\"x\":%.2f, \"y\":%.2f, \"s\":%.2f, \"p\":%.2f}"),
|
||||
this.time,
|
||||
actionName(this.event.getAction()),
|
||||
this.event.getRawX(),
|
||||
this.event.getRawY()
|
||||
this.event.getRawY(),
|
||||
this.event.getSize(),
|
||||
this.event.getPressure()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user