Fix issue #6404215: New ActionBar auto-hide can conflict with application

The action bar now maintains separate states for the things that can
impact its visibility (calls from the app, action mode, system UI) so
that the changes in these won't incorrectly mix together.

Also added a hack to force the status bar to be shown when showing
the action bar for an action mode, when the UI is in a state where
the action bar would be shown with a gap above where the status bar
is.

Change-Id: Ib0950a7f585c5d2c9e77d11b237ba6e150f15ebd
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index d1d036c..269760e 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -15236,6 +15236,18 @@
         }
     }
 
+    /** @hide */
+    public void setDisabledSystemUiVisibility(int flags) {
+        if (mAttachInfo != null) {
+            if (mAttachInfo.mDisabledSystemUiVisibility != flags) {
+                mAttachInfo.mDisabledSystemUiVisibility = flags;
+                if (mParent != null) {
+                    mParent.recomputeViewAttributes(this);
+                }
+            }
+        }
+    }
+
     /**
      * Creates an image that the system displays during the drag and drop
      * operation. This is called a "drag shadow". The default implementation
@@ -16913,6 +16925,11 @@
         int mSystemUiVisibility;
 
         /**
+         * Hack to force certain system UI visibility flags to be cleared.
+         */
+        int mDisabledSystemUiVisibility;
+
+        /**
          * True if a view in this hierarchy has an OnSystemUiVisibilityChangeListener
          * attached.
          */