mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
create video call mimetype for raw contacts links
This commit is contained in:
committed by
Nicholas Tinsley
parent
c4e4eaf110
commit
757c0fd2ea
@@ -17,8 +17,10 @@ class ContactLinkConfiguration(
|
||||
val appName: String,
|
||||
val messagePrompt: (String) -> String,
|
||||
val callPrompt: (String) -> String,
|
||||
val videoCallPrompt: (String) -> String,
|
||||
val e164Formatter: (String) -> String,
|
||||
val messageMimetype: String,
|
||||
val callMimetype: String,
|
||||
val videoCallMimetype: String,
|
||||
val syncTag: String
|
||||
)
|
||||
|
||||
@@ -526,6 +526,16 @@ object SystemContactsRepository {
|
||||
.withYieldAllowed(true)
|
||||
.build(),
|
||||
|
||||
// Data entry for making a video call
|
||||
ContentProviderOperation.newInsert(dataUri)
|
||||
.withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, operationIndex)
|
||||
.withValue(ContactsContract.Data.MIMETYPE, linkConfig.videoCallMimetype)
|
||||
.withValue(ContactsContract.Data.DATA1, systemContactInfo.displayPhone)
|
||||
.withValue(ContactsContract.Data.DATA2, linkConfig.appName)
|
||||
.withValue(ContactsContract.Data.DATA3, linkConfig.videoCallPrompt(systemContactInfo.displayPhone))
|
||||
.withYieldAllowed(true)
|
||||
.build(),
|
||||
|
||||
// Ensures that this RawContact entry is shown next to another RawContact entry we found for this contact
|
||||
ContentProviderOperation.newUpdate(ContactsContract.AggregationExceptions.CONTENT_URI)
|
||||
.withValue(ContactsContract.AggregationExceptions.RAW_CONTACT_ID1, systemContactInfo.siblingRawContactId)
|
||||
|
||||
Reference in New Issue
Block a user