diff --git a/app/build.gradle b/app/build.gradle index 5f2ed69da..395b758b0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -213,7 +213,7 @@ dependencies { implementation 'androidx.recyclerview:recyclerview:1.3.0-rc01' // https://github.com/material-components/material-components-android/blob/master/LICENSE Apache v2.0 - implementation 'com.google.android.material:material:1.6.1' + implementation 'com.google.android.material:material:1.7.0' // https://github.com/google/flexbox-layout/blob/main/LICENSE Apache v2.0 implementation 'com.google.android.flexbox:flexbox:3.0.0' @@ -230,7 +230,7 @@ dependencies { // https://github.com/Baseflow/PhotoView/blob/master/LICENSE Apache v2.0 implementation 'com.github.chrisbanes:PhotoView:2.3.0' - implementation platform('com.google.firebase:firebase-bom:30.3.2') + implementation platform('com.google.firebase:firebase-bom:31.0.1') if (crashlyticsEnabled) { implementation 'com.google.firebase:firebase-crashlytics-ndk' } else { diff --git a/app/src/main/java/org/linphone/activities/voip/CallActivity.kt b/app/src/main/java/org/linphone/activities/voip/CallActivity.kt index e8b109552..9a2198f20 100644 --- a/app/src/main/java/org/linphone/activities/voip/CallActivity.kt +++ b/app/src/main/java/org/linphone/activities/voip/CallActivity.kt @@ -23,7 +23,9 @@ import android.Manifest import android.content.Intent import android.content.pm.PackageManager import android.content.res.Configuration +import android.os.Build import android.os.Bundle +import androidx.annotation.RequiresApi import androidx.databinding.DataBindingUtil import androidx.lifecycle.ViewModelProvider import androidx.navigation.findNavController @@ -186,6 +188,7 @@ class CallActivity : ProximitySensorActivity() { } } + @RequiresApi(Build.VERSION_CODES.O) override fun onPictureInPictureModeChanged( isInPictureInPictureMode: Boolean, newConfig: Configuration @@ -195,6 +198,7 @@ class CallActivity : ProximitySensorActivity() { // To hide UI except for TextureViews controlsViewModel.pipMode.value = isInPictureInPictureMode } + super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig) } override fun onResume() { diff --git a/app/src/main/java/org/linphone/activities/voip/fragments/ConferenceCallFragment.kt b/app/src/main/java/org/linphone/activities/voip/fragments/ConferenceCallFragment.kt index 552e575ab..afbc63b03 100644 --- a/app/src/main/java/org/linphone/activities/voip/fragments/ConferenceCallFragment.kt +++ b/app/src/main/java/org/linphone/activities/voip/fragments/ConferenceCallFragment.kt @@ -262,6 +262,7 @@ class ConferenceCallFragment : GenericFragment switchToActiveSpeakerLayoutForTwoParticipants() else -> switchToActiveSpeakerLayoutForMoreThanTwoParticipants() } + } else { + Log.w("[Conference] Active speaker layout not adjusted, conference state is: ${conferenceViewModel.conference.value?.state}") } } diff --git a/app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt b/app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt index 2335b3bf5..8fb1a843e 100644 --- a/app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt +++ b/app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt @@ -89,6 +89,7 @@ class ConferenceViewModel : ViewModel() { updateParticipantsList(conference) if (conferenceParticipants.value.orEmpty().isEmpty()) { + speakingParticipant.value?.videoEnabled?.value = false allParticipantsLeftEvent.value = Event(true) } } @@ -190,7 +191,6 @@ class ConferenceViewModel : ViewModel() { when (state) { Conference.State.Created -> { configureConference(conference) - conferenceCreationPending.value = false } Conference.State.TerminationPending -> { terminateConference(conference) @@ -210,6 +210,10 @@ class ConferenceViewModel : ViewModel() { if (state == Conference.State.Instantiated) { conferenceCreationPending.value = true initConference(conference) + } else if (state == Conference.State.Created) { + if (conferenceCreationPending.value == true) { + conferenceCreationPending.value = false + } } } } @@ -239,10 +243,13 @@ class ConferenceViewModel : ViewModel() { Log.i("[Conference] Found an existing conference: $conference in state $state") if (state != Conference.State.TerminationPending && state != Conference.State.Terminated) { initConference(conference) - if (state == Conference.State.Created) { - configureConference(conference) - } else { + if (state == Conference.State.Instantiated) { conferenceCreationPending.value = true + } else if (state == Conference.State.Created) { + if (conferenceCreationPending.value == true) { + conferenceCreationPending.value = false + } + configureConference(conference) } } }