Removing the SearchDropTarget bar as it no longer contains the QSB

> Renaming it to simply DropTargetBar
> Moving AppInfo to the top bar as well
> The workspace pages will extend to the top edge (minus some padding).
Since the QSB is no longer displayed on top of every page, there is
no reason to reserve the space.
> In spring-loaded mode, the workspace cell layout will scale enough
to make room for the drop target bar at the top

Change-Id: I2baf607310335dd576c9d9fcbb75ab708f47ac03
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 3a361e2..1147326 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -51,12 +51,8 @@
             android:layout_gravity="right" />
 
         <include
-            android:id="@+id/app_info_drop_target_bar"
-            layout="@layout/drop_target_bar_vert_info" />
-
-        <include
-            android:id="@+id/search_drop_target_bar"
-            layout="@layout/drop_target_bar_vert_search" />
+            android:id="@+id/drop_target_bar"
+            layout="@layout/drop_target_bar_vert" />
 
         <include layout="@layout/overview_panel"
             android:id="@+id/overview_panel"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 4576e4d..fed99f3 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -60,15 +60,11 @@
         <com.android.launcher3.pageindicators.PageIndicatorLine
             android:id="@+id/page_indicator"
             android:layout_width="match_parent"
-            android:layout_height="1dp" />
+            android:layout_height="@dimen/dynamic_grid_page_indicator_height" />
 
         <include
-            android:id="@+id/app_info_drop_target_bar"
-            layout="@layout/drop_target_bar_horz_info" />
-
-        <include
-            android:id="@+id/search_drop_target_bar"
-            layout="@layout/drop_target_bar_horz_search" />
+            android:id="@+id/drop_target_bar"
+            layout="@layout/drop_target_bar_horz" />
 
         <include layout="@layout/widgets_view"
             android:id="@+id/widgets_view"
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 0f755d8..23e673c 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -51,12 +51,8 @@
             android:layout_height="match_parent" />
 
         <include
-            android:id="@+id/app_info_drop_target_bar"
-            layout="@layout/drop_target_bar_horz_info" />
-
-        <include
-            android:id="@+id/search_drop_target_bar"
-            layout="@layout/drop_target_bar_horz_search" />
+            android:id="@+id/drop_target_bar"
+            layout="@layout/drop_target_bar_horz" />
 
         <include layout="@layout/overview_panel"
             android:id="@+id/overview_panel"
@@ -67,7 +63,7 @@
         <com.android.launcher3.pageindicators.PageIndicatorLine
             android:id="@+id/page_indicator"
             android:layout_width="match_parent"
-            android:layout_height="1dp" />
+            android:layout_height="@dimen/dynamic_grid_page_indicator_height" />
 
         <include layout="@layout/widgets_view"
             android:id="@+id/widgets_view"
