fix(android): show the status bar and navigation bar after exiting full-screen mode (#4112)

* fix(android):  show the status bar and navigation bar after exiting full-screen mode
This commit is contained in:
Seyed Mostafa Hasani 2024-09-03 10:29:24 +03:30 committed by GitHub
parent 308447a5ba
commit 8b8ebe9410
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2277,10 +2277,6 @@ public class ReactExoplayerView extends FrameLayout implements
fullScreenPlayerView.show(); fullScreenPlayerView.show();
} }
UiThreadUtil.runOnUiThread(() -> { UiThreadUtil.runOnUiThread(() -> {
originalFitsSystemWindows = window.getDecorView().getFitsSystemWindows();
WindowCompat.setDecorFitsSystemWindows(window, false);
controller.hide(WindowInsetsCompat.Type.systemBars());
controller.setSystemBarsBehavior(WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE);
eventEmitter.onVideoFullscreenPlayerDidPresent.invoke(); eventEmitter.onVideoFullscreenPlayerDidPresent.invoke();
}); });
} else { } else {
@ -2291,8 +2287,6 @@ public class ReactExoplayerView extends FrameLayout implements
setControls(controls); setControls(controls);
} }
UiThreadUtil.runOnUiThread(() -> { UiThreadUtil.runOnUiThread(() -> {
WindowCompat.setDecorFitsSystemWindows(window, originalFitsSystemWindows);
controller.show(WindowInsetsCompat.Type.systemBars());
eventEmitter.onVideoFullscreenPlayerDidDismiss.invoke(); eventEmitter.onVideoFullscreenPlayerDidDismiss.invoke();
}); });
} }