inttype=WindowInsetsCompat.Type.navigationBars();// only show/hide navigation bars, as we run with system bars always hidden
if(enable_immersive){
windowInsetsController.hide(type);
}
else{
windowInsetsController.show(type);
}
}
else{
// save whether we set SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - since this flag might be enabled for showUnderNavigation(true), at least indirectly by setDecorFitsSystemWindows() on old versions of Android
// don't need to avoid WindowInsetsCompat.Type.displayCutout(), as we already do this for the entire activity (see MainActivity's setOnApplyWindowInsetsListener)