it's possible that the activity is already fullscreen for the first call here, that means it's set somewhere else, probably in manifest. Here the fullscreen is also used to make an dom element fullscreen, so it makes sense when exit fullscreen, the activity should keep the state before entering fullscreen.