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

android: check if mTileProvider is available

Change-Id: Ibf2d491ad8867facab6181bec3d26d99a3ffbcf8
üst b21fd935
...@@ -144,6 +144,7 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation ...@@ -144,6 +144,7 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation
} }
} }
@Override
public void run() { public void run() {
try { try {
while (true) { while (true) {
...@@ -193,6 +194,9 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation ...@@ -193,6 +194,9 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation
if (!LOKitShell.isEditingEnabled()) { if (!LOKitShell.isEditingEnabled()) {
return; return;
} }
if (mTileProvider == null) {
return;
}
if (keyEventType == "KeyPress") { if (keyEventType == "KeyPress") {
mTileProvider.keyPress(keyEvent); mTileProvider.keyPress(keyEvent);
} else if (keyEventType.equals("KeyRelease")) { } else if (keyEventType.equals("KeyRelease")) {
...@@ -207,6 +211,9 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation ...@@ -207,6 +211,9 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation
if (!LOKitShell.isEditingEnabled()) { if (!LOKitShell.isEditingEnabled()) {
return; return;
} }
if (mTileProvider == null) {
return;
}
LibreOfficeMainActivity.mAppContext.showSoftKeyboard(); LibreOfficeMainActivity.mAppContext.showSoftKeyboard();
mTileProvider.mouseButtonDown(mDocumentTouchCoordinate); mTileProvider.mouseButtonDown(mDocumentTouchCoordinate);
} }
......
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