Skip to content

Commit 9ba15a9

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Pressure info in captured gestures."
2 parents a444ee6 + 780d668 commit 9ba15a9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ String actionName(int action) {
6363
}
6464
}
6565
public String toJson() {
66-
return String.format("{\"type\":\"motion\", \"time\":%d, \"action\":\"%s\", \"x\":%.2f, \"y\":%.2f}",
66+
return String.format(
67+
("{\"type\":\"motion\", \"time\":%d, \"action\":\"%s\", "
68+
+ "\"x\":%.2f, \"y\":%.2f, \"s\":%.2f, \"p\":%.2f}"),
6769
this.time,
6870
actionName(this.event.getAction()),
6971
this.event.getRawX(),
70-
this.event.getRawY()
72+
this.event.getRawY(),
73+
this.event.getSize(),
74+
this.event.getPressure()
7175
);
7276
}
7377
}

0 commit comments

Comments
 (0)