diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-08-31 16:17:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-31 16:17:04 +0000 |
commit | c39ea3c55fac807c0b98aabdf56c70dc8a49036c (patch) | |
tree | e282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java | |
parent | 68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff) | |
parent | 2ca4318cc1ee57dda907ba2069bd61d162b1baef (diff) |
Merge "Update Dialer source to latest internal Google revision."
Diffstat (limited to 'java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java')
-rw-r--r-- | java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java b/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java index 8cac40229..6ce564a87 100644 --- a/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java +++ b/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java @@ -18,6 +18,8 @@ package com.android.incallui.videosurface.impl; import android.graphics.Point; import android.graphics.SurfaceTexture; +import android.os.Build.VERSION; +import android.os.Build.VERSION_CODES; import android.view.Surface; import android.view.TextureView; import android.view.View; @@ -33,6 +35,8 @@ import java.util.Objects; */ public class VideoSurfaceTextureImpl implements VideoSurfaceTexture { @SurfaceType private final int surfaceType; + private final boolean isPixel2017; + private VideoSurfaceDelegate delegate; private TextureView textureView; private Surface savedSurface; @@ -41,7 +45,8 @@ public class VideoSurfaceTextureImpl implements VideoSurfaceTexture { private Point sourceVideoDimensions; private boolean isDoneWithSurface; - public VideoSurfaceTextureImpl(@SurfaceType int surfaceType) { + public VideoSurfaceTextureImpl(boolean isPixel2017, @SurfaceType int surfaceType) { + this.isPixel2017 = isPixel2017; this.surfaceType = surfaceType; } @@ -68,6 +73,13 @@ public class VideoSurfaceTextureImpl implements VideoSurfaceTexture { "surfaceDimensions: " + surfaceDimensions + " " + toString()); this.surfaceDimensions = surfaceDimensions; if (surfaceDimensions != null && savedSurfaceTexture != null) { + // Only do this on O (not at least O) because we expect this issue to be fixed in OMR1 + if (VERSION.SDK_INT == VERSION_CODES.O && isPixel2017) { + LogUtil.i( + "VideoSurfaceTextureImpl.setSurfaceDimensions", + "skip setting default buffer size on Pixel 2017 ODR"); + return; + } savedSurfaceTexture.setDefaultBufferSize(surfaceDimensions.x, surfaceDimensions.y); } } |