Merge changes If379cc4b,I1c6ccb01 into jb-ub-now-indigo-rose

* changes:
  Fixing up all apps button pressed state:
  Fixing widget resize handles in RTL
diff --git a/res/layout-land/folder_cling.xml b/res/layout-land/folder_cling.xml
index 171e395..1f4a115 100644
--- a/res/layout-land/folder_cling.xml
+++ b/res/layout-land/folder_cling.xml
@@ -20,39 +20,29 @@
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_marginStart="10dp"
-        android:layout_marginEnd="10dp"
-        android:layout_marginTop="40dp"
-        android:layout_marginBottom="20dp">
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
+        android:layout_marginTop="10dp"
+        android:layout_marginBottom="10dp">
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <LinearLayout
+            android:paddingLeft="20dp"
+            android:paddingRight="20dp"
+            android:paddingTop="20dp"
+            android:paddingBottom="20dp"
+            android:orientation="vertical"
+            android:background="@drawable/cling">
+            <TextView
+                style="@style/ClingTitleText"
+                android:id="@+id/folder_cling_title"
+                android:text="@string/folder_cling_title" />
+            <TextView
+                style="@style/ClingText"
+                android:id="@+id/folder_cling_create_folder"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:paddingLeft="20dp"
-                android:paddingRight="20dp"
-                android:paddingTop="20dp"
-                android:paddingBottom="20dp"
-                android:orientation="vertical"
-                android:background="@drawable/cling">
-                <TextView
-                    style="@style/ClingTitleText"
-                    android:id="@+id/folder_cling_title"
-                    android:text="@string/folder_cling_title" />
-                <TextView
-                    style="@style/ClingText"
-                    android:id="@+id/folder_cling_create_folder"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:text="@string/folder_cling_create_folder" />
-            </LinearLayout>
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_horizontal"
-                android:src="@drawable/cling_arrow_down" />
+                android:text="@string/folder_cling_create_folder" />
         </LinearLayout>
     </FrameLayout>
     <Button
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 2b9a9f3..77ea2e9 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -57,6 +57,11 @@
         <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure
              that it is still visible during the transition to AllApps and doesn't overlay on
              top of that view. -->
+        <com.android.launcher3.ScrimView
+            android:id="@+id/cling_scrim"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:visibility="gone" />
         <include layout="@layout/first_run_cling"
             android:id="@+id/first_run_cling"
             android:layout_width="match_parent"
diff --git a/res/layout-port/folder_cling.xml b/res/layout-port/folder_cling.xml
index bd4b5e2..1f4a115 100644
--- a/res/layout-port/folder_cling.xml
+++ b/res/layout-port/folder_cling.xml
@@ -20,39 +20,29 @@
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_marginStart="20dp"
-        android:layout_marginEnd="20dp"
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
         android:layout_marginTop="10dp"
         android:layout_marginBottom="10dp">
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <LinearLayout
+            android:paddingLeft="20dp"
+            android:paddingRight="20dp"
+            android:paddingTop="20dp"
+            android:paddingBottom="20dp"
+            android:orientation="vertical"
+            android:background="@drawable/cling">
+            <TextView
+                style="@style/ClingTitleText"
+                android:id="@+id/folder_cling_title"
+                android:text="@string/folder_cling_title" />
+            <TextView
+                style="@style/ClingText"
+                android:id="@+id/folder_cling_create_folder"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:paddingLeft="20dp"
-                android:paddingRight="20dp"
-                android:paddingTop="20dp"
-                android:paddingBottom="20dp"
-                android:orientation="vertical"
-                android:background="@drawable/cling">
-                <TextView
-                    style="@style/ClingTitleText"
-                    android:id="@+id/folder_cling_title"
-                    android:text="@string/folder_cling_title" />
-                <TextView
-                    style="@style/ClingText"
-                    android:id="@+id/folder_cling_create_folder"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:text="@string/folder_cling_create_folder" />
-            </LinearLayout>
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_horizontal"
-                android:src="@drawable/cling_arrow_down" />
+                android:text="@string/folder_cling_create_folder" />
         </LinearLayout>
     </FrameLayout>
     <Button
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index faef7a5..6fbf7c7 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -64,6 +64,11 @@
         <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure
              that it is still visible during the transition to AllApps and doesn't overlay on
              top of that view. -->
+        <com.android.launcher3.ScrimView
+            android:id="@+id/cling_scrim"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:visibility="gone" />
         <include layout="@layout/first_run_cling"
             android:id="@+id/first_run_cling"
             android:layout_width="match_parent"
