The fullest of fullscreen modes.

View.setSystemUiVisibility() now properly accepts a
bitfield, including:

  * SYSTEM_UI_FLAG_LOW_PROFILE: "lights out mode"
    (previously known, erroneously, as STATUS_BAR_HIDDEN)

  * SYSTEM_UI_FLAG_HIDE_NAVIGATION: for when you need every
    single pixel on a device that also has a navigation bar

These flags are painstakingly aggregated across the entire
view hierarchy and carefully delivered to the status bar
service, which in turn gently passes them along to the bar
implementation.

To really get access to the whole screen, you need to use
HIDE_NAVIGATION in conjunction with FLAG_FULLSCREEN and
FLAG_LAYOUT_IN_SCREEN. See development/samples/Overscan for
an example of how to do this.

Change-Id: I5fbfe009d9ceebbbf71db73f14a7008ea7c1d4da
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index 62d7500..c91f513 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -54,7 +54,7 @@
     private static final int OP_EXPAND      = 1;
     private static final int OP_COLLAPSE    = 2;
 
-    private static final int MSG_SET_LIGHTS_ON          = 7 << MSG_SHIFT;
+    private static final int MSG_SET_SYSTEMUI_VISIBILITY          = 7 << MSG_SHIFT;
 
     private static final int MSG_TOP_APP_WINDOW_CHANGED = 8 << MSG_SHIFT;
     private static final int MSG_SHOW_IME_BUTTON        = 9 << MSG_SHIFT;
@@ -86,7 +86,7 @@
         public void disable(int state);
         public void animateExpand();
         public void animateCollapse();
-        public void setLightsOn(boolean on);
+        public void setSystemUiVisibility(int vis);
         public void topAppWindowChanged(boolean visible);
         public void setImeWindowStatus(IBinder token, int vis, int backDisposition);
         public void setHardKeyboardStatus(boolean available, boolean enabled);
@@ -160,10 +160,10 @@
         }
     }
 
-    public void setLightsOn(boolean on) {
+    public void setSystemUiVisibility(int vis) {
         synchronized (mList) {
-            mHandler.removeMessages(MSG_SET_LIGHTS_ON);
-            mHandler.obtainMessage(MSG_SET_LIGHTS_ON, on ? 1 : 0, 0, null).sendToTarget();
+            mHandler.removeMessages(MSG_SET_SYSTEMUI_VISIBILITY);
+            mHandler.obtainMessage(MSG_SET_SYSTEMUI_VISIBILITY, vis, 0, null).sendToTarget();
         }
     }
 
@@ -259,8 +259,8 @@
                         mCallbacks.animateCollapse();
                     }
                     break;
-                case MSG_SET_LIGHTS_ON:
-                    mCallbacks.setLightsOn(msg.arg1 != 0);
+                case MSG_SET_SYSTEMUI_VISIBILITY:
+                    mCallbacks.setSystemUiVisibility(msg.arg1);
                     break;
                 case MSG_TOP_APP_WINDOW_CHANGED:
                     mCallbacks.topAppWindowChanged(msg.arg1 != 0);