From f1783b3f8009265480265cefdfb97d36418c320e Mon Sep 17 00:00:00 2001 From: jubb Date: Wed, 8 Dec 2021 17:44:23 +1100 Subject: [PATCH] refactor: use answerCall instead of manual intent building again --- .../org/thoughtcrime/securesms/calls/WebRtcCallActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/calls/WebRtcCallActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/calls/WebRtcCallActivity.kt index 4e72aaad81..479977ef56 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/calls/WebRtcCallActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/calls/WebRtcCallActivity.kt @@ -99,6 +99,7 @@ class WebRtcCallActivity: PassphraseRequiredActionBarActivity() { } if (intent.action == ACTION_PRE_OFFER) { wantsToAnswer = true + answerCall() // this will do nothing, except update notification state } if (intent.action == ACTION_FULL_SCREEN_INTENT) { supportActionBar?.setDisplayHomeAsUpEnabled(false) @@ -119,8 +120,7 @@ class WebRtcCallActivity: PassphraseRequiredActionBarActivity() { wantsToAnswer = true updateControls() } - val answerIntent = WebRtcCallService.acceptCallIntent(this) - ContextCompat.startForegroundService(this,answerIntent) + answerCall() } declineCallButton.setOnClickListener {