From c0b75c2ef55b4acd9f2d632ce3a6c1450cd83a6b Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Mon, 21 May 2018 10:44:30 -0400 Subject: [PATCH] Disable shared contact sending. Sending shared contacts isn't backwards-compatible, so we want to have a few releases where receiving is enabled, but not sending. That way, when we enable sending, most users should be able to properly receive the shared contact messages. --- .../securesms/ConversationActivity.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 531b625441..db63899703 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -426,11 +426,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity setMedia(data.getData(), MediaType.AUDIO); break; case PICK_CONTACT: - if (isSecureText && !isSmsForced()) { - openContactShareEditor(data.getData()); - } else { - addAttachmentContactInfo(data.getData()); - } + // TODO(greyson): Re-enable shared contact sending after receiving has been enabled for a few releases + addAttachmentContactInfo(data.getData()); +// if (isSecureText && !isSmsForced()) { +// openContactShareEditor(data.getData()); +// } else { +// addAttachmentContactInfo(data.getData()); +// } break; case GET_CONTACT_DETAILS: sendSharedContact(data.getParcelableArrayListExtra(ContactShareEditActivity.KEY_CONTACTS)); @@ -1392,11 +1394,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity private void setMedia(@Nullable Uri uri, @NonNull MediaType mediaType, int width, int height) { if (uri == null) return; - if (MediaType.VCARD.equals(mediaType) && isSecureText) { - openContactShareEditor(uri); - } else { - attachmentManager.setMedia(glideRequests, uri, mediaType, getCurrentMediaConstraints(), width, height); - } + // TODO(greyson): Re-enable shared contact sending after receiving has been enabled for a few releases + attachmentManager.setMedia(glideRequests, uri, mediaType, getCurrentMediaConstraints(), width, height); +// if (MediaType.VCARD.equals(mediaType) && isSecureText) { +// openContactShareEditor(uri); +// } else { +// attachmentManager.setMedia(glideRequests, uri, mediaType, getCurrentMediaConstraints(), width, height); +// } } private void openContactShareEditor(Uri contactUri) {