Commit 64291163 authored by Aldo Culquicondor's avatar Aldo Culquicondor Committed by Commit Bot

Add source to hover events for VR

Hover events don't get processed if the source is not set.
This change shouldn't affect scrolling performance metrics.

Bug: 880879, 877580
Change-Id: I07ae28fcfdebfee77eab57e5659d1150745b6e9a
Reviewed-on: https://chromium-review.googlesource.com/1207651Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Aldo Culquicondor <acondor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589151}
parent 804803ea
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
package org.chromium.content.browser; package org.chromium.content.browser;
import android.view.InputDevice;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.MotionEvent.PointerCoords; import android.view.MotionEvent.PointerCoords;
import android.view.MotionEvent.PointerProperties; import android.view.MotionEvent.PointerProperties;
...@@ -179,7 +180,8 @@ public class MotionEventSynthesizerImpl implements MotionEventSynthesizer { ...@@ -179,7 +180,8 @@ public class MotionEventSynthesizerImpl implements MotionEventSynthesizer {
if (MotionEventAction.HOVER_EXIT == action) androidAction = MotionEvent.ACTION_HOVER_EXIT; if (MotionEventAction.HOVER_EXIT == action) androidAction = MotionEvent.ACTION_HOVER_EXIT;
if (MotionEventAction.HOVER_MOVE == action) androidAction = MotionEvent.ACTION_HOVER_MOVE; if (MotionEventAction.HOVER_MOVE == action) androidAction = MotionEvent.ACTION_HOVER_MOVE;
MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, androidAction, pointerCount, MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, androidAction, pointerCount,
mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, 0, 0); mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0,
InputDevice.SOURCE_CLASS_POINTER, 0);
mTarget.dispatchGenericMotionEvent(event); mTarget.dispatchGenericMotionEvent(event);
event.recycle(); event.recycle();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment