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();
}
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();
});
} else {
@ -2291,8 +2287,6 @@ public class ReactExoplayerView extends FrameLayout implements
setControls(controls);
}
UiThreadUtil.runOnUiThread(() -> {
WindowCompat.setDecorFitsSystemWindows(window, originalFitsSystemWindows);
controller.show(WindowInsetsCompat.Type.systemBars());
eventEmitter.onVideoFullscreenPlayerDidDismiss.invoke();
});
}