tdf#131622 android: Handle password callback for non-editing case, too
'CALLBACK_DOCUMENT_PASSWORD' needs to be handled
when opening a password-protected file, so don't
ignore it for the plain viewer case.
This makes a password prompt appear as expected
when trying to open a password-protected (encrypted)
file with Android Viewer, regardless of whether the
experimental editing option is enabled or not.
Change-Id: Ib7e969a53a484df3e2c7be1a0df4c81a48668045
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91228
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index e79fe12..32e9b56 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -52,6 +52,7 @@ public class InvalidationHandler implements Document.MessageCallback, Office.Mes
if (!LOKitShell.isEditingEnabled()) {
// enable handling of hyperlinks and search result even in the Viewer
if (messageID != Document.CALLBACK_INVALIDATE_TILES
&& messageID != Document.CALLBACK_DOCUMENT_PASSWORD
&& messageID != Document.CALLBACK_HYPERLINK_CLICKED
&& messageID != Document.CALLBACK_SEARCH_RESULT_SELECTION
&& messageID != Document.CALLBACK_TEXT_SELECTION