decode the incoming call number before displaying

This commit is contained in:
tibbi 2018-11-27 14:43:17 +01:00
parent 012442a057
commit 9e015c3888

View file

@ -14,12 +14,11 @@ import com.simplemobiletools.contacts.pro.objects.CallManager
@TargetApi(Build.VERSION_CODES.M)
class MyIncomingCallService : InCallService() {
override fun onCallAdded(call: Call) {
super.onCallAdded(call)
call.registerCallback(callCallback)
val handle = call.details.handle.toString()
val handle = Uri.decode(call.details.handle.toString())
val callerNumber = if (handle.contains("tel:")) {
handle.substringAfter("tel:")
} else {