mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed incoming/outgoing call header overlapping system status bar
This commit is contained in:
parent
95c4106bd0
commit
ace4caca3f
2 changed files with 44 additions and 44 deletions
|
|
@ -272,7 +272,7 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() {
|
|||
Log.i("$TAG Call [${call.remoteAddress.asStringUriOnly()}] state changed [$state]")
|
||||
if (LinphoneUtils.isCallOutgoing(call.state)) {
|
||||
isVideoEnabled.postValue(call.params.isVideoEnabled)
|
||||
updateVideoDirection(call.currentParams.videoDirection)
|
||||
updateVideoDirection(call.params.videoDirection)
|
||||
} else if (LinphoneUtils.isCallEnding(call.state)) {
|
||||
// If current call is being terminated but there is at least one other call, switch
|
||||
val core = call.core
|
||||
|
|
@ -1069,10 +1069,11 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() {
|
|||
|
||||
if (LinphoneUtils.isCallOutgoing(call.state)) {
|
||||
isVideoEnabled.postValue(call.params.isVideoEnabled)
|
||||
updateVideoDirection(call.params.videoDirection)
|
||||
} else {
|
||||
isVideoEnabled.postValue(call.currentParams.isVideoEnabled)
|
||||
updateVideoDirection(call.currentParams.videoDirection)
|
||||
}
|
||||
updateVideoDirection(call.currentParams.videoDirection)
|
||||
|
||||
if (ActivityCompat.checkSelfPermission(
|
||||
coreContext.context,
|
||||
|
|
@ -1190,6 +1191,11 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() {
|
|||
|
||||
@WorkerThread
|
||||
private fun updateVideoDirection(direction: MediaDirection) {
|
||||
val state = currentCall.state
|
||||
if (state != Call.State.StreamsRunning) {
|
||||
return
|
||||
}
|
||||
|
||||
val isSending = direction == MediaDirection.SendRecv || direction == MediaDirection.SendOnly
|
||||
val isReceiving = direction == MediaDirection.SendRecv || direction == MediaDirection.RecvOnly
|
||||
|
||||
|
|
|
|||
|
|
@ -13,55 +13,49 @@
|
|||
type="org.linphone.ui.call.viewmodel.CallsViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true"
|
||||
tools:context=".ui.call.CallActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<include
|
||||
android:id="@+id/other_calls_top_bar"
|
||||
layout="@layout/call_activity_other_calls_top_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{callViewModel.fullScreenMode ? View.GONE : View.VISIBLE}"
|
||||
app:viewModel="@{callsViewModel}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/other_calls_top_bar"
|
||||
layout="@layout/call_activity_other_calls_top_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{callViewModel.fullScreenMode ? View.GONE : View.VISIBLE}"
|
||||
app:viewModel="@{callsViewModel}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/call_nav_container"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/call_nav_graph"
|
||||
app:layout_constraintTop_toBottomOf="@id/other_calls_top_bar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/call_nav_container"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/call_nav_graph"
|
||||
app:layout_constraintTop_toBottomOf="@id/other_calls_top_bar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/toasts_area"
|
||||
android:visibility="@{callViewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/toast_top_margin"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
app:layout_constraintWidth_max="@dimen/toast_max_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/other_calls_top_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/toasts_area"
|
||||
android:visibility="@{callViewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/toast_top_margin"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
app:layout_constraintWidth_max="@dimen/toast_max_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/other_calls_top_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
Loading…
Add table
Reference in a new issue