Support gray hotseat background in all apps transition
b/30201515

Change-Id: Ie4b8442ac804b4df94e9673608129e6ffc0c3360
diff --git a/src/com/android/launcher3/BaseContainerView.java b/src/com/android/launcher3/BaseContainerView.java
index f9c2407..57a60a9 100644
--- a/src/com/android/launcher3/BaseContainerView.java
+++ b/src/com/android/launcher3/BaseContainerView.java
@@ -36,7 +36,8 @@
 
     protected final int mHorizontalPadding;
 
-    private final Drawable mRevealDrawable;
+    private final InsetDrawable mRevealDrawable;
+    private final ColorDrawable mDrawable;
 
     private View mRevealView;
     private View mContent;
@@ -63,14 +64,16 @@
         }
 
         if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && this instanceof AllAppsContainerView) {
-            mRevealDrawable = new InsetDrawable(new ColorDrawable(Color.WHITE), mHorizontalPadding,
-                    0, mHorizontalPadding, 0);
+            mDrawable = new ColorDrawable();
+            mRevealDrawable = new InsetDrawable(mDrawable,
+                    mHorizontalPadding, 0, mHorizontalPadding, 0);
         } else {
             TypedArray a = context.obtainStyledAttributes(attrs,
                     R.styleable.BaseContainerView, defStyleAttr, 0);
             mRevealDrawable = new InsetDrawable(
                     a.getDrawable(R.styleable.BaseContainerView_revealBackground),
                     mHorizontalPadding, 0, mHorizontalPadding, 0);
+            mDrawable = null;
             a.recycle();
         }
     }
@@ -82,8 +85,12 @@
         mContent = findViewById(R.id.main_content);
         mRevealView = findViewById(R.id.reveal_view);
 
-        mRevealView.setBackground(mRevealDrawable.getConstantState().newDrawable());
-        mContent.setBackground(mRevealDrawable);
+        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && this instanceof AllAppsContainerView) {
+            mRevealView.setBackground(mRevealDrawable);
+        } else {
+            mRevealView.setBackground(mRevealDrawable.getConstantState().newDrawable());
+            mContent.setBackground(mRevealDrawable);
+        }
 
         // We let the content have a intent background, but still have full width.
         // This allows the scroll bar to be used responsive outside the background bounds as well.
@@ -97,4 +104,8 @@
     public final View getRevealView() {
         return mRevealView;
     }
+
+    public void setRevealDrawableColor(int color) {
+        mDrawable.setColor(color);
+    }
 }