mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Go to waiting room when clicking on call icon in calls history if conference call log + enabled video by default in waiting room when possible
This commit is contained in:
parent
f23510da3a
commit
8870564066
3 changed files with 23 additions and 7 deletions
|
|
@ -342,7 +342,7 @@ class ConferenceModel {
|
|||
}
|
||||
if (meDeviceData != null) {
|
||||
val index = sortedList.indexOf(meDeviceData)
|
||||
val expectedIndex = sortedList.size - 1
|
||||
val expectedIndex = sortedList.size - 1 // TODO FIXME : use different order for active speaker layout & grid layout
|
||||
if (index != expectedIndex) {
|
||||
Log.i(
|
||||
"$TAG Me device data is at index $index, moving it to index $expectedIndex"
|
||||
|
|
|
|||
|
|
@ -170,9 +170,19 @@ class HistoryListFragment : AbstractTopBarFragment() {
|
|||
|
||||
adapter.callLogCallBackClickedEvent.observe(viewLifecycleOwner) {
|
||||
it.consume { model ->
|
||||
coreContext.postOnCoreThread {
|
||||
Log.i("$TAG Starting call to [${model.address.asStringUriOnly()}]")
|
||||
coreContext.startCall(model.address)
|
||||
coreContext.postOnCoreThread { core ->
|
||||
val conferenceInfo = core.findConferenceInformationFromUri(model.address)
|
||||
if (conferenceInfo != null) {
|
||||
Log.i(
|
||||
"$TAG Going to waiting room for conference [${conferenceInfo.subject}]"
|
||||
)
|
||||
sharedViewModel.goToMeetingWaitingRoomEvent.postValue(
|
||||
Event(model.address.asStringUriOnly())
|
||||
)
|
||||
} else {
|
||||
Log.i("$TAG Starting call to [${model.address.asStringUriOnly()}]")
|
||||
coreContext.startCall(model.address)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,11 @@
|
|||
*/
|
||||
package org.linphone.ui.main.meetings.viewmodel
|
||||
|
||||
import android.Manifest
|
||||
import android.content.pm.PackageManager
|
||||
import androidx.annotation.UiThread
|
||||
import androidx.annotation.WorkerThread
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
|
|
@ -215,9 +218,12 @@ class MeetingWaitingRoomViewModel @UiThread constructor() : ViewModel() {
|
|||
private fun configureWaitingRoom() {
|
||||
val core = coreContext.core
|
||||
|
||||
isVideoEnabled.postValue(
|
||||
core.isVideoEnabled && core.videoActivationPolicy.automaticallyInitiate
|
||||
)
|
||||
val cameraPermissionGranted = ActivityCompat.checkSelfPermission(
|
||||
coreContext.context,
|
||||
Manifest.permission.CAMERA
|
||||
) == PackageManager.PERMISSION_GRANTED
|
||||
isVideoEnabled.postValue(core.isVideoEnabled && cameraPermissionGranted)
|
||||
|
||||
isSwitchCameraAvailable.postValue(coreContext.showSwitchCameraButton())
|
||||
|
||||
isMicrophoneMuted.postValue(!core.isMicEnabled)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue