Fixed incoming call ringtone not being stopped when pressing volume keys if TelecomManager is enabled
This commit is contained in:
parent
dc442520ba
commit
051a6fb393
2 changed files with 6 additions and 1 deletions
|
@ -102,6 +102,11 @@ class NativeCallWrapper(var callId: String) : Connection() {
|
|||
getCall()?.terminate() ?: selfDestroy()
|
||||
}
|
||||
|
||||
override fun onSilence() {
|
||||
Log.i("[Connection] Call with id: $callId asked to be silenced")
|
||||
coreContext.core.stopRinging()
|
||||
}
|
||||
|
||||
private fun getCall(): Call? {
|
||||
return coreContext.core.getCallByCallid(callId)
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ class TelecomHelper private constructor(context: Context) {
|
|||
if (call.dir == Call.Dir.Outgoing) {
|
||||
extras.putString(
|
||||
EXTRA_CALL_BACK_NUMBER,
|
||||
call.callLog.fromAddress.asStringUriOnly()
|
||||
call.remoteAddress.asStringUriOnly()
|
||||
)
|
||||
} else {
|
||||
extras.putParcelable(EXTRA_INCOMING_CALL_ADDRESS, Uri.parse(address.asStringUriOnly()))
|
||||
|
|
Loading…
Reference in a new issue