libgdx/libgdx — pull request #2218 by m4b (2014-08-10 04:15:02+00:00)
Title: fix useImmersiveMode

The previous implementation was not properly fullscreening on my kitkat devices (the kitkat immersive mode is distinct in that first entering it shows a blue overlay which tells you how to leave it, by swiping down from the menu bar area). The previous method xor'd the UI flags, which does not make sense; they should be inclusive or'd and sent into the setSystemUiVisibility method; testing with this method yields the correct fullscreen kitkat "immersive" mode, with a swipe down from the top to redisplay the navigation controls, and menu bar, etc.

I'm also unsure why reflection was being used; calling the method normally on the view object is completely sufficient; using this approach removes the need for a try catch block (the view should not be null anyway, or you have major problems regardless).

The KITKAT version codes were also used, instead of hardcoding 19.