summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/Bootstrap/Makefile.shared1
-rw-r--r--android/source/res/values-de/strings.xml1
-rw-r--r--android/source/res/values/strings.xml1
-rw-r--r--android/source/src/java/org/libreoffice/AboutDialogFragment.java11
4 files changed, 14 insertions, 0 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index ffb2c16a832d..682c98709630 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -113,5 +113,6 @@ liboSettings.gradle: $(BUILDDIR)/config_build.mk $(BUILDDIR)/config_host.mk
&& echo " minSdkVersion = $(ANDROID_API_LEVEL)" \
&& echo " versionCode project.hasProperty('cmdVersionCode') ? cmdVersionCode.toInteger() : $(if $(versionCode),$(versionCode),1)" \
&& echo " versionName '$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell cd $(SRCDIR) && git log -1 --format=%h)/$(OOO_VENDOR)'" \
+ && echo " buildConfigField('String', 'PRIVACY_POLICY_URL', '\"$(PRIVACY_POLICY_URL)\"')" \
&& echo "}" \
) > $@
diff --git a/android/source/res/values-de/strings.xml b/android/source/res/values-de/strings.xml
index 88fdbaedd73d..bd979b78f8ae 100644
--- a/android/source/res/values-de/strings.xml
+++ b/android/source/res/values-de/strings.xml
@@ -13,6 +13,7 @@
<string name="about_license">Lizenz anzeigen</string>
<string name="about_notice">Hinweise anzeigen</string>
+ <string name="about_privacy_policy">Datenschutzerklärung</string>
<string name="new_textdocument">Neues Textdokument</string>
<string name="new_presentation">Neue Präsentation</string>
diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml
index 77bfc8c110e0..d2262406136e 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -13,6 +13,7 @@
<string name="about_license">Show License</string>
<string name="about_notice">Show Notice</string>
+ <string name="about_privacy_policy">Privacy Policy</string>
<string name="create_file">Create New File</string>
<string name="new_textdocument">New Text Document</string>
diff --git a/android/source/src/java/org/libreoffice/AboutDialogFragment.java b/android/source/src/java/org/libreoffice/AboutDialogFragment.java
index 17c43787e619..4abf9c14a35f 100644
--- a/android/source/src/java/org/libreoffice/AboutDialogFragment.java
+++ b/android/source/src/java/org/libreoffice/AboutDialogFragment.java
@@ -88,6 +88,17 @@ public class AboutDialogFragment extends DialogFragment {
}
});
+ // when privacy policy URL is set (via '--with-privacy-policy-url=<url>' autogen option),
+ // add button to open that URL
+ final String privacyUrl = BuildConfig.PRIVACY_POLICY_URL;
+ if (!privacyUrl.isEmpty() && privacyUrl != "undefined") {
+ builder.setNeutralButton(R.string.about_privacy_policy, (DialogInterface dialog, int id) -> {
+ Intent openPrivacyUrlIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(privacyUrl));
+ startActivity(openPrivacyUrlIntent);
+ dialog.dismiss();
+ });
+ }
+
return builder.create();
}