am ac40e790: am ced21e4e: am c754382b: am fe426d06: Merge "Inset the non-overlay contextual action bar without a status guard" into lmp-dev

* commit 'ac40e79029b99ef46f68c510ef19e81363f25bab':
  Inset the non-overlay contextual action bar without a status guard
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 83dfe85..b454681 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6601,6 +6601,7 @@
      * @see #fitSystemWindows(Rect)
      * @see #setSystemUiVisibility(int)
      */
+    @ViewDebug.ExportedProperty
     public boolean getFitsSystemWindows() {
         return (mViewFlags & FITS_SYSTEM_WINDOWS) == FITS_SYSTEM_WINDOWS;
     }
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 42ee666..5f3b877 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -2929,6 +2929,10 @@
                             }
                         }
 
+                        // The action mode's theme may differ from the app, so
+                        // always show the status guard above it if we have one.
+                        showStatusGuard = mStatusGuard != null;
+
                         // We only need to consume the insets if the action
                         // mode is overlaid on the app content (e.g. it's
                         // sitting in a FrameLayout, see
@@ -2936,11 +2940,7 @@
                         final boolean nonOverlay = (getLocalFeatures()
                                 & (1 << FEATURE_ACTION_MODE_OVERLAY)) == 0;
                         insets = insets.consumeSystemWindowInsets(
-                                false, nonOverlay /* top */, false, false);
-
-                        // The action mode's theme may differ from the app, so
-                        // always show the status guard above it.
-                        showStatusGuard = true;
+                                false, nonOverlay && showStatusGuard /* top */, false, false);
                     } else {
                         // reset top margin
                         if (mlp.topMargin != 0) {