aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-07-22 01:00:20 +0200
committerAndreas Straub <andy@strb.org>2015-07-22 01:00:20 +0200
commitc2813cea290b59036bf6d162552e6df3b715ab81 (patch)
treee8d19c8f11597457b95d3208b35712c34a4d5f78
parent4c1c2892c772fa4622195c81ad35c9e51ab02f35 (diff)
Hide regenerate keys button
Can re-enable it via Config.java setting
-rw-r--r--src/main/java/eu/siacs/conversations/Config.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java23
-rw-r--r--src/main/res/layout/activity_edit_account.xml2
3 files changed, 16 insertions, 11 deletions
diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java
index b697e7fe..d79a12f2 100644
--- a/src/main/java/eu/siacs/conversations/Config.java
+++ b/src/main/java/eu/siacs/conversations/Config.java
@@ -37,6 +37,8 @@ public final class Config {
public static final boolean ENCRYPT_ON_HTTP_UPLOADED = false;
+ public static final boolean SHOW_REGENERATE_AXOLOTL_KEYS_BUTTON = false;
+
public static final long MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000;
public static final long MAM_MAX_CATCHUP = MILLISECONDS_IN_DAY / 2;
public static final int MAM_MAX_MESSAGES = 500;
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
index aac8788f..3c1f155d 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -29,6 +29,7 @@ import org.whispersystems.libaxolotl.IdentityKey;
import java.util.Set;
+import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate;
@@ -547,16 +548,18 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
}
}
});
- this.mRegenerateAxolotlKeyButton
- .setVisibility(View.VISIBLE);
- this.mRegenerateAxolotlKeyButton
- .setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(final View v) {
- showRegenerateAxolotlKeyDialog();
- }
- });
+ if (Config.SHOW_REGENERATE_AXOLOTL_KEYS_BUTTON) {
+ this.mRegenerateAxolotlKeyButton
+ .setVisibility(View.VISIBLE);
+ this.mRegenerateAxolotlKeyButton
+ .setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(final View v) {
+ showRegenerateAxolotlKeyDialog();
+ }
+ });
+ }
} else {
this.mAxolotlFingerprintBox.setVisibility(View.GONE);
}
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index 3dabfc6f..bbcef140 100644
--- a/src/main/res/layout/activity_edit_account.xml
+++ b/src/main/res/layout/activity_edit_account.xml
@@ -400,7 +400,7 @@
android:background="?android:selectableItemBackground"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_refresh"
- android:visibility="visible"
+ android:visibility="gone"
android:contentDescription="@string/regenerate_axolotl_key"/>
</LinearLayout>