private void update() { isUpdating = true; AbstractContact abstractContact = RosterManager.getInstance().getBestContact(account, user); ContactTitleInflater.updateTitle(findViewById(R.id.title), this, abstractContact); verifiedView.setChecked(OTRManager.getInstance().isVerified(account, user)); scanView.setEnabled(remoteFingerprint != null); verifiedView.setEnabled(remoteFingerprint != null); ((TextView) findViewById(R.id.otr_remote_fingerprint)) .setText( remoteFingerprint == null ? getString(R.string.unknown) : CertificateManager.showFingerprint(remoteFingerprint)); showView.setEnabled(localFingerprint != null); copyView.setEnabled(localFingerprint != null); ((TextView) findViewById(R.id.otr_local_fingerprint)) .setText( localFingerprint == null ? getString(R.string.unknown) : CertificateManager.showFingerprint(localFingerprint)); isUpdating = false; }
@Override public void onAccept(DialogBuilder dialogBuilder) { switch (dialogBuilder.getDialogId()) { case R.string.cache_clear_warning: AccountManager.getInstance().setStatus(StatusMode.unavailable, null); ((Application) getApplication()).requestToClear(); Application.getInstance().requestToClose(); showDialog(R.string.application_state_closing); break; case R.string.security_clear_certificate_warning: CertificateManager.getInstance().removeCertificates(); ConnectionManager.getInstance().updateConnections(true); break; case R.string.contacts_reset_offline_warning: GroupManager.getInstance().resetShowOfflineModes(); break; } }