Skip to content

Commit

Permalink
Make setFullscreenButtonState UnstableApi
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanjules committed Sep 16, 2024
1 parent 9b75523 commit 68a089a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@
[#1594](https://github.com/androidx/media/issues/1594)).
* Add `setFullscreenButtonState` to `PlayerView` to allow updates of
fullscreen button's icon on demand, i.e. out-of-band and not reactively
to a click interaction.
to a click interaction
([#1590](https://github.com/androidx/media/issues/1590),
[#184](https://github.com/androidx/media/issues/184),
[#10391](https://github.com/google/ExoPlayer/issues/10391))
[#184](https://github.com/androidx/media/issues/184)).
* Downloads:
* OkHttp Extension:
* Cronet Extension:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1582,16 +1582,14 @@ private void onFullScreenButtonClicked(View v) {
* Updates whether the controller is in fullscreen, changing its fullscreen icon and reports it to
* to the listener.
*
* <p>For {@code isFullscreen} equals {@code true} the icon will be set to {@link
* R.drawable#exo_styled_controls_fullscreen_exit} or else {@link
* R.drawable#exo_styled_controls_fullscreen_enter}.
* <p>For {@code isFullscreen} equals {@code true} the icon will be set to
* {@code @drawable/exo_styled_controls_fullscreen_exit} or else
* {@code @drawable/exo_styled_controls_fullscreen_enter}.
*
* @param isFullscreen If the view is in full screen.
*/
public void updateIsFullscreen(boolean isFullscreen) {
boolean fullscreenModeChanged = this.isFullScreen != isFullscreen;

if (!fullscreenModeChanged) {
if (this.isFullScreen == isFullscreen) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ public void setFullscreenButtonClickListener(@Nullable FullscreenButtonClickList
*
* @param isFullscreen Whether the player is currently in fullscreen.
*/
@UnstableApi
public void setFullscreenButtonState(boolean isFullscreen) {
Assertions.checkStateNotNull(controller);
controller.updateIsFullscreen(isFullscreen);
Expand Down

0 comments on commit 68a089a

Please sign in to comment.