summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java5
-rw-r--r--android/source/src/java/org/mozilla/gecko/gfx/LayerView.java20
2 files changed, 6 insertions, 19 deletions
diff --git a/android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java b/android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java
index 101afe4b70ac..6b40ae4ba905 100644
--- a/android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java
+++ b/android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java
@@ -41,9 +41,6 @@ public abstract class CommonCanvasElement implements CanvasElement, CanvasElemen
*/
@Override
public boolean contains(float x, float y) {
- if (!isVisible()) {
- return false;
- }
- return onHitTest(x, y);
+ return isVisible() && onHitTest(x, y);
}
}
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 41fafd46a3db..05f2118114c8 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -200,37 +200,27 @@ public class LayerView extends FrameLayout {
@Override
public boolean onKeyPreIme(int keyCode, KeyEvent event) {
- if (mInputConnectionHandler != null)
- return mInputConnectionHandler.onKeyPreIme(keyCode, event);
- return false;
+ return mInputConnectionHandler != null && mInputConnectionHandler.onKeyPreIme(keyCode, event);
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
- if (mInputConnectionHandler != null)
- return mInputConnectionHandler.onKeyDown(keyCode, event);
- return false;
+ return mInputConnectionHandler != null && mInputConnectionHandler.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
- if (mInputConnectionHandler != null)
- return mInputConnectionHandler.onKeyLongPress(keyCode, event);
- return false;
+ return mInputConnectionHandler != null && mInputConnectionHandler.onKeyLongPress(keyCode, event);
}
@Override
public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) {
- if (mInputConnectionHandler != null)
- return mInputConnectionHandler.onKeyMultiple(keyCode, repeatCount, event);
- return false;
+ return mInputConnectionHandler != null && mInputConnectionHandler.onKeyMultiple(keyCode, repeatCount, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
- if (mInputConnectionHandler != null)
- return mInputConnectionHandler.onKeyUp(keyCode, event);
- return false;
+ return mInputConnectionHandler != null && mInputConnectionHandler.onKeyUp(keyCode, event);
}
public boolean isIMEEnabled() {