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
1 file changed