summaryrefslogtreecommitdiffstats
path: root/java/com/android/incallui/video/impl/VideoCallFragment.java
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2017-06-09 14:16:05 +0000
committerTobias Thierer <tobiast@google.com>2017-06-09 14:16:05 +0000
commitcded3beaf28a703e1ef8f71bbc6836e6806c3736 (patch)
treec1b5e8199b5996fc848e7455d04126b9cdbb3c39 /java/com/android/incallui/video/impl/VideoCallFragment.java
parentc67d658e7daa453fe9ad9fd1a37f81eaf2048c44 (diff)
downloadandroid_packages_apps_Dialer-cded3beaf28a703e1ef8f71bbc6836e6806c3736.tar.gz
android_packages_apps_Dialer-cded3beaf28a703e1ef8f71bbc6836e6806c3736.tar.bz2
android_packages_apps_Dialer-cded3beaf28a703e1ef8f71bbc6836e6806c3736.zip
Revert "Update AOSP Dialer source from internal google3 repository at cl/158012278. am: 91ce7d2a47"
This reverts commit c67d658e7daa453fe9ad9fd1a37f81eaf2048c44. Reason for revert: This CL broke the sailfish-userdebug_javac-all target on master. Change-Id: I9b54333a654c00154ca84f4ece84bea4f07cc19b
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, 9 insertions, 7 deletions
diff --git a/java/com/android/incallui/video/impl/VideoCallFragment.java b/java/com/android/incallui/video/impl/VideoCallFragment.java
index 6e45f928a..8e2f5aefd 100644
--- a/java/com/android/incallui/video/impl/VideoCallFragment.java
+++ b/java/com/android/incallui/video/impl/VideoCallFragment.java
@@ -59,7 +59,6 @@ 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;
@@ -666,14 +665,22 @@ 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. */
@@ -846,9 +853,6 @@ 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);
@@ -1041,6 +1045,7 @@ public class VideoCallFragment extends Fragment
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
previewTextureView.setLayoutParams(params);
previewTextureView.setOutlineProvider(circleOutlineProvider);
+ updatePreviewVideoScaling();
updateOverlayBackground();
contactGridManager.setIsMiddleRowVisible(false);
updateMutePreviewOverlayVisibility();
@@ -1048,9 +1053,6 @@ 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() {