Fix android key event timestamps
Pass a Java long to C++ as a jlong type, not a C++ long which can have a different size to avoid broken / negative event timestamp values. ImeAdapter's Java side uses "long" in SendKeyEvent, so the C++ side must use a jlong or int64_t, and not a C++ long. Otherwise things don't work well when system uptime is over 2^31ms (~25 days). Additionally, do not do an extra divide-by-1000 when the used helper function will do the milliseconds to seconds conversion already, so the timestamps are correctly measured in milliseconds. The resulting keyboard event timestamps end up nicely sane and positive, and no longer clamped to 0 in PerformanceBase.cpp. BUG=701726 R=aelias@chromium.org Review-Url: https://codereview.chromium.org/2755453004 Cr-Commit-Position: refs/heads/master@{#457369}
Showing
Please register or sign in to comment