mirror of
https://github.com/androidx/media.git
synced 2025-05-17 04:29:55 +08:00
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
This commit is contained in:
parent
17232f58a3
commit
013379fd3e
@ -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.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user