implementing the Manage People menu button at the conversation screen

This commit is contained in:
tibbi 2020-04-08 17:46:42 +02:00
parent f01bbb893e
commit 630c87c6d9
3 changed files with 42 additions and 4 deletions

View file

@ -472,6 +472,15 @@ fun Context.getThreadId(address: String): Long {
}
}
@SuppressLint("NewApi")
fun Context.getThreadId(addresses: Set<String>): Long {
return if (isMarshmallowPlus()) {
Telephony.Threads.getOrCreateThreadId(this, addresses)
} else {
0
}
}
fun Context.isNumberBlocked(number: String): Boolean {
val blockedNumbers = getBlockedNumbers()
val numberToCompare = number.trimToComparableNumber()