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.
This commit is contained in:
Greyson Parrelli 2018-05-21 10:44:30 -04:00
parent ca260a92e3
commit c0b75c2ef5

View File

@ -426,11 +426,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
setMedia(data.getData(), MediaType.AUDIO); setMedia(data.getData(), MediaType.AUDIO);
break; break;
case PICK_CONTACT: case PICK_CONTACT:
if (isSecureText && !isSmsForced()) { // TODO(greyson): Re-enable shared contact sending after receiving has been enabled for a few releases
openContactShareEditor(data.getData()); addAttachmentContactInfo(data.getData());
} else { // if (isSecureText && !isSmsForced()) {
addAttachmentContactInfo(data.getData()); // openContactShareEditor(data.getData());
} // } else {
// addAttachmentContactInfo(data.getData());
// }
break; break;
case GET_CONTACT_DETAILS: case GET_CONTACT_DETAILS:
sendSharedContact(data.getParcelableArrayListExtra(ContactShareEditActivity.KEY_CONTACTS)); 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) { private void setMedia(@Nullable Uri uri, @NonNull MediaType mediaType, int width, int height) {
if (uri == null) return; if (uri == null) return;
if (MediaType.VCARD.equals(mediaType) && isSecureText) { // TODO(greyson): Re-enable shared contact sending after receiving has been enabled for a few releases
openContactShareEditor(uri); attachmentManager.setMedia(glideRequests, uri, mediaType, getCurrentMediaConstraints(), width, height);
} else { // if (MediaType.VCARD.equals(mediaType) && isSecureText) {
attachmentManager.setMedia(glideRequests, uri, mediaType, getCurrentMediaConstraints(), width, height); // openContactShareEditor(uri);
} // } else {
// attachmentManager.setMedia(glideRequests, uri, mediaType, getCurrentMediaConstraints(), width, height);
// }
} }
private void openContactShareEditor(Uri contactUri) { private void openContactShareEditor(Uri contactUri) {