diff options
author | Rene Treffer <treffer@measite.de> | 2014-04-03 18:16:14 +0200 |
---|---|---|
committer | Rene Treffer <treffer@measite.de> | 2014-04-03 18:37:25 +0200 |
commit | 9502ff25dd6c32c92d356baaaa1640fe26314595 (patch) | |
tree | 7767f2193bd2233b3275db2342c36d6e08eeac4f /src/eu/siacs/conversations/ui | |
parent | 2506ef82df6369fef71e00e891b2a2c69330ff94 (diff) |
Add compression support
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r-- | src/eu/siacs/conversations/ui/EditAccount.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/ui/EditAccount.java b/src/eu/siacs/conversations/ui/EditAccount.java index 080b09ea..cdebec54 100644 --- a/src/eu/siacs/conversations/ui/EditAccount.java +++ b/src/eu/siacs/conversations/ui/EditAccount.java @@ -43,7 +43,9 @@ public class EditAccount extends DialogFragment { final EditText jidText = (EditText) view.findViewById(R.id.account_jid); final TextView confirmPwDesc = (TextView) view .findViewById(R.id.account_confirm_password_desc); - CheckBox useTLS = (CheckBox) view.findViewById(R.id.account_usetls); + final CheckBox useTLS = (CheckBox) view.findViewById(R.id.account_usetls); + + final CheckBox useCompression = (CheckBox) view.findViewById(R.id.account_usecompression); final EditText password = (EditText) view .findViewById(R.id.account_password); @@ -57,11 +59,8 @@ public class EditAccount extends DialogFragment { if (account != null) { jidText.setText(account.getJid()); password.setText(account.getPassword()); - if (account.isOptionSet(Account.OPTION_USETLS)) { - useTLS.setChecked(true); - } else { - useTLS.setChecked(false); - } + useTLS.setChecked(account.isOptionSet(Account.OPTION_USETLS)); + useCompression.setChecked(account.isOptionSet(Account.OPTION_USETLS)); Log.d("xmppService","mein debugger. account != null"); if (account.isOptionSet(Account.OPTION_REGISTER)) { registerAccount.setChecked(true); @@ -122,6 +121,7 @@ public class EditAccount extends DialogFragment { .findViewById(R.id.account_password); String password = passwordEdit.getText().toString(); CheckBox useTLS = (CheckBox) d.findViewById(R.id.account_usetls); + CheckBox useCompression = (CheckBox) d.findViewById(R.id.account_usecompression); CheckBox register = (CheckBox) d.findViewById(R.id.edit_account_register_new); String username; String server; @@ -141,6 +141,7 @@ public class EditAccount extends DialogFragment { account = new Account(username, server, password); } account.setOption(Account.OPTION_USETLS, useTLS.isChecked()); + account.setOption(Account.OPTION_USECOMPRESSION, useCompression.isChecked()); account.setOption(Account.OPTION_REGISTER, register.isChecked()); if (listener != null) { listener.onAccountEdited(account); |