@@ -74,13 +79,14 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:visibility="gone" />
-
         <include layout="@layout/folder_cling"
             android:id="@+id/folder_cling"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:visibility="gone" />
 
+        <!-- This is the search bar voice button proxy view.  It allows us to have a larger
+             touch target than the microphone constrained by the search bar bounds. -->
         <com.android.launcher3.DrawableStateProxyView
             android:id="@+id/voice_button_proxy"
             android:layout_width="0dp"
diff --git a/res/layout-port/search_bar.xml b/res/layout-port/search_bar.xml
index 69dd61a..1c96ca3 100644
--- a/res/layout-port/search_bar.xml
+++ b/res/layout-port/search_bar.xml
@@ -17,6 +17,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
     style="@style/SearchDropTargetBar"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
     android:background="@drawable/search_frame">
    <!-- Global search icon -->
    <com.android.launcher3.HolographicLinearLayout
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 43a856d..e4278d9 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -36,5 +36,5 @@
     <color name="folder_items_text_color">#FF333333</color>
     <color name="outline_color">#FFFFFFFF</color>
     
-    <color name="first_run_cling_circle_background_color">#FF83AEE8</color>
+    <color name="first_run_cling_circle_background_color">#FF8BB4E9</color>
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6c05f7d..ac372fd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -228,7 +228,7 @@
     <!-- The title text for the workspace cling [CHAR_LIMIT=none] -->
     <string name="first_run_cling_title">Welcome!</string>
     <!-- The description of how to use the workspace [CHAR_LIMIT=none] -->
-    <string name="first_run_cling_description">Make yourself at Home</string>
+    <string name="first_run_cling_description">Make yourself at Home.</string>
     <!-- The description of how to use the workspace [CHAR_LIMIT=none] -->
     <string name="first_run_cling_custom_content_hint"></string>
     <!-- The description of how to use the workspace [CHAR_LIMIT=none] -->
@@ -238,15 +238,15 @@
     <!-- The title text for the workspace cling [CHAR_LIMIT=none] -->
     <string name="workspace_cling_title">Organize your space</string>
     <!-- The description of how to use the workspace [CHAR_LIMIT=none] -->
-    <string name="workspace_cling_move_item">Touch &amp; hold background to manage wallpaper, widgets and settings</string>
+    <string name="workspace_cling_move_item">Touch &amp; hold background to manage wallpaper, widgets and settings.</string>
     <!-- The title text for the All Apps cling [CHAR_LIMIT=none] -->
     <string name="all_apps_cling_title">Choose some apps</string>
     <!-- The description of how to pick up and add an item to the workspace [CHAR_LIMIT=none] -->
     <string name="all_apps_cling_add_item">To add an app to your Home screen, touch &amp; hold it.</string>
     <!-- The title text for the Folder cling [CHAR_LIMIT=none] -->
-    <string name="folder_cling_title">Create new folders for your apps</string>
+    <string name="folder_cling_title">Here\'s a folder</string>
     <!-- The description of how to create a folder [CHAR_LIMIT=none] -->
-    <string name="folder_cling_create_folder">Touch &amp; hold an app, then move it on top of another app icon</string>
+    <string name="folder_cling_create_folder">To create one like this, touch &amp; hold an app, then move it over another.</string>
     <!-- The text on the button to dismiss a cling [CHAR_LIMIT=none] -->
     <string name="cling_dismiss">OK</string>
     <!-- Error message on dummy custom cling layout [DO NOT TRANSLATE] -->
diff --git a/src/com/android/launcher3/Cling.java b/src/com/android/launcher3/Cling.java
index 7ca6990..2656ad6 100644
--- a/src/com/android/launcher3/Cling.java
+++ b/src/com/android/launcher3/Cling.java
@@ -70,6 +70,9 @@
     private Paint mBubblePaint;
     private Paint mDotPaint;
 
+    private View mScrimView;
+    private int mBackgroundColor;
+
     private final Rect mInsets = new Rect();
 
     public Cling(Context context) {
@@ -91,9 +94,11 @@
 
     }
 
