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.os.Bundle;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.TextureView; import android.view.TextureView;
import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@ -193,9 +194,12 @@ public class CallIncomingActivity extends LinphoneGenericActivity {
mNumber.setText(address.asStringUriOnly()); mNumber.setText(address.asStringUriOnly());
if (LinphonePreferences.instance().acceptIncomingEarlyMedia()) { if (LinphonePreferences.instance().acceptIncomingEarlyMedia()) {
if (mCall.getCurrentParams().videoEnabled()) {
findViewById(R.id.avatar_layout).setVisibility(View.GONE);
mCall.getCore().setNativeVideoWindowId(mVideoDisplay); mCall.getCore().setNativeVideoWindowId(mVideoDisplay);
} }
} }
}
@Override @Override
protected void onStart() { protected void onStart() {

View file

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