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,16 +13,12 @@
|
||||||
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
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/other_calls_top_bar"
|
android:id="@+id/other_calls_top_bar"
|
||||||
layout="@layout/call_activity_other_calls_top_bar"
|
layout="@layout/call_activity_other_calls_top_bar"
|
||||||
|
|
@ -62,6 +58,4 @@
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
Loading…
Add table
Reference in a new issue