Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Issue 2755453004: Fix android key event timestamps (Closed)

Created:
3 years, 9 months ago by tsniatowski
Modified:
3 years, 9 months ago
CC:
boliu, chromium-reviews, darin-cc_chromium.org, jam, sunjian
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/6bda2b55ca3d254ca021560906d0703e8b0df21e

Patch Set 1 #

Total comments: 2

Patch Set 2 : event_time -> time_ms #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M content/browser/renderer_host/ime_adapter_android.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/ime_adapter_android.cc View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (6 generated)
tsniatowski
PTAL
3 years, 9 months ago (2017-03-15 12:06:06 UTC) #1
aelias_OOO_until_Jul13
lgtm https://codereview.chromium.org/2755453004/diff/1/content/browser/renderer_host/ime_adapter_android.h File content/browser/renderer_host/ime_adapter_android.h (right): https://codereview.chromium.org/2755453004/diff/1/content/browser/renderer_host/ime_adapter_android.h#newcode46 content/browser/renderer_host/ime_adapter_android.h:46: jlong event_time, nit: add "_ms"
3 years, 9 months ago (2017-03-15 18:43:25 UTC) #3
tsniatowski
https://codereview.chromium.org/2755453004/diff/1/content/browser/renderer_host/ime_adapter_android.h File content/browser/renderer_host/ime_adapter_android.h (right): https://codereview.chromium.org/2755453004/diff/1/content/browser/renderer_host/ime_adapter_android.h#newcode46 content/browser/renderer_host/ime_adapter_android.h:46: jlong event_time, On 2017/03/15 18:43:25, aelias wrote: > nit: ...
3 years, 9 months ago (2017-03-16 07:41:14 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2755453004/20001
3 years, 9 months ago (2017-03-16 07:41:49 UTC) #8
commit-bot: I haz the power
3 years, 9 months ago (2017-03-16 08:18:39 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/6bda2b55ca3d254ca021560906d0...

Powered by Google App Engine
This is Rietveld 408576698