diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-10-03 21:51:17 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-10-03 22:54:38 +0200 |
commit | cdfdf76787b1c3983e4eae0620fe711647ed0b9e (patch) | |
tree | 838c7cfc3ae66375b4d232fa8ef35cc88fbf7b83 /android | |
parent | android: make strikethrough work (it's not .uno:StrikeOut, but .uno:Strikeout) (diff) | |
download | core-cdfdf76787b1c3983e4eae0620fe711647ed0b9e.tar.gz core-cdfdf76787b1c3983e4eae0620fe711647ed0b9e.zip |
android: avoid arrayIndexOutOfBounds when lokit payload doesn't have a value
and is not handled yet like ".uno:CharFontName="
Change-Id: I09d17b6be9ce9b9c9ae6883f8222c8628268815d
Diffstat (limited to 'android')
-rw-r--r-- | android/source/src/java/org/libreoffice/InvalidationHandler.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java index fd382db11ddb..32fe8530671f 100644 --- a/android/source/src/java/org/libreoffice/InvalidationHandler.java +++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java @@ -84,6 +84,10 @@ public class InvalidationHandler implements Document.MessageCallback { private void stateChanged(String payload) { String[] parts = payload.split("="); + if (parts.length < 2) { + Log.e(LOGTAG, "LOK_CALLBACK_STATE_CHANGED unexpected payload: " + payload); + return; + } boolean pressed = Boolean.parseBoolean(parts[1]); if (parts[0].equals(".uno:Bold")) { LOKitShell.getToolbarController().onToggleStateChanged(Document.BOLD, pressed); |