Here's something Roman Nurik and I wrote to help with dealing with Android System UI visibility across the different API levels.
It allows you to provide a level specifying how the System UI's visibility should be changed: LEVEL_LOW_PROFILE, LEVEL_HIDE_STATUS_BAR, LEVEL_LEAN_BACK or LEVEL_IMMERSIVE. Each one is pretty self explanatory.
To use the helper:
You can find the code at this gist:
https://gist.github.com/chrisbanes/73de18faffca571f7292