am 35e04a1a: Merge "Fix NPE in setSurfaceTexure" into mnc-dev
* commit '35e04a1adfb763fd3a0cb7a345b37093ce8990a9': Fix NPE in setSurfaceTexure
This commit is contained in:
@@ -730,9 +730,13 @@ public class TextureView extends View {
|
|||||||
}
|
}
|
||||||
mSurface = surfaceTexture;
|
mSurface = surfaceTexture;
|
||||||
|
|
||||||
// If the view is visible, update the listener in the new surface to use
|
/*
|
||||||
// the existing listener in the view.
|
* If the view is visible and we already made a layer, update the
|
||||||
if (((mViewFlags & VISIBILITY_MASK) == VISIBLE)) {
|
* listener in the new surface to use the existing listener in the view.
|
||||||
|
* Otherwise this will be called when the view becomes visible or the
|
||||||
|
* layer is created
|
||||||
|
*/
|
||||||
|
if (((mViewFlags & VISIBILITY_MASK) == VISIBLE) && mLayer != null) {
|
||||||
mSurface.setOnFrameAvailableListener(mUpdateListener, mAttachInfo.mHandler);
|
mSurface.setOnFrameAvailableListener(mUpdateListener, mAttachInfo.mHandler);
|
||||||
}
|
}
|
||||||
mUpdateSurface = true;
|
mUpdateSurface = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user