The document you referred says the flag SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN is to hide the status bar. Which means it's probably not right here. We want to exit fullscreen here, so whether we need to show status bar depends on how it shows before entering fullscreen. That's why I suggest to save the SystemUiVisibility before entering fullscreen and use it for exiting.