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