Or, more precisely, how to check if the status bar is hidden?
You need to use the class method getForcedWindowFlags().
getForcedWindowFlags()