refactor: use answerCall instead of manual intent building again

pull/864/head
jubb 4 years ago
parent 9c21cfa7b8
commit f1783b3f80

@ -99,6 +99,7 @@ class WebRtcCallActivity: PassphraseRequiredActionBarActivity() {
} }
if (intent.action == ACTION_PRE_OFFER) { if (intent.action == ACTION_PRE_OFFER) {
wantsToAnswer = true wantsToAnswer = true
answerCall() // this will do nothing, except update notification state
} }
if (intent.action == ACTION_FULL_SCREEN_INTENT) { if (intent.action == ACTION_FULL_SCREEN_INTENT) {
supportActionBar?.setDisplayHomeAsUpEnabled(false) supportActionBar?.setDisplayHomeAsUpEnabled(false)
@ -119,8 +120,7 @@ class WebRtcCallActivity: PassphraseRequiredActionBarActivity() {
wantsToAnswer = true wantsToAnswer = true
updateControls() updateControls()
} }
val answerIntent = WebRtcCallService.acceptCallIntent(this) answerCall()
ContextCompat.startForegroundService(this,answerIntent)
} }
declineCallButton.setOnClickListener { declineCallButton.setOnClickListener {

Loading…
Cancel
Save