OSDN Git Service

Instrumentation sendStringSync(String) may try to inject obsolete events.
authorSvetoslav Ganov <svetoslavganov@google.com>
Fri, 11 Nov 2011 01:54:24 +0000 (17:54 -0800)
committerSvetoslav Ganov <svetoslavganov@google.com>
Fri, 11 Nov 2011 18:43:13 +0000 (10:43 -0800)
commitc350f1604f348dceec28ba0d7e4cfc293333f797
tree518e9cb20fe9ff3cb2c32df34eadfcdb7932c765
parent03466e35f2996fd3330452e38984f0012239305e
Instrumentation sendStringSync(String) may try to inject obsolete events.

KeyEvents returned by KeyCharacterMap.getEvents() have the same time stamp
and the system rejects too old events. Hence, it is possible for an event
to become stale before it is injected if it takes too long to inject the
preceding ones. Now the time of the event is set just before injecting it.

Change-Id: I72b60d261f8bda857b331d0f1b1bd97f9f15def3
core/java/android/app/Instrumentation.java