Don't remove colored bar views when relaunching

Change-Id: I518521e6b5e0b18a7f9ad9c7c6a67d55e2dfa2ab
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index b5f8f46..8b400d3 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -1683,9 +1683,15 @@
         if (mDecorCaptionView != null) {
             mDecorCaptionView.removeContentView();
         } else {
-            // This window doesn't have caption, so we need to just remove the
-            // children of the decor view.
-            removeAllViews();
+            // This window doesn't have caption, so we need to remove everything except our views
+            // we might have added.
+            for (int i = getChildCount() - 1; i >= 0; i--) {
+                View v = getChildAt(i);
+                if (v != mStatusColorViewState.view && v != mNavigationColorViewState.view
+                        && v != mStatusGuard && v != mNavigationGuard) {
+                    removeViewAt(i);
+                }
+            }
         }
     }