mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
adding a helper function for checking if the app is set as the default dialer
This commit is contained in:
@@ -338,3 +338,6 @@ fun Context.deleteBlockedNumber(number: String) {
|
||||
val uri = contentResolver.insert(BlockedNumbers.CONTENT_URI, values)
|
||||
contentResolver.delete(uri, null, null)
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
fun Context.isDefaultDialer() = telecomManager.defaultDialerPackage != packageName
|
||||
|
||||
Reference in New Issue
Block a user