am 7f0d1e19: Merge "Fix NPE in onVisibilityChanged" into lmp-preview-dev
* commit '7f0d1e193bbf2dc189c2de6e3329aac0afda1d76': Fix NPE in onVisibilityChanged
This commit is contained in:
@@ -405,7 +405,9 @@ public class TextureView extends View {
|
||||
// To cancel updates, the easiest thing to do is simply to remove the
|
||||
// updates listener
|
||||
if (visibility == VISIBLE) {
|
||||
mSurface.setOnFrameAvailableListener(mUpdateListener, mAttachInfo.mHandler);
|
||||
if (mLayer != null) {
|
||||
mSurface.setOnFrameAvailableListener(mUpdateListener, mAttachInfo.mHandler);
|
||||
}
|
||||
updateLayerAndInvalidate();
|
||||
} else {
|
||||
mSurface.setOnFrameAvailableListener(null);
|
||||
|
||||
Reference in New Issue
Block a user