[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - 2 commits - android/experimental
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Thu Feb 26 00:00:32 PST 2015
android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java | 4 +---
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java | 4 ++--
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 4 ++--
android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java | 8 ++++----
4 files changed, 9 insertions(+), 11 deletions(-)
New commits:
commit 57c5aa6c8370eef8e5cacbfb9706a43045e7e7ba
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Thu Feb 26 16:59:27 2015 +0900
android: no need for MotionEvent when sending TOUCH LOEvent
Change-Id: I9173f50fb60680de1bb9744d3f351c44f8175d0c
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
index bce6284..e5afe16 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
@@ -29,7 +29,6 @@ public class LOEvent implements Comparable<LOEvent> {
public String mFilename;
public ComposedTileLayer mComposedTileLayer;
public String mTouchType;
- public MotionEvent mMotionEvent;
public PointF mDocumentTouchCoordinate;
public KeyEvent mKeyEvent;
public RectF mInvalidationRect;
@@ -62,11 +61,10 @@ public class LOEvent implements Comparable<LOEvent> {
mTypeString = "Thumbnail";
}
- public LOEvent(int type, String touchType, MotionEvent motionEvent, PointF documentTouchCoordinate) {
+ public LOEvent(int type, String touchType, PointF documentTouchCoordinate) {
mType = type;
mTypeString = "Touch";
mTouchType = touchType;
- mMotionEvent = motionEvent;
mDocumentTouchCoordinate = documentTouchCoordinate;
}
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
index f574e69..809b4c1 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
@@ -86,8 +86,8 @@ public class LOKitShell {
/**
* Send touch event to LOKitThread.
*/
- public static void sendTouchEvent(String touchType, MotionEvent motionEvent, PointF pointF) {
- LOKitShell.sendEvent(new LOEvent(LOEvent.TOUCH, touchType, motionEvent, pointF));
+ public static void sendTouchEvent(String touchType, PointF documentTouchCoordinate) {
+ LOKitShell.sendEvent(new LOEvent(LOEvent.TOUCH, touchType, documentTouchCoordinate));
}
/**
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
index 6f63e93..6fb6f3a 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
@@ -196,7 +196,7 @@ public class LOKitThread extends Thread {
createThumbnail(event.mTask);
break;
case LOEvent.TOUCH:
- touch(event.mTouchType, event.mMotionEvent, event.mDocumentTouchCoordinate);
+ touch(event.mTouchType, event.mDocumentTouchCoordinate);
break;
case LOEvent.KEY_EVENT:
keyEvent(event.mKeyEvent);
@@ -223,7 +223,7 @@ public class LOKitThread extends Thread {
/**
* Processes touch events.
*/
- private void touch(String touchType, MotionEvent motionEvent, PointF mDocumentTouchCoordinate) {
+ private void touch(String touchType, PointF mDocumentTouchCoordinate) {
if (!LOKitShell.isEditingEnabled()) {
return;
}
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
index 5de4260..adae23a 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
@@ -941,7 +941,7 @@ public class JavaPanZoomController
@Override
public void onLongPress(MotionEvent motionEvent) {
- LOKitShell.sendTouchEvent("LongPress", motionEvent, getMotionInDocumentCoordinates(motionEvent));
+ LOKitShell.sendTouchEvent("LongPress", getMotionInDocumentCoordinates(motionEvent));
}
@Override
@@ -949,7 +949,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.sendTouchEvent("SingleTap", motionEvent, getMotionInDocumentCoordinates(motionEvent));
+ LOKitShell.sendTouchEvent("SingleTap", getMotionInDocumentCoordinates(motionEvent));
}
// return false because we still want to get the ACTION_UP event that triggers this
return false;
@@ -959,14 +959,14 @@ 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.sendTouchEvent("SingleTap", motionEvent, getMotionInDocumentCoordinates(motionEvent));
+ LOKitShell.sendTouchEvent("SingleTap", getMotionInDocumentCoordinates(motionEvent));
}
return true;
}
@Override
public boolean onDoubleTap(MotionEvent motionEvent) {
- LOKitShell.sendTouchEvent("DoubleTap", motionEvent, getMotionInDocumentCoordinates(motionEvent));
+ LOKitShell.sendTouchEvent("DoubleTap", getMotionInDocumentCoordinates(motionEvent));
return true;
}
commit 8ca4f6bf8abce7d6bfaf8873e7247cd298a6a8c0
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Thu Feb 26 16:53:18 2015 +0900
android: sent -> send
Change-Id: I241a1cbfb98b9e9bb8f769980547c395427bc0b5
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
index b2b4b9d..f574e69 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
@@ -86,7 +86,7 @@ public class LOKitShell {
/**
* Send touch event to LOKitThread.
*/
- public static void sentTouchEvent(String touchType, MotionEvent motionEvent, PointF pointF) {
+ public static void sendTouchEvent(String touchType, MotionEvent motionEvent, PointF pointF) {
LOKitShell.sendEvent(new LOEvent(LOEvent.TOUCH, touchType, motionEvent, pointF));
}
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
index af3f11c..5de4260 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
@@ -941,7 +941,7 @@ public class JavaPanZoomController
@Override
public void onLongPress(MotionEvent motionEvent) {
- LOKitShell.sentTouchEvent("LongPress", motionEvent, getMotionInDocumentCoordinates(motionEvent));
+ LOKitShell.sendTouchEvent("LongPress", motionEvent, getMotionInDocumentCoordinates(motionEvent));
}
@Override
@@ -949,7 +949,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, getMotionInDocumentCoordinates(motionEvent));
+ LOKitShell.sendTouchEvent("SingleTap", motionEvent, getMotionInDocumentCoordinates(motionEvent));
}
// return false because we still want to get the ACTION_UP event that triggers this
return false;
@@ -959,14 +959,14 @@ 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, getMotionInDocumentCoordinates(motionEvent));
+ LOKitShell.sendTouchEvent("SingleTap", motionEvent, getMotionInDocumentCoordinates(motionEvent));
}
return true;
}
@Override
public boolean onDoubleTap(MotionEvent motionEvent) {
- LOKitShell.sentTouchEvent("DoubleTap", motionEvent, getMotionInDocumentCoordinates(motionEvent));
+ LOKitShell.sendTouchEvent("DoubleTap", motionEvent, getMotionInDocumentCoordinates(motionEvent));
return true;
}
More information about the Libreoffice-commits
mailing list