aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2020-04-10 20:45:17 +0200
committersteckbrief <steckbrief@chefmail.de>2020-04-10 20:45:17 +0200
commitae791a5a4acbef46b8b91896373369ff143fc009 (patch)
treea1e2e83e3220371c5bc8b497fc04eb09bd699fe7
parent815e972b2c0891453a0fa028029b843e9b796537 (diff)
relates to FS#299: moves privacy and terms of use urls to build config
-rw-r--r--build.gradle2
-rw-r--r--src/main/java/de/pixart/messenger/ui/AboutActivity.java5
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java5
3 files changed, 8 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle
index 936ce7e9b..ae5499dc4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -110,6 +110,8 @@ android {
buildConfigField 'String', 'STATICMAP_URL', '"https://piratx.thedevstack.de/staticmap"'
buildConfigField 'String', 'INVITE_HOST', '"jabber.thedevstack.de"'
+ buildConfigField 'String', 'TERMS_OF_USE_URL', '"https://piratx.thedevstack.de/termsofuse.html"'
+ buildConfigField 'String', 'PRIVACY_URL', '"https://piratx.thedevstack.de/privacy.html"'
}
dataBinding {
diff --git a/src/main/java/de/pixart/messenger/ui/AboutActivity.java b/src/main/java/de/pixart/messenger/ui/AboutActivity.java
index 88f863476..9aaa8f2c7 100644
--- a/src/main/java/de/pixart/messenger/ui/AboutActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/AboutActivity.java
@@ -5,6 +5,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.widget.Button;
+import de.pixart.messenger.BuildConfig;
import de.pixart.messenger.R;
import de.pixart.messenger.utils.ThemeHelper;
@@ -33,13 +34,13 @@ public class AboutActivity extends XmppActivity {
privacyButton = findViewById(R.id.show_privacy_policy);
privacyButton.setOnClickListener(view -> {
- final Uri uri = Uri.parse("https://jabber.pix-art.de/privacy/");
+ final Uri uri = Uri.parse(BuildConfig.PRIVACY_URL);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(browserIntent);
});
termsOfUseButton = findViewById(R.id.show_terms_of_use);
termsOfUseButton.setOnClickListener(view -> {
- final Uri uri = Uri.parse("https://jabber.pix-art.de/termsofuse/");
+ final Uri uri = Uri.parse(BuildConfig.TERMS_OF_USE_URL);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(browserIntent);
});
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 666c7b96d..0b18da407 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -45,6 +45,7 @@ import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
+import de.pixart.messenger.BuildConfig;
import de.pixart.messenger.Config;
import de.pixart.messenger.R;
import de.pixart.messenger.crypto.axolotl.AxolotlService;
@@ -625,12 +626,12 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.binding.accountRegisterNew.setVisibility(View.GONE);
}
this.binding.showPrivacyPolicy.setOnClickListener(view -> {
- final Uri uri = Uri.parse("https://jabber.pix-art.de/privacy/");
+ final Uri uri = Uri.parse(BuildConfig.PRIVACY_URL);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(browserIntent);
});
this.binding.showTermsOfUse.setOnClickListener(view -> {
- final Uri uri = Uri.parse("https://jabber.pix-art.de/termsofuse/");
+ final Uri uri = Uri.parse(BuildConfig.TERMS_OF_USE_URL);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(browserIntent);
});