adding a helper function for checking if the app is set as the default dialer

This commit is contained in:
tibbi
2018-11-30 16:35:21 +01:00
parent b6e00fba44
commit 7331217e8a
3 changed files with 8 additions and 4 deletions

View File

@@ -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