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

Unified Diff: ui/events/android/motion_event_android.cc

Issue 2408063005: Expand event timestamp timebase check to ozone/android (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/android/motion_event_android.cc
diff --git a/ui/events/android/motion_event_android.cc b/ui/events/android/motion_event_android.cc
index bf1fc53f8cbfecf0be5362c6744d8114d6a0db3e..f7507bf9d2674067b5aba24bc3a0336dfcdd56ec 100644
--- a/ui/events/android/motion_event_android.cc
+++ b/ui/events/android/motion_event_android.cc
@@ -12,6 +12,7 @@
#include "jni/MotionEvent_jni.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/event_constants.h"
+#include "ui/events/event_utils.h"
using base::android::AttachCurrentThread;
using namespace JNI_MotionEvent;
@@ -94,7 +95,10 @@ int FromAndroidMetaState(int meta_state) {
}
base::TimeTicks FromAndroidTime(int64_t time_ms) {
- return base::TimeTicks() + base::TimeDelta::FromMilliseconds(time_ms);
+ base::TimeTicks timestamp =
+ base::TimeTicks() + base::TimeDelta::FromMilliseconds(time_ms);
+ ValidateEventTimeClock(&timestamp);
+ return timestamp;
}
float ToValidFloat(float x) {
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698