Use MotionEvent.getEventTime() instead of SystemClock.uptimeMillis()

This should be perfectly safe since this value is only used for reporting the timestamp to ActivityOptions.SourceInfo, and getEventTime is a timestamp in the uptime clock base.

Change-Id: Ie6d55f85dba083834e76edd826c5eca52fda1cf0
Fixes: 265053878
Test: treehugger
This commit is contained in:
Jeff DeCew
2023-01-10 21:22:20 +00:00
parent 11a9620697
commit 926470f152

View File

@@ -109,7 +109,7 @@ public class ActivatableNotificationViewController
return true;
}
if (ev.getAction() == MotionEvent.ACTION_UP) {
mView.setLastActionUpTime(SystemClock.uptimeMillis());
mView.setLastActionUpTime(ev.getEventTime());
}
// With a11y, just do nothing.
if (mAccessibilityManager.isTouchExplorationEnabled()) {