Fix setSurfaceTexture to handle surface caching
TextureView contains its surfaceTexture (i.e. mSurface)
and its OnFrameAvailableListener(i.e. mUpdateListener).
In order to apply a cached/pre-existing SurfaceTexture s1 to a
TextureView, if we call TextureView.setSurfaceTexture(s1),
the OnFrameAvailableListener of s1 should get set to mUpdateListener
of TextureView since the mSurface has been updated.
The existing code doesn't apply this and causes the frames to not be
updated on a TextureView that uses setSurfaceTexture.
This change fixes setSurfaceTexture method by setting s1's
OnFrameAvailableListener to mUpdateListener.
Change-Id: I4c1a704c587e977ab7a6b1fe3a7d3e0d20d00218
1 file changed