mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-15 07:28:30 +00:00
Remove call length checks from CallQuality trigger.
This commit is contained in:
@@ -111,14 +111,6 @@ object CallQuality {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
val callLength = callSummary.endTime.milliseconds - callSummary.startTime.milliseconds
|
|
||||||
val isLongerThanTenMinutes = callLength > 10.minutes
|
|
||||||
val isLessThanOneMinute = callLength < 1.minutes
|
|
||||||
|
|
||||||
if (isLongerThanTenMinutes || isLessThanOneMinute) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
val chance = LocaleRemoteConfig.getCallQualitySurveyPartsPerMillion()
|
val chance = LocaleRemoteConfig.getCallQualitySurveyPartsPerMillion()
|
||||||
val roll = (0 until 1_000_000).random()
|
val roll = (0 until 1_000_000).random()
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
|||||||
import kotlinx.parcelize.IgnoredOnParcel
|
import kotlinx.parcelize.IgnoredOnParcel
|
||||||
import kotlinx.parcelize.Parcelize
|
import kotlinx.parcelize.Parcelize
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import okio.ByteString
|
|
||||||
import okio.ByteString.Companion.toByteString
|
import okio.ByteString.Companion.toByteString
|
||||||
import org.json.JSONArray
|
import org.json.JSONArray
|
||||||
import org.json.JSONException
|
import org.json.JSONException
|
||||||
@@ -3426,7 +3425,7 @@ class AttachmentTable(
|
|||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun debugGetAttachmentDataForMediaIds(mediaIds: Collection<MediaId>): List<ArchiveAttachmentMatch> {
|
fun debugGetAttachmentDataForMediaIds(mediaIds: Collection<MediaId>): List<ArchiveAttachmentMatch> {
|
||||||
if (mediaIds.isEmpty()) return emptyList()
|
if (mediaIds.isEmpty()) return emptyList()
|
||||||
val mediaIdByteStrings = mediaIds.map { it.value.toByteString() }.toSet()
|
val mediaIdByteStrings = mediaIds.map { it.value.toByteString() }.toSet()
|
||||||
@@ -4102,7 +4101,7 @@ class AttachmentTable(
|
|||||||
val messageRecord: MessageRecord?
|
val messageRecord: MessageRecord?
|
||||||
) {
|
) {
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "attachmentId=${attachment.attachmentId}, messageId=${attachment.mmsId}, isThumbnail=${isThumbnail}, contentType=${attachment.contentType}, quote=${attachment.quote}, wallpaper=${isWallpaper}, transferState=${attachment.transferState}, archiveTransferState=${attachment.archiveTransferState}, hasData=${attachment.hasData}, dateSent=${messageRecord?.dateSent}, messageType=${messageRecord?.type}, messageFrom=${messageRecord?.fromRecipient?.id}, messageTo=${messageRecord?.toRecipient?.id}, expiresIn=${messageRecord?.expiresIn}, expireStarted=${messageRecord?.expireStarted}"
|
return "attachmentId=${attachment.attachmentId}, messageId=${attachment.mmsId}, isThumbnail=$isThumbnail, contentType=${attachment.contentType}, quote=${attachment.quote}, wallpaper=$isWallpaper, transferState=${attachment.transferState}, archiveTransferState=${attachment.archiveTransferState}, hasData=${attachment.hasData}, dateSent=${messageRecord?.dateSent}, messageType=${messageRecord?.type}, messageFrom=${messageRecord?.fromRecipient?.id}, messageTo=${messageRecord?.toRecipient?.id}, expiresIn=${messageRecord?.expiresIn}, expireStarted=${messageRecord?.expireStarted}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user