From 4607e2c546fec78d7ae0ca8ce779a2267e6edbe2 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Tue, 22 Jul 2014 17:27:44 +0200 Subject: switched to mtm --- .../conversations/ui/ManageAccountActivity.java | 54 ---------------------- 1 file changed, 54 deletions(-) (limited to 'src/eu/siacs/conversations/ui/ManageAccountActivity.java') diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index 6fa1ec31..ed657902 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -59,57 +59,6 @@ public class ManageAccountActivity extends XmppActivity { } }; - protected OnTLSExceptionReceived tlsExceptionReceived = new OnTLSExceptionReceived() { - - @Override - public void onTLSExceptionReceived(final String fingerprint, - final Account account) { - activity.runOnUiThread(new Runnable() { - - @Override - public void run() { - AlertDialog.Builder builder = new AlertDialog.Builder( - activity); - builder.setTitle(getString(R.string.account_status_error)); - builder.setIconAttribute(android.R.attr.alertDialogIcon); - View view = (View) getLayoutInflater().inflate( - R.layout.cert_warning, null); - TextView sha = (TextView) view.findViewById(R.id.sha); - TextView hint = (TextView) view.findViewById(R.id.hint); - StringBuilder humanReadableSha = new StringBuilder(); - humanReadableSha.append(fingerprint); - for (int i = 2; i < 59; i += 3) { - if ((i == 14) || (i == 29) || (i == 44)) { - humanReadableSha.insert(i, "\n"); - } else { - humanReadableSha.insert(i, ":"); - } - - } - hint.setText(getString(R.string.untrusted_cert_hint, - account.getServer())); - sha.setText(humanReadableSha.toString()); - builder.setView(view); - builder.setNegativeButton( - getString(R.string.certif_no_trust), null); - builder.setPositiveButton(getString(R.string.certif_trust), - new OnClickListener() { - - @Override - public void onClick(DialogInterface dialog, - int which) { - account.setSSLCertFingerprint(fingerprint); - activity.xmppConnectionService - .updateAccount(account); - } - }); - builder.create().show(); - } - }); - - } - }; - @Override protected void onCreate(Bundle savedInstanceState) { @@ -471,7 +420,6 @@ public class ManageAccountActivity extends XmppActivity { protected void onStop() { if (xmppConnectionServiceBound) { xmppConnectionService.removeOnAccountListChangedListener(); - xmppConnectionService.removeOnTLSExceptionReceivedListener(); } super.onStop(); } @@ -479,8 +427,6 @@ public class ManageAccountActivity extends XmppActivity { @Override void onBackendConnected() { xmppConnectionService.setOnAccountListChangedListener(accountChanged); - xmppConnectionService - .setOnTLSExceptionReceivedListener(tlsExceptionReceived); this.accountList.clear(); this.accountList.addAll(xmppConnectionService.getAccounts()); accountListViewAdapter.notifyDataSetChanged(); -- cgit v1.2.3