diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-02-15 17:02:03 +0900 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-23 10:10:20 +0100 |
commit | ee862723c043f380701da3fac0c2b83064777f7d (patch) | |
tree | 9450c412701f084049b96241c25ac4dfc9ff3819 /android | |
parent | b21fd935d9b79ec494d553429eb357581b68bddb (diff) |
android: check if mTileProvider is available
Change-Id: Ibf2d491ad8867facab6181bec3d26d99a3ffbcf8
Diffstat (limited to 'android')
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java index a98b6cc75768..0ea2829bbad9 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java @@ -144,6 +144,7 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation } } + @Override public void run() { try { while (true) { @@ -193,6 +194,9 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation if (!LOKitShell.isEditingEnabled()) { return; } + if (mTileProvider == null) { + return; + } if (keyEventType == "KeyPress") { mTileProvider.keyPress(keyEvent); } else if (keyEventType.equals("KeyRelease")) { @@ -207,6 +211,9 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation if (!LOKitShell.isEditingEnabled()) { return; } + if (mTileProvider == null) { + return; + } LibreOfficeMainActivity.mAppContext.showSoftKeyboard(); mTileProvider.mouseButtonDown(mDocumentTouchCoordinate); } |