aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-01 15:23:55 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-01 15:23:55 +0200
commit9522dcad8ae0c4ad52c9adbf73d6784bc05449e0 (patch)
treefc7702334cc1494047f04776b61db27bd9ada1e3 /src/main/java/de/pixart/messenger/ui
parentab9ffbfe8a84a18274ead148aff394685afbb4cd (diff)
migrated some views over to app compat text styles
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/OmemoActivity.java37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/OmemoActivity.java b/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
index 1ee2f9355..b278e146c 100644
--- a/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
@@ -14,8 +14,6 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
-import java.security.cert.X509Certificate;
-
import de.pixart.messenger.Config;
import de.pixart.messenger.R;
import de.pixart.messenger.crypto.axolotl.FingerprintStatus;
@@ -125,10 +123,6 @@ public abstract class OmemoActivity extends XmppActivity {
CompoundButton.OnCheckedChangeListener
onCheckedChangeListener) {
ContactKeyBinding binding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.contact_key, keys, true);
- if (Config.X509_VERIFICATION && status.getTrust() == FingerprintStatus.Trust.VERIFIED_X509) {
- binding.key.setOnClickListener(v -> showX509Certificate(account, fingerprint));
- binding.keyType.setOnClickListener(v -> showX509Certificate(account, fingerprint));
- }
binding.tglTrust.setVisibility(View.VISIBLE);
registerForContextMenu(binding.getRoot());
binding.getRoot().setTag(R.id.TAG_ACCOUNT, account);
@@ -212,37 +206,6 @@ public abstract class OmemoActivity extends XmppActivity {
builder.create().show();
}
- private void showX509Certificate(Account account, String fingerprint) {
- X509Certificate x509Certificate = account.getAxolotlService().getFingerprintCertificate(fingerprint);
- if (x509Certificate != null) {
- showCertificateInformationDialog(CryptoHelper.extractCertificateInformation(x509Certificate));
- } else {
- Toast.makeText(this, R.string.certificate_not_found, Toast.LENGTH_SHORT).show();
- }
- }
-
- private void showCertificateInformationDialog(Bundle bundle) {
- View view = getLayoutInflater().inflate(R.layout.certificate_information, null);
- final String not_available = getString(R.string.certicate_info_not_available);
- TextView subject_cn = (TextView) view.findViewById(R.id.subject_cn);
- TextView subject_o = (TextView) view.findViewById(R.id.subject_o);
- TextView issuer_cn = (TextView) view.findViewById(R.id.issuer_cn);
- TextView issuer_o = (TextView) view.findViewById(R.id.issuer_o);
- TextView sha1 = (TextView) view.findViewById(R.id.sha1);
-
- subject_cn.setText(bundle.getString("subject_cn", not_available));
- subject_o.setText(bundle.getString("subject_o", not_available));
- issuer_cn.setText(bundle.getString("issuer_cn", not_available));
- issuer_o.setText(bundle.getString("issuer_o", not_available));
- sha1.setText(bundle.getString("sha1", not_available));
-
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setTitle(R.string.certificate_information);
- builder.setView(view);
- builder.setPositiveButton(R.string.ok, null);
- builder.create().show();
- }
-
@Override
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
ScanActivity.onRequestPermissionResult(this, requestCode, grantResults);