Kaydet (Commit) cb85026c authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Miklos Vajna

android: send touch events in JavaPanZoomController

Change-Id: Icc0c749a0c8687f247c4e42d74b5c839d5723503
üst ef73f53c
......@@ -12,6 +12,7 @@ import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import org.libreoffice.LOEventFactory;
import org.libreoffice.LOKitShell;
import org.libreoffice.LibreOfficeMainActivity;
import org.mozilla.gecko.ZoomConstraints;
......@@ -902,6 +903,7 @@ public class JavaPanZoomController
@Override
public void onLongPress(MotionEvent motionEvent) {
LOKitShell.sentTouchEvent("LongPress", motionEvent);
}
@Override
......@@ -909,6 +911,7 @@ public class JavaPanZoomController
// When double-tapping is allowed, we have to wait to see if this is
// going to be a double-tap.
if (!mWaitForDoubleTap) {
LOKitShell.sentTouchEvent("SingleTap", motionEvent);
}
// return false because we still want to get the ACTION_UP event that triggers this
return false;
......@@ -918,16 +921,20 @@ public class JavaPanZoomController
public boolean onSingleTapConfirmed(MotionEvent motionEvent) {
// In cases where we don't wait for double-tap, we handle this in onSingleTapUp.
if (mWaitForDoubleTap) {
LOKitShell.sentTouchEvent("SingleTap", motionEvent);
}
return true;
}
@Override
public boolean onDoubleTap(MotionEvent motionEvent) {
LOKitShell.sentTouchEvent("DoubleTap", motionEvent);
return true;
}
private void cancelTouch() {
//GeckoEvent e = GeckoEvent.createBroadcastEvent("Gesture:CancelTouch", "");
//GeckoAppShell.sendEventToGecko(e);
}
/**
......
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