From 0cd1f191a1645d6abf2b7475d33e531f35c91386 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Mon, 25 Aug 2014 11:25:43 -0700 Subject: Setting SurfaceTexture buffer size for display and preview surfaces. When setting a surface for the Camera, it is important to ensure the buffer size is set before the surface is created. To fix this: The Surface passed to the Video Telephony layer is not created until the buffer size is set. The display surface buffer size is set when created. Setting the preview buffer size is deferred until the camera dimensions are received from the video provider. Bug: 16012946 Change-Id: I2130c029133ae6e5d670188e8d269ee6ac8bd675 --- .../com/android/incallui/VideoCallFragment.java | 100 ++++++++++++++++++--- 1 file changed, 90 insertions(+), 10 deletions(-) (limited to 'InCallUI/src') diff --git a/InCallUI/src/com/android/incallui/VideoCallFragment.java b/InCallUI/src/com/android/incallui/VideoCallFragment.java index 8e0b3a398..0b5bb4b23 100644 --- a/InCallUI/src/com/android/incallui/VideoCallFragment.java +++ b/InCallUI/src/com/android/incallui/VideoCallFragment.java @@ -35,6 +35,11 @@ import android.view.ViewTreeObserver; public class VideoCallFragment extends BaseFragment implements VideoCallPresenter.VideoCallUi { + /** + * Used to indicate that the surface dimensions are not set. + */ + private static final int DIMENSIONS_NOT_SET = -1; + /** * Surface ID for the display surface. */ @@ -78,6 +83,16 @@ public class VideoCallFragment extends BaseFragment