Here the logic is incorrect, you should add the condition to justify whether the XWalkView is in fullscreen state.