Remove dead code to set the call state

"IN_CONVERSATION" was set when the activity was created and "state" in
the intent extras had the value "resume". However, there is no "state"
extra set by default in Android intents, it should be explicitly set,
but as it is not set anywhere in Talk Android code that would make it
dead code and safe to remove.

Moreover, the connection to the call should be initialized again in any
case rather than resumed when "onCreate" is called, as it is likely that
any previous connection would have been ended if the previous activity
instance was destroyed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2024-10-21 20:32:30 +02:00 committed by Marcel Hibbe
parent ea00481031
commit fdb8692b59
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -393,11 +393,9 @@ class CallActivity : CallBaseActivity() {
baseUrl = conversationUser!!.baseUrl
}
powerManagerUtils = PowerManagerUtils()
if ("resume".equals(extras.getString("state", ""), ignoreCase = true)) {
setCallState(CallStatus.IN_CONVERSATION)
} else {
setCallState(CallStatus.CONNECTING)
}
setCallState(CallStatus.CONNECTING)
raiseHandViewModel = ViewModelProvider(this, viewModelFactory).get(RaiseHandViewModel::class.java)
raiseHandViewModel!!.setData(roomToken!!, isBreakoutRoom)
raiseHandViewModel!!.viewState.observe(this) { viewState: RaiseHandViewModel.ViewState? ->