mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 14:05:40 +03:00
Merge pull request #2710 from nextcloud/bugfix/noid/avoidNpeWhenAnswerCall
avoid crash when answering call
This commit is contained in:
commit
c17657ab8d
1 changed files with 21 additions and 17 deletions
|
@ -153,25 +153,29 @@ class CallNotificationActivity : CallBaseActivity() {
|
|||
}
|
||||
|
||||
private fun proceedToCall() {
|
||||
originalBundle!!.putString(KEY_ROOM_TOKEN, currentConversation!!.token)
|
||||
originalBundle!!.putString(KEY_CONVERSATION_NAME, currentConversation!!.displayName)
|
||||
if (currentConversation != null) {
|
||||
originalBundle!!.putString(KEY_ROOM_TOKEN, currentConversation!!.token)
|
||||
originalBundle!!.putString(KEY_CONVERSATION_NAME, currentConversation!!.displayName)
|
||||
|
||||
val participantPermission = ParticipantPermissions(
|
||||
userBeingCalled!!,
|
||||
currentConversation!!
|
||||
)
|
||||
originalBundle!!.putBoolean(
|
||||
BundleKeys.KEY_PARTICIPANT_PERMISSION_CAN_PUBLISH_AUDIO,
|
||||
participantPermission.canPublishAudio()
|
||||
)
|
||||
originalBundle!!.putBoolean(
|
||||
BundleKeys.KEY_PARTICIPANT_PERMISSION_CAN_PUBLISH_VIDEO,
|
||||
participantPermission.canPublishVideo()
|
||||
)
|
||||
val participantPermission = ParticipantPermissions(
|
||||
userBeingCalled!!,
|
||||
currentConversation!!
|
||||
)
|
||||
originalBundle!!.putBoolean(
|
||||
BundleKeys.KEY_PARTICIPANT_PERMISSION_CAN_PUBLISH_AUDIO,
|
||||
participantPermission.canPublishAudio()
|
||||
)
|
||||
originalBundle!!.putBoolean(
|
||||
BundleKeys.KEY_PARTICIPANT_PERMISSION_CAN_PUBLISH_VIDEO,
|
||||
participantPermission.canPublishVideo()
|
||||
)
|
||||
|
||||
val intent = Intent(this, CallActivity::class.java)
|
||||
intent.putExtras(originalBundle!!)
|
||||
startActivity(intent)
|
||||
val intent = Intent(this, CallActivity::class.java)
|
||||
intent.putExtras(originalBundle!!)
|
||||
startActivity(intent)
|
||||
} else {
|
||||
Log.w(TAG, "conversation was still null when clicked to answer call. User has to click another time.")
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
|
|
Loading…
Reference in a new issue