Commit 036de9ca authored by mthiesse's avatar mthiesse Committed by Commit bot

Fix Cardboard trigger (broken by GVR update)

BUG=

Review-Url: https://codereview.chromium.org/2392943005
Cr-Commit-Position: refs/heads/master@{#423861}
parent 2f18c6cb
......@@ -93,7 +93,6 @@ public class VrShell extends GvrLayout implements GLSurfaceView.Renderer, VrShel
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
VrShell.this.onTouchEvent(event);
return true;
}
}
......@@ -257,6 +256,15 @@ public class VrShell extends GvrLayout implements GLSurfaceView.Renderer, VrShel
nativeDrawFrame(mNativeVrShell);
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
nativeOnTriggerEvent(mNativeVrShell);
}
// Don't mark this as handled so that Daydream screen alignment still functions.
return false;
}
@Override
public void onResume() {
super.onResume();
......@@ -320,15 +328,6 @@ public class VrShell extends GvrLayout implements GLSurfaceView.Renderer, VrShel
nativeSetWebVrMode(mNativeVrShell, enabled);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
nativeOnTriggerEvent(mNativeVrShell);
}
return true;
}
@Override
public FrameLayout getContainer() {
return (FrameLayout) this;
......
......@@ -19,7 +19,6 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/referrer.h"
#include "content/public/common/screen_info.h"
#include "jni/VrShell_jni.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/android/view_android.h"
......
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