summaryrefslogtreecommitdiffstats
path: root/java/com/android/incallui/video/impl/VideoCallFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/incallui/video/impl/VideoCallFragment.java')
-rw-r--r--java/com/android/incallui/video/impl/VideoCallFragment.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/java/com/android/incallui/video/impl/VideoCallFragment.java b/java/com/android/incallui/video/impl/VideoCallFragment.java
index 8e2f5aefd..6e45f928a 100644
--- a/java/com/android/incallui/video/impl/VideoCallFragment.java
+++ b/java/com/android/incallui/video/impl/VideoCallFragment.java
@@ -59,6 +59,7 @@ import android.widget.TextView;
import com.android.dialer.common.Assert;
import com.android.dialer.common.FragmentUtils;
import com.android.dialer.common.LogUtil;
+import com.android.dialer.common.concurrent.ThreadUtil;
import com.android.dialer.compat.ActivityCompat;
import com.android.incallui.audioroute.AudioRouteSelectorDialogFragment;
import com.android.incallui.audioroute.AudioRouteSelectorDialogFragment.AudioRouteSelectorPresenter;
@@ -665,22 +666,14 @@ public class VideoCallFragment extends Fragment
updateRemoteVideoScaling();
}
- /**
- * This method scales the video feed inside the texture view, it doesn't change the texture view's
- * size. In the old UI we would change the view size to match the aspect ratio of the video. In
- * the new UI the view is always square (with the circular clip) so we have to do additional work
- * to make sure the non-square video doesn't look squished.
- */
@Override
public void onLocalVideoDimensionsChanged() {
LogUtil.i("VideoCallFragment.onLocalVideoDimensionsChanged", null);
- updatePreviewVideoScaling();
}
@Override
public void onLocalVideoOrientationChanged() {
LogUtil.i("VideoCallFragment.onLocalVideoOrientationChanged", null);
- updatePreviewVideoScaling();
}
/** Called when the remote video's dimensions change. */
@@ -853,6 +846,9 @@ public class VideoCallFragment extends Fragment
}
@Override
+ public void onAudioRouteSelectorDismiss() {}
+
+ @Override
public void setPrimary(@NonNull PrimaryInfo primaryInfo) {
LogUtil.i("VideoCallFragment.setPrimary", primaryInfo.toString());
contactGridManager.setPrimary(primaryInfo);
@@ -1045,7 +1041,6 @@ public class VideoCallFragment extends Fragment
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
previewTextureView.setLayoutParams(params);
previewTextureView.setOutlineProvider(circleOutlineProvider);
- updatePreviewVideoScaling();
updateOverlayBackground();
contactGridManager.setIsMiddleRowVisible(false);
updateMutePreviewOverlayVisibility();
@@ -1053,6 +1048,9 @@ public class VideoCallFragment extends Fragment
previewOffBlurredImageView.setLayoutParams(params);
previewOffBlurredImageView.setOutlineProvider(circleOutlineProvider);
previewOffBlurredImageView.setClipToOutline(true);
+
+ // Wait until the layout pass has finished before updating the scaling
+ ThreadUtil.postOnUiThread(this::updatePreviewVideoScaling);
}
private void updateVideoOffViews() {