Skip to content

Commit

Permalink
Workaround for SurfaceView not being hidden properly
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ojw28 committed Sep 6, 2017
1 parent 115fe8c commit bf80f6a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,15 @@ public void setPlayer(SimpleExoPlayer player) {
}
}

@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.
*
Expand Down

0 comments on commit bf80f6a

Please sign in to comment.