diff --git a/res/layout/drop_target_bar_horz.xml b/res/layout/drop_target_bar_horz.xml
new file mode 100644
index 0000000..ee22d1e
--- /dev/null
+++ b/res/layout/drop_target_bar_horz.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2015 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.DropTargetBar
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:launcher="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/dynamic_grid_drop_target_size"
+    android:layout_gravity="center_horizontal|top"
+    android:focusable="false">
+
+    <FrameLayout
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1" >
+
+        <!-- Delete target -->
+
+        <com.android.launcher3.DeleteDropTarget
+            launcher:hideParentOnDisable="true"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_gravity="center"
+            android:gravity="center"
+            android:id="@+id/delete_target_text"
+            style="@style/DropTargetButton"
+            android:text="@string/remove_drop_target_label" />
+    </FrameLayout>
+
+    <FrameLayout
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1" >
+
+        <!-- App Info -->
+
+        <com.android.launcher3.InfoDropTarget
+            launcher:hideParentOnDisable="true"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_gravity="center"
+            android:gravity="center"
+            android:id="@+id/info_target_text"
+            style="@style/DropTargetButton"
+            android:text="@string/app_info_drop_target_label" />
+    </FrameLayout>
+
+    <FrameLayout
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1" >
+
+        <!-- Uninstall target -->
+
+        <com.android.launcher3.UninstallDropTarget
+            launcher:hideParentOnDisable="true"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_gravity="center"
+            android:gravity="center"
+            android:id="@+id/uninstall_target_text"
+            style="@style/DropTargetButton"
+            android:text="@string/uninstall_drop_target_label" />
+    </FrameLayout>
+
+</com.android.launcher3.DropTargetBar>
\ No newline at end of file
diff --git a/res/layout/drop_target_bar_horz_info.xml b/res/layout/drop_target_bar_horz_info.xml
deleted file mode 100644
index 92a9b22..0000000
--- a/res/layout/drop_target_bar_horz_info.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2016 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.AppInfoDropTargetBar xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="48dp"
-    android:layout_gravity="center_horizontal|bottom"
-    android:focusable="false" >
-
-    <FrameLayout
-        android:id="@+id/drag_target_bar"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <!-- Info target -->
-
-        <com.android.launcher3.InfoDropTarget
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_gravity="center"
-            android:gravity="center"
-            android:id="@+id/info_target_text"
-            style="@style/DropTargetButton"
-            android:text="@string/app_info_drop_target_label" />
-    </FrameLayout>
-</com.android.launcher3.AppInfoDropTargetBar>
\ No newline at end of file
diff --git a/res/layout/drop_target_bar_horz_search.xml b/res/layout/drop_target_bar_horz_search.xml
deleted file mode 100644
index 7997801..0000000
--- a/res/layout/drop_target_bar_horz_search.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 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.SearchDropTargetBar xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:layout_gravity="center_horizontal|top"
-    android:focusable="false">
-
-    <!-- Drag specific targets container -->
-
-    <LinearLayout
-        android:id="@+id/drag_target_bar"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_gravity="center" >
-
-        <FrameLayout
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1" >
-
-            <!-- Delete target -->
-
-            <com.android.launcher3.DeleteDropTarget
-                launcher:hideParentOnDisable="true"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_gravity="center"
-                android:gravity="center"
-                android:id="@+id/delete_target_text"
-                style="@style/DropTargetButton"
-                android:text="@string/remove_drop_target_label" />
-        </FrameLayout>
-
-        <FrameLayout
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1" >
-
-            <!-- Uninstall target -->
-
-            <com.android.launcher3.UninstallDropTarget
-                launcher:hideParentOnDisable="true"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_gravity="center"
-                android:gravity="center"
-                android:id="@+id/uninstall_target_text"
-                style="@style/DropTargetButton"
-                android:text="@string/uninstall_drop_target_label" />
-        </FrameLayout>
-    </LinearLayout>
-
-</com.android.launcher3.SearchDropTargetBar>
\ No newline at end of file
diff --git a/res/layout/drop_target_bar_vert.xml b/res/layout/drop_target_bar_vert.xml
new file mode 100644
index 0000000..10b1d7c
--- /dev/null
+++ b/res/layout/drop_target_bar_vert.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2016 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.DropTargetBar
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="@dimen/dynamic_grid_drop_target_size"
+    android:orientation="vertical"
+    android:layout_height="match_parent"
+    android:layout_gravity="left"
+    android:focusable="false"
+    android:paddingTop="@dimen/vert_drop_target_vertical_gap" >
+
+    <!-- Delete target -->
+    <com.android.launcher3.DeleteDropTarget
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dynamic_grid_drop_target_size"
+        android:gravity="center"
+        android:paddingLeft="@dimen/vert_drop_target_horizontal_gap"
+        android:paddingRight="@dimen/vert_drop_target_horizontal_gap"
+        android:id="@+id/delete_target_text"
+        android:textColor="@android:color/white" />
+
+    <!-- Uninstall target -->
+    <com.android.launcher3.UninstallDropTarget
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dynamic_grid_drop_target_size"
+        android:gravity="center"
+        android:paddingLeft="@dimen/vert_drop_target_horizontal_gap"
+        android:paddingRight="@dimen/vert_drop_target_horizontal_gap"
+        android:id="@+id/uninstall_target_text"
+        android:textColor="@android:color/white"
+        android:layout_marginTop="@dimen/vert_drop_target_vertical_gap"/>
+
+    <Space
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1" />
+
+    <!-- App Info -->
+    <com.android.launcher3.InfoDropTarget
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dynamic_grid_drop_target_size"
+        android:gravity="center"
+        android:paddingLeft="@dimen/vert_drop_target_horizontal_gap"
+        android:paddingRight="@dimen/vert_drop_target_horizontal_gap"
+        android:id="@+id/info_target_text"
+        android:textColor="@android:color/white"
+        android:layout_marginBottom="64dp"/>
+
+</com.android.launcher3.DropTargetBar>
\ No newline at end of file
diff --git a/res/layout/drop_target_bar_vert_info.xml b/res/layout/drop_target_bar_vert_info.xml
deleted file mode 100644
index da33d1a..0000000
--- a/res/layout/drop_target_bar_vert_info.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2016 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.AppInfoDropTargetBar xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="48dp"
-    android:layout_height="match_parent"
-    android:focusable="false" >
-
-    <FrameLayout
-        android:id="@+id/drag_target_bar"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <!-- Info target -->
-        <com.android.launcher3.InfoDropTarget
-            android:layout_width="48dp"
-            android:layout_height="48dp"
-            android:layout_gravity="center_horizontal|bottom"
-            android:gravity="center"
-            android:paddingLeft="14dp"
-            android:paddingRight="14dp"
-            android:textColor="@android:color/white"
-            android:id="@+id/info_target_text" />
-    </FrameLayout>
-
-</com.android.launcher3.AppInfoDropTargetBar>
\ No newline at end of file
diff --git a/res/layout/drop_target_bar_vert_search.xml b/res/layout/drop_target_bar_vert_search.xml
deleted file mode 100644
index d5e41df..0000000
--- a/res/layout/drop_target_bar_vert_search.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 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.SearchDropTargetBar xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="48dp"
-    android:layout_height="match_parent"
-    android:focusable="false">
-
-    <!-- Drag specific targets container -->
-
-    <LinearLayout
-        android:id="@+id/drag_target_bar"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical"
-        android:layout_gravity="center"
-        android:paddingTop="20dp">
-
-        <!-- Delete target -->
-        <com.android.launcher3.DeleteDropTarget
-            android:layout_width="48dp"
-            android:layout_height="48dp"
-            android:gravity="center"
-            android:paddingLeft="14dp"
-            android:paddingRight="14dp"
-            android:id="@+id/delete_target_text"
-            android:textColor="@android:color/white"
-            android:layout_marginBottom="10dp" />
-
-        <!-- Uninstall target -->
-        <com.android.launcher3.UninstallDropTarget
-            android:layout_width="48dp"
-            android:layout_height="48dp"
-            android:layout_gravity="center"
-            android:gravity="center"
-            android:paddingLeft="14dp"
-            android:paddingRight="14dp"
-            android:id="@+id/uninstall_target_text"
-            android:textColor="@android:color/white"
-            android:layout_marginTop="10dp"/>
-    </LinearLayout>
-
-</com.android.launcher3.SearchDropTargetBar>
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 7510fafd..35ee58e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -17,19 +17,7 @@
 <resources>
 <!-- Dynamic Grid -->
     <dimen name="dynamic_grid_edge_margin">6dp</dimen>
