Merge deep shortcuts in rounded rect

- DeepShortcutViews are added to ShortcutsItemView, which
  is in PopupContainerWithArrow
- Moved some shortcut-specific logic to ShortcutsItemView
  (namely, touch/long-click handling for draggin shortcuts)
- Moved round-rect clipping to PopupItemView
- Removed collapseToIcon() logic, including
  PillWidthRevealOutlineProvider, which was only used for
  that purpose. It isn't necessary now that the deep
  shortcuts have no background themselves.
- Replaced focus pill drawable with ripple effect on
  shortcuts and notification view.

Bug: 35766387
Change-Id: I6bc09f1851cfbb806df4bf75a6e435b0f1900c9c
diff --git a/res/layout/deep_shortcut.xml b/res/layout/deep_shortcut.xml
index 6c1d4da..b2ed709 100644
--- a/res/layout/deep_shortcut.xml
+++ b/res/layout/deep_shortcut.xml
@@ -17,18 +17,16 @@
 <com.android.launcher3.shortcuts.DeepShortcutView
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:launcher="http://schemas.android.com/apk/res-auto"
-    android:layout_width="@dimen/bg_pill_width"
-    android:layout_height="@dimen/bg_pill_height"
-    android:elevation="@dimen/deep_shortcuts_elevation"
-    android:background="@drawable/bg_white_pill" >
+    android:layout_width="@dimen/bg_popup_item_width"
+    android:layout_height="@dimen/bg_popup_item_height" >
 
     <com.android.launcher3.shortcuts.DeepShortcutTextView
         style="@style/BaseIcon"
         android:id="@+id/deep_shortcut"
-        android:background="@drawable/bg_pill_focused"
+        android:background="?android:attr/selectableItemBackground"
         android:gravity="start|center_vertical"
         android:textAlignment="viewStart"
-        android:paddingStart="@dimen/bg_pill_height"
+        android:paddingStart="@dimen/bg_popup_item_height"
         android:paddingEnd="@dimen/deep_shortcut_padding_end"
         android:drawableEnd="@drawable/deep_shortcuts_drag_handle"
         android:drawablePadding="@dimen/deep_shortcut_drawable_padding"
@@ -40,10 +38,18 @@
         android:elevation="@dimen/deep_shortcuts_elevation" />
 
     <View
-        android:id="@+id/popup_item_icon"
+        android:id="@+id/icon"
         android:layout_width="@dimen/deep_shortcut_icon_size"
         android:layout_height="@dimen/deep_shortcut_icon_size"
         android:layout_margin="@dimen/deep_shortcut_padding_start"
         android:layout_gravity="start" />
 
+    <View
+        android:id="@+id/divider"
+        android:layout_width="@dimen/deep_shortcuts_divider_width"
+        android:layout_height="@dimen/popup_item_divider_height"
+        android:layout_gravity="end|bottom"
+        android:visibility="gone"
+        android:background="?android:attr/listDivider" />
+
 </com.android.launcher3.shortcuts.DeepShortcutView>
diff --git a/res/layout/notification.xml b/res/layout/notification.xml
index 48c7b48..e148cbb 100644
--- a/res/layout/notification.xml
+++ b/res/layout/notification.xml
@@ -17,7 +17,7 @@
 <com.android.launcher3.notification.NotificationItemView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/notification_view"
-    android:layout_width="@dimen/bg_pill_width"
+    android:layout_width="@dimen/bg_popup_item_width"
     android:layout_height="wrap_content"
     android:elevation="@dimen/deep_shortcuts_elevation"
     android:background="@drawable/bg_white_round_rect">
diff --git a/res/layout/notification_footer.xml b/res/layout/notification_footer.xml
index c025819..5428208 100644
--- a/res/layout/notification_footer.xml
+++ b/res/layout/notification_footer.xml
@@ -26,7 +26,7 @@
     <View
         android:id="@+id/divider"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/notification_divider_height"/>
+        android:layout_height="@dimen/popup_item_divider_height"/>
 
     <LinearLayout
         android:id="@+id/icon_row"
diff --git a/res/layout/shortcuts_item.xml b/res/layout/shortcuts_item.xml
new file mode 100644
index 0000000..8b20bcb
--- /dev/null
+++ b/res/layout/shortcuts_item.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+
+<com.android.launcher3.shortcuts.ShortcutsItemView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/shortcuts_view"
+    android:layout_width="@dimen/bg_popup_item_width"
+    android:layout_height="wrap_content"
+    android:elevation="@dimen/deep_shortcuts_elevation"
+    android:background="@drawable/bg_white_round_rect">
+
+    <LinearLayout
+        android:id="@+id/deep_shortcuts"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical">
+    </LinearLayout>
+
+</com.android.launcher3.shortcuts.ShortcutsItemView>