Fixed incoming call display when early media and video

This commit is contained in:
Sylvain Berfini 2019-04-15 14:52:13 +02:00
parent 3aa706f6b4
commit 9840510996
2 changed files with 14 additions and 9 deletions

View file

@ -28,6 +28,7 @@ import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.TextureView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
@ -193,7 +194,10 @@ public class CallIncomingActivity extends LinphoneGenericActivity {
mNumber.setText(address.asStringUriOnly());
if (LinphonePreferences.instance().acceptIncomingEarlyMedia()) {
mCall.getCore().setNativeVideoWindowId(mVideoDisplay);
if (mCall.getCurrentParams().videoEnabled()) {
findViewById(R.id.avatar_layout).setVisibility(View.GONE);
mCall.getCore().setNativeVideoWindowId(mVideoDisplay);
}
}
}

View file

@ -33,13 +33,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/menu"
android:layout_below="@id/top_bar"
android:paddingTop="10dp">
android:layout_below="@id/top_bar">
<RelativeLayout
android:id="@+id/contact_detail"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:background="?attr/backgroundColor">
<TextView
android:id="@+id/contact_name"
@ -75,12 +75,13 @@
</RelativeLayout>
</RelativeLayout>
<TextureView
android:id="@+id/videoSurface"
android:layout_below="@id/contact_number"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextureView
android:id="@+id/videoSurface"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</FrameLayout>