Commit 013379fd by olly Committed by Oliver Woodman

Workaround for SurfaceView not being hidden properly

This appears to be fixed in Oreo, but given how harmless
the workaround is we can probably just apply it on all
API levels to be sure.

Issue: #3160

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167709070
parent 17232f58
...@@ -428,6 +428,15 @@ public final class SimpleExoPlayerView extends FrameLayout { ...@@ -428,6 +428,15 @@ public final class SimpleExoPlayerView extends FrameLayout {
} }
} }
@Override
public void setVisibility(int visibility) {
super.setVisibility(visibility);
if (surfaceView instanceof SurfaceView) {
// Work around https://github.com/google/ExoPlayer/issues/3160
surfaceView.setVisibility(visibility);
}
}
/** /**
* Sets the resize mode. * Sets the resize mode.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment