diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-05 15:29:54 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-05 15:29:54 +0000 |
commit | 43b3152d075138b11e1fe297682b3bbc775e5641 (patch) | |
tree | 3a325b0effac02fbd228b8ddf2f96589e5df72cd /java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java | |
parent | 2034759538273aed8a0b412d8fb90994eba1f7ea (diff) | |
parent | 300a8683b9c28424fb0f0c571a0abe128c461f69 (diff) |
Update Dialer to V10 RC16 am: 10b34a5ebf
am: 300a8683b9
Change-Id: If5695bad59f8a4dab6e6c90b54943b900bd2652a
Diffstat (limited to 'java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java')
-rw-r--r-- | java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java b/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java index 21160cadb..8cac40229 100644 --- a/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java +++ b/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java @@ -96,8 +96,7 @@ public class VideoSurfaceTextureImpl implements VideoSurfaceTexture { if (this.textureView != null) { this.textureView.setOnClickListener(null); - // Don't clear the surface texture listener. This is important because our listener prevents - // the surface from being released so that it can be reused later. + this.textureView.setSurfaceTextureListener(null); } this.textureView = textureView; @@ -137,12 +136,12 @@ public class VideoSurfaceTextureImpl implements VideoSurfaceTexture { LogUtil.i( "VideoSurfaceTextureImpl.createSurface", "width: " + width + ", height: " + height + " " + toString()); - if (savedSurfaceTexture != null) { - savedSurfaceTexture.setDefaultBufferSize(width, height); - savedSurface = new Surface(savedSurfaceTexture); - return true; + savedSurfaceTexture.setDefaultBufferSize(width, height); + if (savedSurface != null) { + savedSurface.release(); } - return false; + savedSurface = new Surface(savedSurfaceTexture); + return true; } private void onSurfaceCreated() { |