Update shortcut animations.

- Open animation: shortcuts reveal using modified circular reveal
  (so that it reveals in the pill shape instead of a circle);
  slight translation away from the original icon; scale icon and text.
- Hover animation: scale the shortcut pill and translate others away.

Bug: 28980830
Bug: 30127368
Change-Id: I8ed05c7a082f2c2a3f6c663da7259f6cd33e394f
diff --git a/res/drawable/bg_white_pill.xml b/res/drawable/bg_white_pill.xml
index 29c3145..186b06b 100644
--- a/res/drawable/bg_white_pill.xml
+++ b/res/drawable/bg_white_pill.xml
@@ -17,6 +17,5 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
     <solid android:color="@color/quantum_panel_bg_color" />
-    <size android:height="48dp" />
-    <corners android:radius="24dp" />
+    <corners android:radius="@dimen/bg_pill_radius" />
 </shape>
\ No newline at end of file
diff --git a/res/layout/deep_shortcut.xml b/res/layout/deep_shortcut.xml
index b879235..0895460 100644
--- a/res/layout/deep_shortcut.xml
+++ b/res/layout/deep_shortcut.xml
@@ -16,5 +16,13 @@
 
 <com.android.launcher3.shortcuts.DeepShortcutView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    style="@style/Icon.DeepShortcut"
-    android:focusable="true"/>
+    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">
+
+    <com.android.launcher3.BubbleTextView
+        android:id="@+id/deep_shortcut"
+        style="@style/Icon.DeepShortcut"
+        android:focusable="true"/>
+</com.android.launcher3.shortcuts.DeepShortcutView>
diff --git a/res/values/config.xml b/res/values/config.xml
index a678958..bdedff0 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -86,6 +86,11 @@
     <!-- View ID used by cell layout to jail its content -->
     <item type="id" name="cell_layout_jail_id" />
 
+<!-- Deep shortcuts -->
+    <integer name="config_deepShortcutOpenDuration">300</integer>
+    <integer name="config_deepShortcutOpenStagger">20</integer>
+    <integer name="config_deepShortcutHoverDuration">120</integer>
+
 <!-- Accessibility actions -->
     <item type="id" name="action_remove" />
     <item type="id" name="action_uninstall" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 38775f1..8b02e5a 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -152,12 +152,16 @@
 
 <!-- Deep shortcuts -->
     <dimen name="deep_shortcuts_elevation">9dp</dimen>
-    <dimen name="deep_shortcuts_width">180dp</dimen>
+    <dimen name="bg_pill_width">180dp</dimen>
+    <dimen name="bg_pill_height">48dp</dimen>
+    <dimen name="bg_pill_radius">24dp</dimen>
     <dimen name="deep_shortcuts_spacing">4dp</dimen>
     <dimen name="deep_shortcuts_drag_view_scale">6dp</dimen>
     <!-- an icon with shortcuts must be dragged this much distance away from the nearest edge
          of the shortcut container before the container is removed. -->
     <dimen name="deep_shortcuts_start_drag_threshold">35dp</dimen>
     <dimen name="deep_shortcut_icon_size">36dp</dimen>
+    <dimen name="deep_shortcuts_arrow_horizontal_offset">19dp</dimen>
+    <dimen name="deep_shortcut_anim_translation_y">5dp</dimen>
 
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 3e827a6..532b701 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -78,10 +78,7 @@
     </style>
 
     <style name="Icon.DeepShortcut">
-        <item name="android:background">@drawable/bg_white_pill</item>
         <item name="android:gravity">start|center_vertical</item>
-        <item name="android:minWidth">@dimen/deep_shortcuts_width</item>
-        <item name="android:maxWidth">@dimen/deep_shortcuts_width</item>
         <item name="android:elevation">@dimen/deep_shortcuts_elevation</item>
         <item name="android:paddingLeft">7dp</item>
         <item name="android:drawablePadding">12dp</item>