Skip to content

Commit 41ffab8

Browse files
chethaaseAndroid (Google) Code Review
authored andcommitted
Merge "increase the rate at which we dispatch events." into ics-mr1
2 parents bc853c0 + 532147b commit 41ffab8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

services/java/com/android/server/wm/InputManager.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,13 @@ public int getMaxEventsPerSecond() {
675675
} catch (NumberFormatException e) {
676676
}
677677
if (result < 1) {
678-
result = 55;
678+
// This number equates to the refresh rate * 1.5. The rate should be at least
679+
// equal to the screen refresh rate. We increase the rate by 50% to compensate for
680+
// the discontinuity between the actual rate that events come in at (they do
681+
// not necessarily come in constantly and are not handled synchronously).
682+
// Ideally, we would use Display.getRefreshRate(), but as this does not necessarily
683+
// return a sensible result, we use '60' as our default assumed refresh rate.
684+
result = 90;
679685
}
680686
return result;
681687
}

0 commit comments

Comments
 (0)