-    void init(Launcher l, int[] positionData) {
+    void init(Launcher l, View scrim) {
         if (!mIsInitialized) {
             mLauncher = l;
+            mScrimView = scrim;
+            mBackgroundColor = 0xdd000000;
             setOnLongClickListener(this);
 
             mErasePaint = new Paint();
@@ -128,10 +133,7 @@
             content.animate()
                     .alpha(1f)
                     .setDuration(duration)
-                    .setListener(new AnimatorListenerAdapter() {
-                        public void onAnimationEnd(Animator animation) {
-                        };
-                    })
+                    .setListener(null)
                     .start();
             setAlpha(1f);
         } else {
@@ -142,11 +144,24 @@
                     .alpha(1f)
                     .setInterpolator(new AccelerateInterpolator())
                     .setDuration(duration)
+                    .setListener(null)
                     .start();
             } else {
                 setAlpha(1f);
             }
         }
+
+        // Show the scrim if necessary
+        if (mScrimView != null) {
+            mScrimView.setVisibility(View.VISIBLE);
+            mScrimView.setAlpha(0f);
+            mScrimView.animate()
+                    .alpha(1f)
+                    .setDuration(duration)
+                    .setListener(null)
+                    .start();
+        }
+
         setFocusableInTouchMode(true);
         post(new Runnable() {
             public void run() {
@@ -160,26 +175,42 @@
         if (mDrawIdentifier.equals(FIRST_RUN_PORTRAIT) ||
                 mDrawIdentifier.equals(FIRST_RUN_LANDSCAPE)) {
             View content = getContent();
-            ObjectAnimator anim = LauncherAnimUtils.ofFloat(content, "alpha", 0f);
-            anim.setDuration(duration);
-            anim.addListener(new AnimatorListenerAdapter() {
-                public void onAnimationEnd(Animator animation) {
-                    // We are about to trigger the workspace cling, so don't do anything else
-                    setVisibility(View.GONE);
-                    postCb.run();
-                };
-            });
-            anim.start();
+            content.animate()
+                .alpha(0f)
+                .setDuration(duration)
+                .setListener(new AnimatorListenerAdapter() {
+                    public void onAnimationEnd(Animator animation) {
+                        // We are about to trigger the workspace cling, so don't do anything else
+                        setVisibility(View.GONE);
+                        postCb.run();
+                    };
+                })
+                .start();
         } else {
-            ObjectAnimator anim = LauncherAnimUtils.ofFloat(this, "alpha", 0f);
-            anim.setDuration(duration);
-            anim.addListener(new AnimatorListenerAdapter() {
-                public void onAnimationEnd(Animator animation) {
-                    setVisibility(View.GONE);
-                    postCb.run();
-                };
-            });
-            anim.start();
+            animate()
+                .alpha(0f)
+                .setDuration(duration)
+                .setListener(new AnimatorListenerAdapter() {
+                    public void onAnimationEnd(Animator animation) {
+                        // We are about to trigger the workspace cling, so don't do anything else
+                        setVisibility(View.GONE);
+                        postCb.run();
+                    };
+                })
+                .start();
+        }
+
+        // Show the scrim if necessary
+        if (mScrimView != null) {
+            mScrimView.animate()
+                .alpha(0f)
+                .setDuration(duration)
+                .setListener(new AnimatorListenerAdapter() {
+                    public void onAnimationEnd(Animator animation) {
+                        mScrimView.setVisibility(View.GONE);
+                    };
+                })
+                .start();
         }
     }
 
@@ -188,6 +219,12 @@
         mIsInitialized = false;
     }
 
+    void bringScrimToFront() {
+        if (mScrimView != null) {
+            mScrimView.bringToFront();
+        }
+    }
+
     @Override
     public void setInsets(Rect insets) {
         mInsets.set(insets);
@@ -262,13 +299,12 @@
             // Draw the background
             Bitmap eraseBg = null;
             Canvas eraseCanvas = null;
-            if (mBackground != null) {
+            if (mScrimView != null) {
+                // Skip drawing the background
+                mScrimView.setBackgroundColor(mBackgroundColor);
+            } else if (mBackground != null) {
                 mBackground.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
                 mBackground.draw(canvas);
-            } else if (mDrawIdentifier.equals(FOLDER_PORTRAIT) ||
-                    mDrawIdentifier.equals(FOLDER_LANDSCAPE) ||
-                    mDrawIdentifier.equals(FOLDER_LARGE)) {
-                canvas.drawColor(0xcc000000);
             } else if (mDrawIdentifier.equals(WORKSPACE_PORTRAIT) ||
                     mDrawIdentifier.equals(WORKSPACE_LANDSCAPE) ||
                     mDrawIdentifier.equals(WORKSPACE_LARGE)) {
@@ -276,9 +312,9 @@
                 eraseBg = Bitmap.createBitmap(getMeasuredWidth(), getMeasuredHeight(),
                         Bitmap.Config.ARGB_8888);
                 eraseCanvas = new Canvas(eraseBg);
-                eraseCanvas.drawColor(0xdd000000);
+                eraseCanvas.drawColor(mBackgroundColor);
             } else {
-                canvas.drawColor(0xdd000000);
+                canvas.drawColor(mBackgroundColor);
             }
 
             // Draw everything else
diff --git a/src/com/android/launcher3/DragLayer.java b/src/com/android/launcher3/DragLayer.java
index 9c649ed..3c955cb 100644
--- a/src/com/android/launcher3/DragLayer.java
+++ b/src/com/android/launcher3/DragLayer.java
@@ -107,7 +107,7 @@
             final FrameLayout.LayoutParams flp = (FrameLayout.LayoutParams) child.getLayoutParams();
             if (child instanceof Insettable) {
                 ((Insettable)child).setInsets(insets);
-            } else  {
+            } else {
                 flp.topMargin += (insets.top - mInsets.top);
                 flp.leftMargin += (insets.left - mInsets.left);
                 flp.rightMargin += (insets.right - mInsets.right);
diff --git a/src/com/android/launcher3/DynamicGrid.java b/src/com/android/launcher3/DynamicGrid.java
index 0756c88..33eb595 100644
--- a/src/com/android/launcher3/DynamicGrid.java
+++ b/src/com/android/launcher3/DynamicGrid.java
@@ -359,14 +359,14 @@
         boolean hasVerticalBarLayout = isVerticalBarLayout();
 
         // Layout the search bar space
-        View searchBarSpace = launcher.findViewById(R.id.qsb_bar);
-        lp = (FrameLayout.LayoutParams) searchBarSpace.getLayoutParams();
+        View searchBar = launcher.getSearchBar();
+        lp = (FrameLayout.LayoutParams) searchBar.getLayoutParams();
         if (hasVerticalBarLayout) {
             // Vertical search bar
             lp.gravity = Gravity.TOP | Gravity.LEFT;
             lp.width = searchBarSpaceHeightPx;
             lp.height = LayoutParams.MATCH_PARENT;
-            searchBarSpace.setPadding(
+            searchBar.setPadding(
                     0, 2 * edgeMarginPx, 0,
                     2 * edgeMarginPx);
         } else {
@@ -374,19 +374,19 @@
             lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
             lp.width = searchBarSpaceWidthPx;
             lp.height = searchBarSpaceHeightPx;
-            searchBarSpace.setPadding(
+            searchBar.setPadding(
                     2 * edgeMarginPx,
                     2 * edgeMarginPx,
                     2 * edgeMarginPx, 0);
         }
-        searchBarSpace.setLayoutParams(lp);
+        searchBar.setLayoutParams(lp);
 
         // Layout the search bar
-        View searchBar = launcher.getQsbBar();
-        lp = (FrameLayout.LayoutParams) searchBar.getLayoutParams();
-        lp.width = LayoutParams.MATCH_PARENT;
-        lp.height = LayoutParams.MATCH_PARENT;
-        searchBar.setLayoutParams(lp);
+        View qsbBar = launcher.getQsbBar();
+        LayoutParams vglp = qsbBar.getLayoutParams();
+        vglp.width = LayoutParams.MATCH_PARENT;
+        vglp.height = LayoutParams.MATCH_PARENT;
+        qsbBar.setLayoutParams(vglp);
 
         // Layout the voice proxy
         View voiceButtonProxy = launcher.findViewById(R.id.voice_button_proxy);
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index a71d9b2..a4cb117 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -453,8 +453,9 @@
                 setLayerType(LAYER_TYPE_NONE, null);
                 Cling cling = mLauncher.showFirstRunFoldersCling();
                 if (cling != null) {
-                    cling.bringToFront();
+                    cling.bringScrimToFront();
                     bringToFront();
+                    cling.bringToFront();
                 }
                 setFocusOnFirstChild();
             }
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index b4d6ea5..821c15f 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -224,6 +224,7 @@
             data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE);
 
         // Queue the item up for adding if launcher has not loaded properly yet
+        LauncherAppState.setApplicationContext(context.getApplicationContext());
         LauncherAppState app = LauncherAppState.getInstance();
         boolean launcherNotLoaded = (app.getDynamicGrid() == null);
 
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 149a523..9f7b021 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -274,7 +274,7 @@
     private boolean mUserPresent = true;
     private boolean mVisible = false;
     private boolean mAttached = false;
-    private static final boolean DISABLE_CLINGS = true;
+    private static final boolean DISABLE_CLINGS = false;
     private static final boolean DISABLE_CUSTOM_CLINGS = true;
 
     private static LocaleConfiguration sLocaleConfiguration = null;
@@ -3263,7 +3263,8 @@
 
     public View getQsbBar() {
         if (mQsbBar == null) {
-            mQsbBar = mInflater.inflate(R.layout.qsb_bar, mSearchDropTargetBar);
+            mQsbBar = mInflater.inflate(R.layout.search_bar, mSearchDropTargetBar, false);
+            mSearchDropTargetBar.addView(mQsbBar);
         }
         return mQsbBar;
     }
@@ -4064,11 +4065,15 @@
         return true;
     }
 
-    private Cling initCling(int clingId, int[] positionData, boolean animate,
+    private Cling initCling(int clingId, int scrimId, boolean animate,
                             boolean dimNavBarVisibilty) {
-        final Cling cling = (Cling) findViewById(clingId);
+        Cling cling = (Cling) findViewById(clingId);
+        View scrim = null;
+        if (scrimId > 0) {
+            scrim = findViewById(R.id.cling_scrim);
+        }
         if (cling != null) {
-            cling.init(this, positionData);
+            cling.init(this, scrim);
             cling.show(animate, SHOW_CLING_DURATION);
 
             if (dimNavBarVisibilty) {
@@ -4087,7 +4092,6 @@
             final Runnable cleanUpClingCb = new Runnable() {
                 public void run() {
                     cling.cleanup();
-                    /*
                     // We should update the shared preferences on a background thread
                     new Thread("dismissClingThread") {
                         public void run() {
@@ -4096,7 +4100,6 @@
                             editor.commit();
                         }
                     }.start();
-                    */
                     if (postAnimationCb != null) {
                         postAnimationCb.run();
                     }
@@ -4177,7 +4180,7 @@
                     ccHint.setVisibility(View.VISIBLE);
                 }
             }
-            initCling(R.id.first_run_cling, null, false, true);
+            initCling(R.id.first_run_cling, 0, false, true);
         } else {
             removeCling(R.id.first_run_cling);
         }
@@ -4194,7 +4197,7 @@
         // Enable the clings only if they have not been dismissed before
         if (isClingsEnabled() &&
                 !mSharedPrefs.getBoolean(Cling.WORKSPACE_CLING_DISMISSED_KEY, false)) {
-            initCling(R.id.workspace_cling, null, false, true);
+            initCling(R.id.workspace_cling, 0, false, true);
         } else {
             removeCling(R.id.workspace_cling);
         }
@@ -4203,7 +4206,8 @@
         // Enable the clings only if they have not been dismissed before
         if (isClingsEnabled() &&
                 !mSharedPrefs.getBoolean(Cling.FOLDER_CLING_DISMISSED_KEY, false)) {
-            Cling cling = initCling(R.id.folder_cling, null, true, true);
+            Cling cling = initCling(R.id.folder_cling, R.id.cling_scrim,
+                    true, true);
             return cling;
         } else {
             removeCling(R.id.folder_cling);
diff --git a/src/com/android/launcher3/ScrimView.java b/src/com/android/launcher3/ScrimView.java
new file mode 100644
index 0000000..6831fe3
--- /dev/null
+++ b/src/com/android/launcher3/ScrimView.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.launcher3;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.Rect;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.FrameLayout;
+
+public class ScrimView extends FrameLayout implements Insettable {
+
+    public ScrimView(Context context) {
+        this(context, null, 0);
+    }
+
+    public ScrimView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public ScrimView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @Override
+    public void setInsets(Rect insets) {
+        // Do nothing
+    }
+}
diff --git a/src/com/android/launcher3/UninstallShortcutReceiver.java b/src/com/android/launcher3/UninstallShortcutReceiver.java
index 00fa631..ccea4ec 100644
--- a/src/com/android/launcher3/UninstallShortcutReceiver.java
+++ b/src/com/android/launcher3/UninstallShortcutReceiver.java
@@ -78,6 +78,7 @@
             PendingUninstallShortcutInfo pendingInfo) {
         final Intent data = pendingInfo.data;
 
+        LauncherAppState.setApplicationContext(context.getApplicationContext());
         LauncherAppState app = LauncherAppState.getInstance();
         synchronized (app) { // TODO: make removeShortcut internally threadsafe
             removeShortcut(context, data);
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 0eca3af..ab52c4e 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1030,12 +1030,14 @@
             if (mCustomContentCallbacks != null) {
                 mCustomContentCallbacks.onShow();
                 mCustomContentShowTime = System.currentTimeMillis();
+                mLauncher.setVoiceButtonProxyVisible(false);
             }
         } else if (hasCustomContent() && getNextPage() != 0 && mCustomContentShowing) {
             mCustomContentShowing = false;
             if (mCustomContentCallbacks != null) {
                 mCustomContentCallbacks.onHide();
                 mLauncher.resetQSBScroll();
+                mLauncher.setVoiceButtonProxyVisible(true);
             }
         }
     }