aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2016-04-04 20:39:06 +0200
committerChristian S <christian@pix-art.de>2016-04-04 20:39:06 +0200
commit3e31db1746e90f460686b0a3fd55ffaa516e2bca (patch)
treee66e30f0b25e973b5d0b7566e21f85a1b5d19638 /src/main/java/eu/siacs/conversations
parent9a8bd064f05601c0fd31e37c6751ab056d03b666 (diff)
add option to only allow one account and set it to true
Diffstat (limited to 'src/main/java/eu/siacs/conversations')
-rw-r--r--src/main/java/eu/siacs/conversations/Config.java3
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java6
2 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java
index 179ab6a88..763beb252 100644
--- a/src/main/java/eu/siacs/conversations/Config.java
+++ b/src/main/java/eu/siacs/conversations/Config.java
@@ -40,11 +40,10 @@ public final class Config {
public static final String CONFERENCE_DOMAIN_LOCK = null; //only allow conference creation for this domain
public static final boolean LOCK_DOMAINS_IN_CONVERSATIONS = false; //only add contacts and conferences for own domains
public static final boolean LOCK_SETTINGS = false; //set to true to disallow account and settings editing
-
+ public static final boolean SINGLE_ACCOUNT = true; //set to true to allow only one account
public static final boolean DISALLOW_REGISTRATION_IN_UI = false; //hide the register checkbox
public static final boolean ALLOW_NON_TLS_CONNECTIONS = false; //very dangerous. you should have a good reason to set this to true
- public static final boolean FORCE_E2E_ENCRYPTION = false; //disables ability to send unencrypted 1-on-1
public static final boolean FORCE_ORBOT = false; // always use TOR
public static final boolean HIDE_MESSAGE_TEXT_IN_NOTIFICATION = false;
diff --git a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
index feac2c622..82bce31c0 100644
--- a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -114,7 +114,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
ManageAccountActivity.this.getMenuInflater().inflate(
- R.menu.manageaccounts_context, menu);
+ R.menu.manageaccounts_context, menu);
AdapterContextMenuInfo acmi = (AdapterContextMenuInfo) menuInfo;
this.selectedAccount = accountList.get(acmi.position);
if (this.selectedAccount.isOptionSet(Account.OPTION_DISABLED)) {
@@ -155,9 +155,9 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
addAccount.setVisible(false);
addAccountWithCertificate.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
} else {
- addAccount.setVisible(!Config.LOCK_SETTINGS);
+ addAccount.setVisible(!(Config.LOCK_SETTINGS || Config.SINGLE_ACCOUNT));
}
- addAccountWithCertificate.setVisible(!Config.LOCK_SETTINGS);
+ addAccountWithCertificate.setVisible(!(Config.LOCK_SETTINGS || Config.SINGLE_ACCOUNT));
if (!accountsLeftToEnable()) {
enableAll.setVisible(false);