From 2a77c5f0df28f52a7bb7df90c0d23f4b0f51dbca Mon Sep 17 00:00:00 2001 From: wood1986 <5212215+wood1986@users.noreply.github.com> Date: Tue, 13 Sep 2022 22:53:49 -0700 Subject: [PATCH] fix: fix the system status bar when dismiss --- .../brentvatne/exoplayer/ReactExoplayerView.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 3e785806..2f663197 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1796,22 +1796,22 @@ class ReactExoplayerView extends FrameLayout implements | SYSTEM_UI_FLAG_FULLSCREEN; } eventEmitter.fullscreenWillPresent(); + if (controls) { + fullScreenPlayerView.show(); + } post(() -> { decorView.setSystemUiVisibility(uiOptions); - if (controls) { - fullScreenPlayerView.show(); - } eventEmitter.fullscreenDidPresent(); }); } else { uiOptions = View.SYSTEM_UI_FLAG_VISIBLE; eventEmitter.fullscreenWillDismiss(); + if (controls) { + fullScreenPlayerView.dismiss(); + reLayout(exoPlayerView); + } post(() -> { decorView.setSystemUiVisibility(uiOptions); - if (controls) { - fullScreenPlayerView.dismiss(); - reLayout(exoPlayerView); - } eventEmitter.fullscreenDidDismiss(); }); }