From d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Wed, 15 Mar 2017 14:41:07 -0700 Subject: Update Dialer source from latest green build. * Refactor voicemail component * Add new enriched calling components Test: treehugger, manual aosp testing Change-Id: I521a0f86327d4b42e14d93927c7d613044ed5942 --- .../incallui/answer/impl/AnswerVideoCallScreen.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'java/com/android/incallui/answer/impl/AnswerVideoCallScreen.java') diff --git a/java/com/android/incallui/answer/impl/AnswerVideoCallScreen.java b/java/com/android/incallui/answer/impl/AnswerVideoCallScreen.java index 0316a5fab..06502daab 100644 --- a/java/com/android/incallui/answer/impl/AnswerVideoCallScreen.java +++ b/java/com/android/incallui/answer/impl/AnswerVideoCallScreen.java @@ -32,12 +32,15 @@ import com.android.incallui.videosurface.bindings.VideoSurfaceBindings; /** Shows a video preview for an incoming call. */ public class AnswerVideoCallScreen implements VideoCallScreen { + @NonNull private final String callId; @NonNull private final Fragment fragment; @NonNull private final TextureView textureView; @NonNull private final VideoCallScreenDelegate delegate; - public AnswerVideoCallScreen(@NonNull Fragment fragment, @NonNull View view) { - this.fragment = fragment; + public AnswerVideoCallScreen( + @NonNull String callId, @NonNull Fragment fragment, @NonNull View view) { + this.callId = Assert.isNotNull(callId); + this.fragment = Assert.isNotNull(fragment); textureView = Assert.isNotNull((TextureView) view.findViewById(R.id.incoming_preview_texture_view)); @@ -53,13 +56,15 @@ public class AnswerVideoCallScreen implements VideoCallScreen { overlayView.setVisibility(View.VISIBLE); } - public void onStart() { + @Override + public void onVideoScreenStart() { LogUtil.i("AnswerVideoCallScreen.onStart", null); delegate.onVideoCallScreenUiReady(); delegate.getLocalVideoSurfaceTexture().attachToTextureView(textureView); } - public void onStop() { + @Override + public void onVideoScreenStop() { LogUtil.i("AnswerVideoCallScreen.onStop", null); delegate.onVideoCallScreenUiUnready(); } @@ -98,6 +103,12 @@ public class AnswerVideoCallScreen implements VideoCallScreen { return fragment; } + @NonNull + @Override + public String getCallId() { + return callId; + } + private void updatePreviewVideoScaling() { if (textureView.getWidth() == 0 || textureView.getHeight() == 0) { LogUtil.i( -- cgit v1.2.3