Setting the app's full screen in the onCreate event regenerates the onCreate event, which can cause problems if certain threads or tasks are used. To avoid this, it is necessary to modify the theme of the app, setting a custom theme in the manifest..
android:theme="@style/AppTheme"
In the style of the theme it is possible to modify the configuration parameters of the window, for example:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="@style/Theme.Leanback">
<item name="android:windowFullscreen">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>