Fix maps resume being blank

Bug: 30889568

Fixes an issue where mLayer didn't have
the mSurface set on it in certain resume
scenarios.

Change-Id: Ib75065d3d75e6141d6cd8f306584f6a569b9907c
This commit is contained in:
John Reck
2016-08-16 09:44:23 -07:00
parent 60ab8d072a
commit 03df0834e6

View File

@@ -379,9 +379,9 @@ public class TextureView extends View {
if (createNewSurface) { if (createNewSurface) {
// Create a new SurfaceTexture for the layer. // Create a new SurfaceTexture for the layer.
mSurface = new SurfaceTexture(false); mSurface = new SurfaceTexture(false);
mLayer.setSurfaceTexture(mSurface);
nCreateNativeWindow(mSurface); nCreateNativeWindow(mSurface);
} }
mLayer.setSurfaceTexture(mSurface);
mSurface.setDefaultBufferSize(getWidth(), getHeight()); mSurface.setDefaultBufferSize(getWidth(), getHeight());
mSurface.setOnFrameAvailableListener(mUpdateListener, mAttachInfo.mHandler); mSurface.setOnFrameAvailableListener(mUpdateListener, mAttachInfo.mHandler);