Merge "IMS-VT: Do not create new surface when setting surface dimensions" into nyc-dev
diff --git a/InCallUI/src/com/android/incallui/VideoCallFragment.java b/InCallUI/src/com/android/incallui/VideoCallFragment.java
index 2c06303..f80b04c 100644
--- a/InCallUI/src/com/android/incallui/VideoCallFragment.java
+++ b/InCallUI/src/com/android/incallui/VideoCallFragment.java
@@ -371,9 +371,10 @@
             mWidth = width;
             mHeight = height;
 
-            if (mSavedSurfaceTexture != null) {
+            if (width != DIMENSIONS_NOT_SET && height != DIMENSIONS_NOT_SET
+                    && mSavedSurfaceTexture != null) {
                 Log.d(this, "setSurfaceDimensions, mSavedSurfaceTexture is NOT equal to null.");
-                createSurface(width, height);
+                mSavedSurfaceTexture.setDefaultBufferSize(width, height);
             }
         }