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