-    <dimen name="dynamic_grid_search_bar_height">48dp</dimen>
-    <!-- We want 46dp extra for the tall search bar. -->
-    <dimen name="dynamic_grid_search_bar_height_tall">94dp</dimen>
-    <dimen name="qsb_internal_padding_top">8dp</dimen>
-    <dimen name="qsb_internal_padding_bottom">8dp</dimen>
-    <dimen name="dynamic_grid_search_bar_extra_top_padding">0dp</dimen>
-    <!-- Reduce the space between the status bar and the search bar when the search bar is tall -->
-    <dimen name="dynamic_grid_search_bar_negative_top_padding_short">-4dp</dimen>
-    <dimen name="dynamic_grid_search_bar_bottom_padding">4dp</dimen>
-    <!-- Reduce the padding between the search bar and workspace when the search bar is tall -->
-    <dimen name="dynamic_grid_search_bar_bottom_negative_padding_short">-6dp</dimen>
-    <dimen name="dynamic_grid_search_bar_bottom_padding_tablet">16dp</dimen>
-    <dimen name="dynamic_grid_page_indicator_height">20dp</dimen>
+    <dimen name="dynamic_grid_page_indicator_height">1dp</dimen>
     <dimen name="dynamic_grid_icon_drawable_padding">4dp</dimen>
     <dimen name="dynamic_grid_workspace_page_spacing">8dp</dimen>
     <dimen name="dynamic_grid_overview_min_icon_zone_height">80dp</dimen>
@@ -37,6 +25,15 @@
     <dimen name="dynamic_grid_overview_bar_item_width">80dp</dimen>
     <dimen name="dynamic_grid_overview_bar_spacer_width">20dp</dimen>
 
+    <dimen name="dynamic_grid_workspace_top_padding">12dp</dimen>
+    <!-- Minimum space between workspace and hotseat in spring loaded mode -->
+    <dimen name="dynamic_grid_min_spring_loaded_space">8dp</dimen>
+
+<!-- Drop target bar -->
+    <dimen name="dynamic_grid_drop_target_size">48dp</dimen>
+    <dimen name="vert_drop_target_vertical_gap">20dp</dimen>
+    <dimen name="vert_drop_target_horizontal_gap">14dp</dimen>
+
 <!-- App Widget resize frame -->
     <dimen name="default_widget_padding">8dp</dimen>
     <dimen name="widget_handle_margin">13dp</dimen>