summaryrefslogtreecommitdiff
path: root/android/source/src
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2021-03-18 15:57:40 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2021-03-19 07:35:35 +0100
commitbf6efbb808929bfba42f88c894be93d1aa6f4210 (patch)
tree251e60b074241e5e07d7ba36a88ce4210d1404c4 /android/source/src
parent878cbe229fdb61501bf7889408a19fca14d1afdd (diff)
android: Don't allow editing for read-only docs
Previously when experimental mode was enabled in Android Viewer, a "This file is read-only, saving is disabled." info was shown to the user when opening a file read-only, e.g. when the file was passed from a third-party app. However, editing the document was still possible, a dialog asking whether or not to save the modified doc was shown when existing and only then saving would fail. Disable editing completely for this case, rather than having the user lose changes in the end. Change-Id: Ie523971949d11909223aeac4f99023ecf28cb56c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112693 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android/source/src')
-rw-r--r--android/source/src/java/org/libreoffice/LOKitShell.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/source/src/java/org/libreoffice/LOKitShell.java b/android/source/src/java/org/libreoffice/LOKitShell.java
index c69e02669619..46ca256c7993 100644
--- a/android/source/src/java/org/libreoffice/LOKitShell.java
+++ b/android/source/src/java/org/libreoffice/LOKitShell.java
@@ -61,7 +61,7 @@ public class LOKitShell {
}
public static boolean isEditingEnabled() {
- return LibreOfficeMainActivity.isExperimentalMode();
+ return !LibreOfficeMainActivity.isReadOnlyMode();
}
// EVENTS