From 48afeb571bcc2ae1d123ef549426c06e52dc1cc9 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 15 Nov 2016 20:00:52 +0100 Subject: [PATCH] refactor omemo fingerprint UI code --- art/ic_verified_fingerprint.svg | 54 ++++ art/render.rb | 3 +- .../eu/siacs/conversations/OmemoActivity.java | 237 ++++++++++++++++++ .../ui/ContactDetailsActivity.java | 47 +--- .../conversations/ui/EditAccountActivity.java | 14 +- .../conversations/ui/TrustKeysActivity.java | 16 +- .../siacs/conversations/ui/XmppActivity.java | 135 ---------- .../drawable-hdpi/ic_verified_fingerprint.png | Bin 0 -> 1336 bytes .../message_bubble_received.9.png | Bin 765 -> 765 bytes .../message_bubble_received_dark.9.png | Bin 779 -> 779 bytes .../message_bubble_received_grey.9.png | Bin 750 -> 750 bytes .../message_bubble_received_warning.9.png | Bin 757 -> 757 bytes .../message_bubble_received_white.9.png | Bin 779 -> 779 bytes .../drawable-hdpi/message_bubble_sent.9.png | Bin 687 -> 687 bytes .../message_bubble_sent_grey.9.png | Bin 707 -> 707 bytes .../drawable-mdpi/ic_verified_fingerprint.png | Bin 0 -> 1032 bytes .../message_bubble_received.9.png | Bin 594 -> 594 bytes .../message_bubble_received_dark.9.png | Bin 606 -> 606 bytes .../message_bubble_received_grey.9.png | Bin 595 -> 595 bytes .../message_bubble_received_warning.9.png | Bin 598 -> 598 bytes .../message_bubble_received_white.9.png | Bin 610 -> 610 bytes .../drawable-mdpi/message_bubble_sent.9.png | Bin 558 -> 558 bytes .../message_bubble_sent_grey.9.png | Bin 568 -> 568 bytes .../ic_verified_fingerprint.png | Bin 0 -> 1557 bytes .../message_bubble_received.9.png | Bin 929 -> 929 bytes .../message_bubble_received_dark.9.png | Bin 928 -> 928 bytes .../message_bubble_received_grey.9.png | Bin 915 -> 915 bytes .../message_bubble_received_warning.9.png | Bin 921 -> 921 bytes .../message_bubble_received_white.9.png | Bin 935 -> 935 bytes .../drawable-xhdpi/message_bubble_sent.9.png | Bin 857 -> 857 bytes .../message_bubble_sent_grey.9.png | Bin 842 -> 842 bytes .../ic_verified_fingerprint.png | Bin 0 -> 2305 bytes .../message_bubble_received.9.png | Bin 1334 -> 1334 bytes .../message_bubble_received_dark.9.png | Bin 1321 -> 1321 bytes .../message_bubble_received_grey.9.png | Bin 1301 -> 1301 bytes .../message_bubble_received_warning.9.png | Bin 1308 -> 1308 bytes .../message_bubble_received_white.9.png | Bin 1344 -> 1344 bytes .../drawable-xxhdpi/message_bubble_sent.9.png | Bin 1190 -> 1190 bytes .../message_bubble_sent_grey.9.png | Bin 1173 -> 1173 bytes .../ic_verified_fingerprint.png | Bin 0 -> 2794 bytes .../message_bubble_received.9.png | Bin 1714 -> 1714 bytes .../message_bubble_received_dark.9.png | Bin 1722 -> 1722 bytes .../message_bubble_received_grey.9.png | Bin 1670 -> 1670 bytes .../message_bubble_received_warning.9.png | Bin 1674 -> 1674 bytes .../message_bubble_received_white.9.png | Bin 1705 -> 1705 bytes .../message_bubble_sent.9.png | Bin 1499 -> 1499 bytes .../message_bubble_sent_grey.9.png | Bin 1468 -> 1468 bytes src/main/res/layout/contact_key.xml | 79 +++--- src/main/res/menu/omemo_key_context.xml | 9 + src/main/res/values/ids.xml | 5 + src/main/res/values/strings.xml | 3 + 51 files changed, 371 insertions(+), 231 deletions(-) create mode 100644 art/ic_verified_fingerprint.svg create mode 100644 src/main/java/eu/siacs/conversations/OmemoActivity.java create mode 100644 src/main/res/drawable-hdpi/ic_verified_fingerprint.png create mode 100644 src/main/res/drawable-mdpi/ic_verified_fingerprint.png create mode 100644 src/main/res/drawable-xhdpi/ic_verified_fingerprint.png create mode 100644 src/main/res/drawable-xxhdpi/ic_verified_fingerprint.png create mode 100644 src/main/res/drawable-xxxhdpi/ic_verified_fingerprint.png create mode 100644 src/main/res/menu/omemo_key_context.xml create mode 100644 src/main/res/values/ids.xml diff --git a/art/ic_verified_fingerprint.svg b/art/ic_verified_fingerprint.svg new file mode 100644 index 000000000..7ac6da02f --- /dev/null +++ b/art/ic_verified_fingerprint.svg @@ -0,0 +1,54 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/art/render.rb b/art/render.rb index fe39e66bf..93c049969 100755 --- a/art/render.rb +++ b/art/render.rb @@ -50,6 +50,7 @@ images = { 'ic_notifications_off_white80.svg' => ['ic_notifications_off_white80', 24], 'ic_notifications_paused_white80.svg' => ['ic_notifications_paused_white80', 24], 'ic_notifications_white80.svg' => ['ic_notifications_white80', 24], + 'ic_verified_fingerprint.svg' => ['ic_verified_fingerprint', 36], 'md_switch_thumb_disable.svg' => ['switch_thumb_disable', 48], 'md_switch_thumb_off_normal.svg' => ['switch_thumb_off_normal', 48], 'md_switch_thumb_off_pressed.svg' => ['switch_thumb_off_pressed', 48], @@ -57,7 +58,7 @@ images = { 'md_switch_thumb_on_pressed.svg' => ['switch_thumb_on_pressed', 48], 'message_bubble_received.svg' => ['message_bubble_received.9', 0], 'message_bubble_received_grey.svg' => ['message_bubble_received_grey.9', 0], - 'message_bubble_received_dark.svg' => ['message_bubble_received_dark.9', 0], + 'message_bubble_received_dark.svg' => ['message_bubble_received_dark.9', 0], 'message_bubble_received_warning.svg' => ['message_bubble_received_warning.9', 0], 'message_bubble_received_white.svg' => ['message_bubble_received_white.9', 0], 'message_bubble_sent.svg' => ['message_bubble_sent.9', 0], diff --git a/src/main/java/eu/siacs/conversations/OmemoActivity.java b/src/main/java/eu/siacs/conversations/OmemoActivity.java new file mode 100644 index 000000000..27f1dcf65 --- /dev/null +++ b/src/main/java/eu/siacs/conversations/OmemoActivity.java @@ -0,0 +1,237 @@ +package eu.siacs.conversations; + +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.os.Bundle; +import android.view.ContextMenu; +import android.view.MenuItem; +import android.view.View; +import android.widget.CompoundButton; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; +import android.widget.Toast; + +import java.security.cert.X509Certificate; + +import eu.siacs.conversations.crypto.axolotl.FingerprintStatus; +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.ui.XmppActivity; +import eu.siacs.conversations.ui.widget.Switch; +import eu.siacs.conversations.utils.CryptoHelper; + + +public abstract class OmemoActivity extends XmppActivity { + + private Account mSelectedAccount; + private String mSelectedFingerprint; + + @Override + public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { + super.onCreateContextMenu(menu,v,menuInfo); + Object account = v.getTag(R.id.TAG_ACCOUNT); + Object fingerprint = v.getTag(R.id.TAG_FINGERPRINT); + if (account != null && fingerprint != null && account instanceof Account && fingerprint instanceof String) { + getMenuInflater().inflate(R.menu.omemo_key_context, menu); + this.mSelectedAccount = (Account) account; + this.mSelectedFingerprint = (String) fingerprint; + } + } + + @Override + public boolean onContextItemSelected(MenuItem item) { + switch (item.getItemId()) { + case R.id.purge_omemo_key: + showPurgeKeyDialog(mSelectedAccount,mSelectedFingerprint); + break; + case R.id.copy_omemo_key: + copyOmemoFingerprint(mSelectedFingerprint); + break; + } + return true; + } + + protected void copyOmemoFingerprint(String fingerprint) { + if (copyTextToClipboard(CryptoHelper.prettifyFingerprint(fingerprint.substring(2)), R.string.omemo_fingerprint)) { + Toast.makeText( + this, + R.string.toast_message_omemo_fingerprint, + Toast.LENGTH_SHORT).show(); + } + } + + protected boolean addFingerprintRow(LinearLayout keys, final Account account, final String fingerprint, boolean highlight) { + final FingerprintStatus status = account.getAxolotlService().getFingerprintTrust(fingerprint); + return status != null && addFingerprintRowWithListeners(keys, account, fingerprint, highlight, status, true, true, new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + account.getAxolotlService().setFingerprintTrust(fingerprint, FingerprintStatus.createActive(isChecked)); + } + }); + } + + protected boolean addFingerprintRowWithListeners(LinearLayout keys, final Account account, + final String fingerprint, + boolean highlight, + FingerprintStatus status, + boolean showTag, + boolean undecidedNeedEnablement, + CompoundButton.OnCheckedChangeListener + onCheckedChangeListener) { + if (status.isCompromised()) { + return false; + } + View view = getLayoutInflater().inflate(R.layout.contact_key, keys, false); + TextView key = (TextView) view.findViewById(R.id.key); + TextView keyType = (TextView) view.findViewById(R.id.key_type); + if (Config.X509_VERIFICATION && status.getTrust() == FingerprintStatus.Trust.VERIFIED_X509) { + View.OnClickListener listener = new View.OnClickListener() { + @Override + public void onClick(View v) { + showX509Certificate(account,fingerprint); + } + }; + key.setOnClickListener(listener); + keyType.setOnClickListener(listener); + } + Switch trustToggle = (Switch) view.findViewById(R.id.tgl_trust); + ImageView verifiedFingerprintSymbol = (ImageView) view.findViewById(R.id.verified_fingerprint); + trustToggle.setVisibility(View.VISIBLE); + registerForContextMenu(view); + view.setTag(R.id.TAG_ACCOUNT,account); + view.setTag(R.id.TAG_FINGERPRINT,fingerprint); + boolean x509 = Config.X509_VERIFICATION && status.getTrust() == FingerprintStatus.Trust.VERIFIED_X509; + final View.OnClickListener toast; + trustToggle.setChecked(status.isTrusted(), false); + + if (status.isActive()){ + key.setTextColor(getPrimaryTextColor()); + keyType.setTextColor(getSecondaryTextColor()); + if (status.isVerified()) { + verifiedFingerprintSymbol.setVisibility(View.VISIBLE); + trustToggle.setVisibility(View.GONE); + verifiedFingerprintSymbol.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + replaceToast(getString(R.string.this_device_has_been_verified), false); + } + }); + toast = null; + } else { + verifiedFingerprintSymbol.setVisibility(View.GONE); + trustToggle.setVisibility(View.VISIBLE); + trustToggle.setOnCheckedChangeListener(onCheckedChangeListener); + if (status.getTrust() == FingerprintStatus.Trust.UNDECIDED && undecidedNeedEnablement) { + trustToggle.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + account.getAxolotlService().setFingerprintTrust(fingerprint,FingerprintStatus.createActive(false)); + v.setEnabled(true); + v.setOnClickListener(null); + } + }); + trustToggle.setEnabled(false); + } else { + trustToggle.setOnClickListener(null); + trustToggle.setEnabled(true); + } + toast = new View.OnClickListener() { + @Override + public void onClick(View v) { + hideToast(); + } + }; + } + } else { + key.setTextColor(getTertiaryTextColor()); + keyType.setTextColor(getTertiaryTextColor()); + toast = new View.OnClickListener() { + @Override + public void onClick(View v) { + replaceToast(getString(R.string.this_device_is_no_longer_in_use), false); + } + }; + if (status.isVerified()) { + trustToggle.setVisibility(View.GONE); + verifiedFingerprintSymbol.setVisibility(View.VISIBLE); + verifiedFingerprintSymbol.setOnClickListener(toast); + } else { + trustToggle.setVisibility(View.VISIBLE); + verifiedFingerprintSymbol.setVisibility(View.GONE); + trustToggle.setOnClickListener(null); + trustToggle.setEnabled(false); + trustToggle.setOnClickListener(toast); + } + } + + view.setOnClickListener(toast); + key.setOnClickListener(toast); + keyType.setOnClickListener(toast); + if (showTag) { + keyType.setText(getString(x509 ? R.string.omemo_fingerprint_x509 : R.string.omemo_fingerprint)); + } else { + keyType.setVisibility(View.GONE); + } + if (highlight) { + keyType.setTextColor(getResources().getColor(R.color.accent)); + keyType.setText(getString(x509 ? R.string.omemo_fingerprint_x509_selected_message : R.string.omemo_fingerprint_selected_message)); + } else { + keyType.setText(getString(x509 ? R.string.omemo_fingerprint_x509 : R.string.omemo_fingerprint)); + } + + key.setText(CryptoHelper.prettifyFingerprint(fingerprint.substring(2))); + + keys.addView(view); + return true; + } + + public void showPurgeKeyDialog(final Account account, final String fingerprint) { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle(getString(R.string.purge_key)); + builder.setIconAttribute(android.R.attr.alertDialogIcon); + builder.setMessage(getString(R.string.purge_key_desc_part1) + + "\n\n" + CryptoHelper.prettifyFingerprint(fingerprint.substring(2)) + + "\n\n" + getString(R.string.purge_key_desc_part2)); + builder.setNegativeButton(getString(R.string.cancel), null); + builder.setPositiveButton(getString(R.string.purge_key), + new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + account.getAxolotlService().purgeKey(fingerprint); + refreshUi(); + } + }); + 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(); + } +} diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java index 9653ea057..a567f151f 100644 --- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -36,15 +36,14 @@ import java.security.cert.X509Certificate; import java.util.List; import eu.siacs.conversations.Config; +import eu.siacs.conversations.OmemoActivity; import eu.siacs.conversations.R; import eu.siacs.conversations.crypto.PgpEngine; import eu.siacs.conversations.crypto.axolotl.AxolotlService; import eu.siacs.conversations.crypto.axolotl.FingerprintStatus; -import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.ListItem; -import eu.siacs.conversations.entities.Presence; import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate; import eu.siacs.conversations.services.XmppConnectionService.OnRosterUpdate; import eu.siacs.conversations.utils.CryptoHelper; @@ -55,7 +54,7 @@ import eu.siacs.conversations.xmpp.XmppConnection; import eu.siacs.conversations.xmpp.jid.InvalidJidException; import eu.siacs.conversations.xmpp.jid.Jid; -public class ContactDetailsActivity extends XmppActivity implements OnAccountUpdate, OnRosterUpdate, OnUpdateBlocklist, OnKeyStatusUpdated { +public class ContactDetailsActivity extends OmemoActivity implements OnAccountUpdate, OnRosterUpdate, OnUpdateBlocklist, OnKeyStatusUpdated { public static final String ACTION_VIEW_CONTACT = "view_contact"; private Contact contact; @@ -448,12 +447,7 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd if (Config.supportOmemo()) { for (final String fingerprint : contact.getAccount().getAxolotlService().getFingerprintsForContact(contact)) { boolean highlight = fingerprint.equals(messageFingerprint); - hasKeys |= addFingerprintRow(keys, contact.getAccount(), fingerprint, highlight, new OnClickListener() { - @Override - public void onClick(View v) { - onOmemoKeyClicked(contact.getAccount(), fingerprint); - } - }); + hasKeys |= addFingerprintRow(keys, contact.getAccount(), fingerprint, highlight); } } if (Config.supportOpenPgp() && contact.getPgpKeyId() != 0) { @@ -509,40 +503,6 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd } } - private void onOmemoKeyClicked(Account account, String fingerprint) { - FingerprintStatus status = account.getAxolotlService().getFingerprintTrust(fingerprint); - if (Config.X509_VERIFICATION && status != null && status.getTrust() == FingerprintStatus.Trust.VERIFIED_X509) { - 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(); - } - protected void confirmToDeleteFingerprint(final String fingerprint) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.delete_fingerprint); @@ -563,7 +523,6 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd builder.create().show(); } - @Override public void onBackendConnected() { if ((accountJid != null) && (contactJid != null)) { Account account = xmppConnectionService diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index cd35ffb55..0f38173be 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -41,6 +41,7 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import eu.siacs.conversations.Config; +import eu.siacs.conversations.OmemoActivity; import eu.siacs.conversations.R; import eu.siacs.conversations.crypto.axolotl.AxolotlService; import eu.siacs.conversations.entities.Account; @@ -59,7 +60,7 @@ import eu.siacs.conversations.xmpp.jid.InvalidJidException; import eu.siacs.conversations.xmpp.jid.Jid; import eu.siacs.conversations.xmpp.pep.Avatar; -public class EditAccountActivity extends XmppActivity implements OnAccountUpdate, +public class EditAccountActivity extends OmemoActivity implements OnAccountUpdate, OnKeyStatusUpdated, OnCaptchaRequested, KeyChainAliasCallback, XmppConnectionService.OnShowErrorToast, XmppConnectionService.OnMamPreferencesFetched { private static final int REQUEST_DATA_SAVER = 0x37af244; @@ -635,7 +636,6 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate super.onSaveInstanceState(savedInstanceState); } - @Override protected void onBackendConnected() { boolean init = true; if (mSavedInstanceAccount != null) { @@ -884,13 +884,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate @Override public void onClick(final View v) { - - if (copyTextToClipboard(ownAxolotlFingerprint.substring(2), R.string.omemo_fingerprint)) { - Toast.makeText( - EditAccountActivity.this, - R.string.toast_message_omemo_fingerprint, - Toast.LENGTH_SHORT).show(); - } + copyOmemoFingerprint(ownAxolotlFingerprint); } }); if (Config.SHOW_REGENERATE_AXOLOTL_KEYS_BUTTON) { @@ -915,7 +909,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate continue; } boolean highlight = fingerprint.equals(messageFingerprint); - hasKeys |= addFingerprintRow(keys, mAccount, fingerprint, highlight, null); + hasKeys |= addFingerprintRow(keys, mAccount, fingerprint, highlight); } if (hasKeys && Config.supportOmemo()) { keysCard.setVisibility(View.VISIBLE); diff --git a/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java b/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java index f5a4789fd..76081a962 100644 --- a/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import eu.siacs.conversations.OmemoActivity; import eu.siacs.conversations.R; import eu.siacs.conversations.crypto.axolotl.AxolotlService; import eu.siacs.conversations.crypto.axolotl.FingerprintStatus; @@ -28,7 +29,7 @@ import eu.siacs.conversations.xmpp.OnKeyStatusUpdated; import eu.siacs.conversations.xmpp.jid.InvalidJidException; import eu.siacs.conversations.xmpp.jid.Jid; -public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdated { +public class TrustKeysActivity extends OmemoActivity implements OnKeyStatusUpdated { private List contactJids; private Account mAccount; @@ -109,16 +110,14 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate for(final String fingerprint : ownKeysToTrust.keySet()) { hasOwnKeys = true; addFingerprintRowWithListeners(ownKeys, mAccount, fingerprint, false, - FingerprintStatus.createActive(ownKeysToTrust.get(fingerprint)), false, + FingerprintStatus.createActive(ownKeysToTrust.get(fingerprint)), false, false, new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { ownKeysToTrust.put(fingerprint, isChecked); // own fingerprints have no impact on locked status. } - }, - null, - null + } ); } @@ -134,16 +133,14 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate final Map fingerprints = entry.getValue(); for (final String fingerprint : fingerprints.keySet()) { addFingerprintRowWithListeners(keysContainer, mAccount, fingerprint, false, - FingerprintStatus.createActive(fingerprints.get(fingerprint)), false, + FingerprintStatus.createActive(fingerprints.get(fingerprint)), false, false, new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { fingerprints.put(fingerprint, isChecked); lockOrUnlockAsNeeded(); } - }, - null, - null + } ); } if (fingerprints.size() == 0) { @@ -212,7 +209,6 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate return ownKeysSet.size() + foreignKeysToTrust.size() > 0; } - @Override public void onBackendConnected() { Intent intent = getIntent(); this.mAccount = extractAccount(intent); diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index 1454381a7..d961497c9 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -49,11 +49,8 @@ import android.util.Pair; import android.view.MenuItem; import android.view.View; import android.view.inputmethod.InputMethodManager; -import android.widget.CompoundButton; import android.widget.EditText; import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; import android.widget.Toast; import com.google.zxing.BarcodeFormat; @@ -69,7 +66,6 @@ import java.io.FileNotFoundException; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; import java.util.Hashtable; import java.util.List; import java.util.Map; @@ -78,20 +74,15 @@ import java.util.concurrent.atomic.AtomicInteger; import eu.siacs.conversations.Config; import eu.siacs.conversations.R; -import eu.siacs.conversations.crypto.axolotl.FingerprintStatus; -import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.entities.MucOptions; -import eu.siacs.conversations.entities.Presence; import eu.siacs.conversations.entities.Presences; -import eu.siacs.conversations.entities.ServiceDiscoveryResult; import eu.siacs.conversations.services.AvatarService; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; -import eu.siacs.conversations.ui.widget.Switch; import eu.siacs.conversations.utils.CryptoHelper; import eu.siacs.conversations.utils.ExceptionHelper; import eu.siacs.conversations.utils.UIHelper; @@ -780,132 +771,6 @@ public abstract class XmppActivity extends Activity { builder.create().show(); } - protected boolean addFingerprintRow(LinearLayout keys, final Account account, final String fingerprint, boolean highlight, View.OnClickListener onKeyClickedListener) { - final FingerprintStatus status = account.getAxolotlService().getFingerprintTrust(fingerprint); - if (status == null) { - return false; - } - return addFingerprintRowWithListeners(keys, account, fingerprint, highlight, status, true, - new CompoundButton.OnCheckedChangeListener() { - @Override - public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - account.getAxolotlService().setFingerprintTrust(fingerprint,FingerprintStatus.createActive(isChecked)); - } - }, - new View.OnClickListener() { - @Override - public void onClick(View v) { - account.getAxolotlService().setFingerprintTrust(fingerprint,FingerprintStatus.createActive(false)); - v.setEnabled(true); - } - }, - onKeyClickedListener - - ); - } - - protected boolean addFingerprintRowWithListeners(LinearLayout keys, final Account account, - final String fingerprint, - boolean highlight, - FingerprintStatus status, - boolean showTag, - CompoundButton.OnCheckedChangeListener - onCheckedChangeListener, - View.OnClickListener onClickListener, - View.OnClickListener onKeyClickedListener) { - if (status.isCompromised()) { - return false; - } - View view = getLayoutInflater().inflate(R.layout.contact_key, keys, false); - TextView key = (TextView) view.findViewById(R.id.key); - key.setOnClickListener(onKeyClickedListener); - TextView keyType = (TextView) view.findViewById(R.id.key_type); - keyType.setOnClickListener(onKeyClickedListener); - Switch trustToggle = (Switch) view.findViewById(R.id.tgl_trust); - trustToggle.setVisibility(View.VISIBLE); - final View.OnLongClickListener purge = new View.OnLongClickListener() { - @Override - public boolean onLongClick(View v) { - showPurgeKeyDialog(account, fingerprint); - return true; - } - }; - view.setOnLongClickListener(purge); - key.setOnLongClickListener(purge); - keyType.setOnLongClickListener(purge); - boolean x509 = Config.X509_VERIFICATION && status.getTrust() == FingerprintStatus.Trust.VERIFIED_X509; - final View.OnClickListener toast; - trustToggle.setChecked(status.isTrusted(), false); - if (status.isActive()) { - key.setTextColor(getPrimaryTextColor()); - keyType.setTextColor(getSecondaryTextColor()); - trustToggle.setOnCheckedChangeListener(onCheckedChangeListener); - if (status.getTrust() == FingerprintStatus.Trust.UNDECIDED) { - trustToggle.setOnClickListener(onClickListener); - trustToggle.setEnabled(false); - } else { - trustToggle.setOnClickListener(null); - trustToggle.setEnabled(true); - } - toast = new View.OnClickListener() { - @Override - public void onClick(View v) { - hideToast(); - } - }; - } else { - key.setTextColor(getTertiaryTextColor()); - keyType.setTextColor(getTertiaryTextColor()); - trustToggle.setOnClickListener(null); - trustToggle.setEnabled(false); - toast = new View.OnClickListener() { - @Override - public void onClick(View v) { - replaceToast(getString(R.string.this_device_is_no_longer_in_use), false); - } - }; - trustToggle.setOnClickListener(toast); - } - view.setOnClickListener(toast); - key.setOnClickListener(toast); - keyType.setOnClickListener(toast); - if (showTag) { - keyType.setText(getString(x509 ? R.string.omemo_fingerprint_x509 : R.string.omemo_fingerprint)); - } else { - keyType.setVisibility(View.GONE); - } - if (highlight) { - keyType.setTextColor(getResources().getColor(R.color.accent)); - keyType.setText(getString(x509 ? R.string.omemo_fingerprint_x509_selected_message : R.string.omemo_fingerprint_selected_message)); - } else { - keyType.setText(getString(x509 ? R.string.omemo_fingerprint_x509 : R.string.omemo_fingerprint)); - } - - key.setText(CryptoHelper.prettifyFingerprint(fingerprint.substring(2))); - - keys.addView(view); - return true; - } - - public void showPurgeKeyDialog(final Account account, final String fingerprint) { - Builder builder = new Builder(this); - builder.setTitle(getString(R.string.purge_key)); - builder.setIconAttribute(android.R.attr.alertDialogIcon); - builder.setMessage(getString(R.string.purge_key_desc_part1) - + "\n\n" + CryptoHelper.prettifyFingerprint(fingerprint.substring(2)) - + "\n\n" + getString(R.string.purge_key_desc_part2)); - builder.setNegativeButton(getString(R.string.cancel), null); - builder.setPositiveButton(getString(R.string.purge_key), - new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - account.getAxolotlService().purgeKey(fingerprint); - refreshUi(); - } - }); - builder.create().show(); - } - public boolean hasStoragePermission(int requestCode) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { diff --git a/src/main/res/drawable-hdpi/ic_verified_fingerprint.png b/src/main/res/drawable-hdpi/ic_verified_fingerprint.png new file mode 100644 index 0000000000000000000000000000000000000000..297dea0d0c373ef2798627f79acf5a1c09e0761a GIT binary patch literal 1336 zcmV-81;_e{P)8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11hq*-K~!jg?V3$YTvZgu|L4x*F@6-QE=&Nil!=f+qX`R>c0($z zTf?jWKR&45l%mABn-3$V;?e0vusj~s4_5uISdaRO=p08Aw&{0501?WCQl*4X;N7?c=I90AEUi0Bot=NN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received_dark.9.png index 84d56bc80ba8a3c01d9f57ada4330a256a222b0f..17d87b64d7ad1c9b8b073f7cb245e62b0b919ace 100644 GIT binary patch delta 98 zcmeBX>t>tK$H~plFJocAWi)%^^k0mghK9O^rXhx=Rz?<9re@j(hE@g!@=xRQ85kH; kOI#yLQW8s2t#b2IGSeyt>tK$H~SeBBu0WS9ImZ>Ax5~4a{^64ML0ztc;ATj7_u+jI0a{>d!QrGB7Zx kmbgZgq$HN4TIJ@aWTsUz7#SFv>0;BsH_^It@+~Gq0FQzj&Hw-a diff --git a/src/main/res/drawable-hdpi/message_bubble_received_grey.9.png b/src/main/res/drawable-hdpi/message_bubble_received_grey.9.png index b6b40f91286f9a1c88c29635dc6a730c6cb2fcac..75918728ec3067a97166443ba3eedc5b723266df 100644 GIT binary patch delta 78 zcmaFI`i^x%A160Izl`~Ut@>OWr{86iFf`OPGz~E{wKB4>GBwpUFtjo-(BpOeG`WXK P602lt>tK$H~plFJpC&C3ySB>Ax5~4Gnb-O+yS#t&A+JOf9qx46O_d{BNlkF)%Qw kmbgZgq$HN4TIJ@aWTsUz7#SFv>0;Ah*FL9j@+~Gq09kAsj{pDw delta 98 zcmeBX>t>tK$H~SeBBok)@7%48(|<8~8kp%C8iW`bSQ!~v8JlYx7+Dz@_^HfX!N9K7mjD0& diff --git a/src/main/res/drawable-hdpi/message_bubble_sent.9.png b/src/main/res/drawable-hdpi/message_bubble_sent.9.png index b7971a426338fcfcb1d9c6202672c52434478389..42eba56ab17162135a87565fa5b2c819003ba719 100644 GIT binary patch delta 78 zcmZ3_x}J4HA160Izbpfz@NSol)8{ct7#ivtnuZvfS{Yed85n3A7y`-L;{5!ReVHV& OO0M$SzIk#TlOX{8923<5 delta 78 zcmZ3_x}J4HA151^h?v^@>+=&fPM^mpVPK|fXb@s#U}a=vWo)5sU}R-rup{TC<78hZ QNvx754Fms9u46I;0G&4$$p8QV diff --git a/src/main/res/drawable-hdpi/message_bubble_sent_grey.9.png b/src/main/res/drawable-hdpi/message_bubble_sent_grey.9.png index ce6f3734529041a12ced5cfa41a9a17a6b1fcb72..99a1af9ac1e5cfae6cd0fa6910a2970612089001 100644 GIT binary patch delta 78 zcmX@idYE-WA160Izbs>!NcW|U(>F0n7#ivtnuZvfS{Yed85n9C7+M(^)F!a(o}9=e PiB*!vb`SgHNlb+Ofz{<$T%Ggrdz{twLKu-G6*U5=Y Ql2|44-J(1vPhv6z0I{GJN&o-= diff --git a/src/main/res/drawable-mdpi/ic_verified_fingerprint.png b/src/main/res/drawable-mdpi/ic_verified_fingerprint.png new file mode 100644 index 0000000000000000000000000000000000000000..250ea4cd4209c38cdc061ccc6278931d26fd09b1 GIT binary patch literal 1032 zcmV+j1o!)iP)(^b8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11BFRMK~z|U<(SQH8$}q#pLe{DQ&5B5xB`V#w65j)fD|DgDsg}! zdI449#vMpv2@o8c-g0Yu0i{h&5Cr0XlI0z)o#jFF>io0ApS@ByK{<57lb*;@sPFs}BTdUw+?{ zA%+eEd{G2lL3{|>3i7jtd~FVy3mpMUoJ*vX;8hVB0Jqe0GobovW_ac@8uXcG0?+>F zl$!LJ3n=+f@;M>j0MOG>5VvknuxwfQUlZV)v=Z?4$(%>G5G5>0(`Ai7u)8fFEu!0H5#UO_OaPF|rQ&wPI_3xCmCJoFTKXR^ zX95)nes2V`Q%CQWDV0mbwQ@!Ti2M0a^Hx(JDBN&43YQU*lTYv8^8vw29<+tq@O>O}u^GkPeQPmBm8y(vIN>ClPk>~sYHGPz8+4hRJ6 znGNyCDRa1da`U+Nws%y~gFLR4Gm^@s;&qUAVQTSQIsAdD_@1Qg2^F%B)yoI8R;IcL z+79uf52&|N`TfHLp7#tWT!vC7jN688<o+ezyk!^w1ioqX0%>@c>2>)u=x0Mfnx#lI z@>wI3hCt?f<{gTRfmrJR%(_FKZuX*WdfS^r<^n{WBHX(!IE*-2VZ59z&owi3HLRCb zzF4X3I?}r!zyQR5BY4ALol4G@21~yMF>mQ5n#?Erg?vBgHYd3fRveoeoON9h9RUJ> zzFgm9kE`z22)ry1&($JmE0K%0oVCvvvx~P|iQo2HeeapQPZ@@BL=-ascGO7LDDsN~ z=gZll+3W4Z-SQ8sOfC~%HC6`zAZEud*YCIgjP3$2=9_<+%!s%E0000OWr#mr97#ivtnuZvfS{YebnVM=F7+M(^=<&LKn*5Pb P602l8^~PhK9O^rXhx=Rz?<9rsmoPhE@g!J12$QW?*1Y kEpd$~Nl7e8waU#;$xN$cFfuSS)5WIY#Q8VrlU11v0TDABApigX delta 98 zcmcb{a*bs|A151^h?w&Hz1iJ&@> delta 78 zcmZ3-vW{g!A151^h?v^@>+=&fPM2krFfh|KGzc*=ure~TGPck*FtRc**pc(naq<~P QNvx754Fms9{>x|x0FMP1KmY&$ diff --git a/src/main/res/drawable-mdpi/message_bubble_sent_grey.9.png b/src/main/res/drawable-mdpi/message_bubble_sent_grey.9.png index 240b1237f73832f6038c48d0ff8935e22ac02205..c314d34e17f088f1410c1af448e40eb040d97370 100644 GIT binary patch delta 98 zcmdnNvV&zpA160Izbs>!NcW|U)72S04Gnb-O+yS#t&A+K3=Fjm46O_dY70;BsW4niaGCPwY0368~CIA2c delta 98 zcmdnNvV&zpA151^h?x3}3+umaoUYF3X<(*nXb@s#U}a=vWo)T!U}R-rASeCkD+2?A kYKdz^NlIc#s#R`&N@iLmgOP!unJzXB`EF63li8UJ0ic5$CIA2c diff --git a/src/main/res/drawable-xhdpi/ic_verified_fingerprint.png b/src/main/res/drawable-xhdpi/ic_verified_fingerprint.png new file mode 100644 index 0000000000000000000000000000000000000000..ba816260178629c950d70b0e821ed4c1ec3a2e82 GIT binary patch literal 1557 zcmV+w2I~2VP)ew2 z5JNY12@2Q-WoO(O!%C5$#_u2{#HEmsYNUQ9A_Qe+pvi>kFt05QU<#dLfCf9$cmFQh z!Lc&)?tAm@dmS?WT|4)ld+u-UIg@+OyANopsiq7{l6C+9KuFh-uFVj&jgS^x3??D-b%_-5ZZw{6QuB>B8JEM$8v^T{GZGN zs>m+@x*{?;5m%lv2B=nkiAr(gsmK8Z$}dsLV4jK$P+j>YDjCRA^#L-FU!qb}c`6j3 zIPyzWsy9ys0+dL8iAo{!lop_6kzb-xz&z#X*z_EGKL9{jpL5GW0ue}$E$9L8l3#Pn zyhn|#CLkX*0r{v2$VW{;K57E;(Zd0VxM#|A!vmtQKu6w!;t3P>8yXOW1z6UB{I2}X z%L8MlOh9T_K$URH|1$xpApt!IPFYbyYB)f(;FKk{q@o(Hp#bT?=^pIpCD9wzm<$KI&L4EL`=;|~Ta$EOcN7YG{!!3!hy6>alvhE`>+FK1Oxv1S% zBixeQJ_MPI{$7muBZw1z;Z{wi;Q)YVdC>z}42Q`ej`)S!QpEvBC|AZ`8K2T^A80o( z6e==M)1Un9;Vr4SPPcG;zlX2M|@V)c1jVg&C^raK`{FJRPPlu(0C? z7FJbQ8-d3p&gJ^uBSHIVJ)^i(E%w}rIo0~42wKAQj}r{AkbCTw)X6Y?L!C)y_FSE@ zfbYWeO+xfAoZXq#K9{Og=tKL|s`M!URksSuM#NNlb$U2#_t1bceVL*Xd;y3GYs0t* zdf?GaUnbCzai!`i`?!1DJZ1TY8Yy*OYN@*}mT$|SBzdV`J5h^}Tz+*vRAR1F{e{Cm zcq`H?KfyA}M+ByA%l%*wp|A)!|(FewsuY|D9nboZ!sC8m}lD?R7- z=B_D)gA_^Z3O9&*j_18Mx_eaXv`|Np*5=0s#wH1VKr(hn1n-h^D7$xJB1*ePF7<9W zy5Vt;rPqb>mtHOOE&H#LE+Z znJ{kl-u!Xc-M2elpu%=Y#A69aB|opbzV55j`%h~L literal 0 HcmV?d00001 diff --git a/src/main/res/drawable-xhdpi/message_bubble_received.9.png b/src/main/res/drawable-xhdpi/message_bubble_received.9.png index b950cb914a68d586e062008f61fc07e7cb38eddc..89f49dd95004c07cb7c9948555f2ba8e0e851911 100644 GIT binary patch delta 78 zcmZ3;zL0%FA160Izl_=SP4aU#PM^ReVQ8ppXc}T@YGq_$Won{rU}$Av&{5^*Hrbw8 Q6077-^>4o>7cd(F0A)TFL;wH) delta 78 zcmZ3;zL0%FA151^h?oM~7OT*W(OWr#CT47#ivtnuZvfS{YebnVM=F7+M(^=<&LKnrz4{ PiB&Q_;IH50BxXYZ9VrwM delta 78 zcmbQtKAC+&A151^h?rvGX0F2vnuZvfS{YebnObNY7+M(^_}@}7VqjoU kEpd$~Nl7e8waU#;$xN$cFfuSS)5WI2u6<75vnuZvfS{YebnObTa7+M(^yj-i_#=yX! lTH+c}l9E`GYL%Oxl9^V?U}Ruuri)F(j1SYTCYLcA0sunZ8-M@+ delta 98 zcmZ3^zMOqRA151^h?r{Gy>quVPM^l)X<(*nXb@s#U}a=vWo)i(U}R-r;HNTk1p@<6x4Gnb-O+yS#t&A+K3=Fgl41wfraejUV1_sp< j*NBpo#FA92-29Zxv`Pje14A=iY#LU1ZQndugV_)O=Rp~t delta 98 zcmcb~c9U&FA151^h?v^@>+=&fPWNE)G%(XOGzc*=ure~TGPck*FtRc**pc(nk%56h lwZt`|BqgyV)hahXB{Qv(!N|bSOc$GmlZJtRCu=Yp0szD$9FqV5 diff --git a/src/main/res/drawable-xhdpi/message_bubble_sent_grey.9.png b/src/main/res/drawable-xhdpi/message_bubble_sent_grey.9.png index af6c7608895b1771ecd92bb7fe9fd40d395e96a3..c32c51018b5d55344a73441646e63de1eeb43f7e 100644 GIT binary patch delta 98 zcmX@bc8YC6A160Izbs>!NcW|U(=C}i4Gnb-O+yS#t&A+K3=Fjm46O_dY70;BsW4niavLv%105TLAbN~PV delta 98 zcmX@bc8YC6A151^h?x3}3+umaoNmeFX<(*nXb@s#U}a=vWo)T!U}R-rASeCkD+2?A kYKdz^NlIc#s#R`&N@iLmgOP!unJzXB`EF63lO>rA0kzH>bN~PV diff --git a/src/main/res/drawable-xxhdpi/ic_verified_fingerprint.png b/src/main/res/drawable-xxhdpi/ic_verified_fingerprint.png new file mode 100644 index 0000000000000000000000000000000000000000..e86e8efcc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6y+AVZxju4;3D4(| zu{~qA;_No|gH;CF2c{cT@#jgOP8|jcC!L167s4)C(;<Rbbn6NGZekwgG_+2g~i1qQT(8GwIu$V%R5f(SXW9O1mlAp}a6ki&9Cf>}dB=N(+hW8H7Z~glhUZgJ{Bt4duAmsh+;}0H5S{9IkJFJ}M z6U|=}A5V&)KIyRl0D(pL@+-H~HTs%A45<CEunVXfnZq9m2V0vb;=KIG8(p@5CCbV!Vn za@y^5^Re`&L8^rT0A7dFJk|V!`23!TY>1)@f;05w&HQKb??nB2BrNF{w#1H8JJ!_| z)nicVy8zc4DN4*!$@w{N?yV>m%tV1T!UA@`wtK^^g_&;w(gt9oRuN(fK6~z)o;`Q* z;DpwxYDr<8uzpgzcGEuwkaGBwdQFtjo-=&15@V_;xV kEpd$~Nl7e8waU#;$xN$cFfuSS)5WIYr~0>FlUZ2}0bocQ%>V!Z delta 98 zcmdnSwT){+A151^h?oM~7OT*W(^XkK4a{^64ML0ztc;ATjE%GnjI0a{WMsDSGcYiy kmbgZgq$HN4TIJ@aWTsUz7#SFv>0;B6>&UlxGApYg0MIEITL1t6 diff --git a/src/main/res/drawable-xxhdpi/message_bubble_received_dark.9.png b/src/main/res/drawable-xxhdpi/message_bubble_received_dark.9.png index 2cf9f699b71900f6c91532d57011011724c92314..8ad8fdd4b28431cb196035783f9bd8d04dad223f 100644 GIT binary patch delta 98 zcmZ3A160Izl^0jFB9*^=@KlShK9O^rXhx=Rz?<9rsmoPhE@g!J12$QW?*1Y lEpd$~Nl7e8waU#;$xN$cFfuSS)5WIY#Q8VrlYg)n0s!db8-4%) delta 98 zcmZ3A151^h?w&Hz1iOWr?aql8XD>vnuZvfS{YebnVM=F7+M(^=<&LKVqjoU kEpd$~Nl7e8waU#;$xN$cFfuSS)5WGCKH#t4hK0Q4&wTL1t6 delta 98 zcmbQrHI-{ZA151^h?vrgUD1^rr?aql8kp%C8iW`bSQ!~v8JlPu7+Dz@)SqcKWnf@X kEpd$~Nl7e8waU#;$xN$cFfuSS)5WHNZ=!YQhK08T|40{{R3 diff --git a/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png index 1013023991819c09b08317b96176e1687b7f7b4b..07b9a050fa74d6a1ff1b8fe0695b9786d548add8 100644 GIT binary patch delta 98 zcmbQkHHT|LA160Izl_yAmf-Chr*pG-8XD>vnuZvfS{YebnObNY7+M(^_}@}7VqjoU kEpd$~Nl7e8waU#;$xN$cFfuSS)5WI2u6<75quVPSvnuZvfS{Yed85n3A7y`-L;{5y!3=FCz jt`Q|Ei6yC4x%nxXX_X8{28L$3*fgy2+P-;mDT^Th+#?y= delta 98 zcmZ3+xr}o{A151^h?v^@>+=&fPM^x`X<(*nXb@s#U}a=vWo)5sU}R-rup{TCBLf42 lYKdz^NlIc#s#R`&N@iLmgOP!unJzXBCk+GtPA+9J1OT}P9M1p% diff --git a/src/main/res/drawable-xxhdpi/message_bubble_sent_grey.9.png b/src/main/res/drawable-xxhdpi/message_bubble_sent_grey.9.png index 2c4864079c728128c9a1d633391aa6718de84bf0..47057f23c2782dc51c7fa881329f32a9e7c88023 100644 GIT binary patch delta 98 zcmbQrIhAulA160Izbw;x*;^SKr?)VB8XD>vnuZvfS{Yed85n6B7+M(^_;kprF)%Qw kmbgZgq$HN4TIJ@aWTsUz7#SFv>0;Ahdv)2Y$tf&`05q){)Bpeg delta 98 zcmbQrIhAulA151^h?x3}3+umaoZiChX<(*nXb@s#U}a=vWo)T!U}R-rASeCkD+2?A kYKdz^NlIc#s#R`&N@iLmgOP!unJzXB`EF63lT%m>0jP!>r~m)} diff --git a/src/main/res/drawable-xxxhdpi/ic_verified_fingerprint.png b/src/main/res/drawable-xxxhdpi/ic_verified_fingerprint.png new file mode 100644 index 0000000000000000000000000000000000000000..5c78ac2727c241ee21772ce0f0071866248b2245 GIT binary patch literal 2794 zcmZuzc|6nqAOCEoHsp$Or#UA_M)F0=F~^*9fW(?(+@QR39U6R-r(w}HUaS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gSxhiQSJN#d7_ZSo-6dnfw+ph0-)FfllS)$S+t$I}w^7q9I7b2kni8;$dtHBhhbAib zzYcq&6gR(GwDbgBs@ES3%)i)Kg0@P<%}R`(A5Fy!l$P(Dju|yfn)c^-Xpp4Rmwt}*VSdQa5XzIE;GR@8Jh`#;wooBc!b6FwNwvT19;XQ1axiCPWruK3DcA;kErY>CVBk-8+5nwRtOsb8=9y`lE=7OAh!2meJwPCy|*YVAS7);#J&DW9rQ z;kx?X5JA4!Q$-Zu_+-76`c=v`YDnM7o?H3aAsbxasU`|teWEQtdi9n=L?Ft;)Aeap zSXoXA7-T9)&N)b(e;b)B0xbKp!inT#o=Iw2CE5X~miQGxqB-3Ka~_pS_CeuRJlj_^3~7CVKXIU({!kc_}GJJef_=kQ93MzaJI zh#C2^;x2kUD{Y$|4&&4F^RQhzwWb|rJbgi}SrQ7g$jv-OLdo&){Tp2GTVTD8T*+C~ z!K2jWYZLZj;Us!x&t6X6QTD*5^q7shu^*lSH5X z_*)+QZgpYjn-0MO5ZqR z6m$CXG2L>{jOVq(@n!c%3%U(ll&~d@pL}jRe3VMP!(IbM6~$?6SIV{US?~SH{kFZ& zaNQvD6-a&XK&6%}Sh&TaP99AdffG|8*^}TeWiEKGgBE{Jnwy{-ebYMUx$oO@_^1Jx zD0gG=1F?`Iy#hB`zrNN#!`Rc}CeOHa!}RY)2A4+aFWwxtXxPAP-2|aVR{hi)v^k%j h4tD*o+sR=#9n)r~f_>QEXL!97z*st>ADah|{|jt<3L^jj literal 0 HcmV?d00001 diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png index 1620e8bcc8b3fc2738609e9974e9e367aecfe3cd..9601d5a4ae8539f9494c9d35b21776f79aaa12e8 100644 GIT binary patch delta 78 zcmdnQyNP!~A160Izl_=SP4aU#PG86>VQ8ppXc}T@YGq_$Won{rU}$Av&{5^*HaUPz Q6077-^>4o>H?kQ50D5Z{t^fc4 delta 78 zcmdnQyNP!~A151^h?rvGX0F2(^b diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_received_dark.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_received_dark.9.png index a62faee5ed7687d95aa56c384a5e8bea2d31a0ee..bd93e9682d2a546cc69a0d8010acbea771c7b747 100644 GIT binary patch delta 98 zcmdnRyNh>1A160Izl^0jFB9*^=_^@14Gnb-O+yS#t&A+JOwF|o46O_dc1{Yp&A`B* lTH+c}l9E`GYL%Oxl9^V?U}Ruuri)F(iSuvLCwH1A151^h?w&Hz1ibDHq)$ delta 98 zcmZqUZR4HL$H~SeBBu0WS9ImZ>7}fm24=d31|dcURz^lv#wOYZMpgy}^=Fz*85kH; kOI#yLQW8s2t#b2IGSey6NUWhK9O^rXhx=Rz?<9rWV=;hE@g!{6NUW24=d31|dcURz^lv#%9_EMpgy}FM=n@FfcHv kmbgZgq$HN4TIJ@aWTsUz7#SFv>0;9`lTT~GvnuZvfS{YebnObTa7+M(^yj-i_#=yX! lTH+c}l9E`GYL%Oxl9^V?U}Ruuri)F(j1SYTCReZ-0su;T8=3$B delta 98 zcmZ3quVPM^W*X<(*nXb@s#U}a=vWo)i(U}R-r;HNTk1p@(^b diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png index f82c72a2a6df2d16bdc70dfafcd00e52cce74960..95d26a29de39a6b92c1ce6330bb9d97f72c393fe 100644 GIT binary patch delta 98 zcmcc3eVcniA160Izbs>!NcW|U(@(K@8XD>vnuZvfS{Yed85n9C7+M(^)F!a(W?*1Y kEpd$~Nl7e8waU#;$xN$cFfuSS)5WHN$950<+=&fPCv!sX<(*nXb@s#U}a=vWo)5sU}R-rup{TCBLf42 lYKdz^NlIc#s#R`&N@iLmgOP!unJzXBCk+GtPF}@o2mtgj9jO2S diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_sent_grey.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_sent_grey.9.png index ff6e8349b1916defa37dc9dfb185251f765c8a07..abdfb98b6670f48c566488d83886a8a707263d85 100644 GIT binary patch delta 98 zcmdnPy@z{3A160Izbw;x*;^SKr>|!5G&IyTGz~E{wKB4_GBDCMFtjo-@ad3KV_;xV kEpd$~Nl7e8waU#;$xN$cFfuSS)5WI2_Uf`(le<|B0bsEkb^rhX delta 98 zcmdnPy@z{3A151^h?oXP{-*Se(^s>28kp%C8iW`bSQ!~vnHXpr7+Dz@G`g*`XJBAZ kEpd$~Nl7e8waU#;$xN$cFfuSS)5WIYgS1%l + android:layout_height="match_parent" + android:longClickable="true"> + android:paddingTop="8dp"> + android:longClickable="true"/> + android:textColor="?attr/color_text_secondary" + android:textSize="?attr/TextSizeInfo" + android:longClickable="true"/> + android:textSize="?attr/TextSizeInfo" + android:visibility="gone" + android:longClickable="true"/> + + - + - - + + \ No newline at end of file diff --git a/src/main/res/menu/omemo_key_context.xml b/src/main/res/menu/omemo_key_context.xml new file mode 100644 index 000000000..2e2fc5dac --- /dev/null +++ b/src/main/res/menu/omemo_key_context.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/src/main/res/values/ids.xml b/src/main/res/values/ids.xml new file mode 100644 index 000000000..7daad46d2 --- /dev/null +++ b/src/main/res/values/ids.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index d52d7b889..f4d4262d1 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -699,4 +699,7 @@ Data saver enabled Your operating system is restricting Conversations from accessing the Internet when in background. To receive notifications of new messages you should allow Conversations unrestricted access when Data saver is on.\nConversations will still make an effort to save data when possible. Your device does not support disabling Data saver for Conversations. + Unable to create temporary file + This device has been verified + Copy fingerprint