Moving the QSB out of the cell layout to the Drag layer

This allows better edge matching for the QSB. The QSB position
is kept synchronized with the page scroll and all-apps transition.
But its not visible in spring loaded and overview mode

Change-Id: I4e6723607ea966ee672273a9ca67c792fd6b5661
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 72bb343..2b130e5 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -296,7 +296,7 @@
     }
 
     public Point getTotalWorkspacePadding() {
-        Rect padding = getWorkspacePadding();
+        Rect padding = getWorkspacePadding(null);
         return new Point(padding.left + padding.right, padding.top + padding.bottom);
     }
 
@@ -306,8 +306,8 @@
      * this value is not reliable.
      * Use {@link #getTotalWorkspacePadding()} instead.
      */
-    public Rect getWorkspacePadding() {
-        Rect padding = new Rect();
+    public Rect getWorkspacePadding(Rect recycle) {
+        Rect padding = recycle == null ? new Rect() : recycle;
         if (isVerticalBarLayout()) {
             // in case of isVerticalBarLayout, the hotseat is always on the right and the drop
             // target bar is on the left, independent of the layout direction.
@@ -348,7 +348,7 @@
             // In portrait, we want the pages spaced such that there is no
             // overhang of the previous / next page into the current page viewport.
             // We assume symmetrical padding in portrait mode.
-            return Math.max(defaultPageSpacingPx, 2 * getWorkspacePadding().left);
+            return Math.max(defaultPageSpacingPx, 2 * getWorkspacePadding(null).left);
         }
     }
 
@@ -405,13 +405,15 @@
 
         // Layout the workspace
         PagedView workspace = (PagedView) launcher.findViewById(R.id.workspace);
-        lp = (FrameLayout.LayoutParams) workspace.getLayoutParams();
-        lp.gravity = Gravity.CENTER;
-        Rect padding = getWorkspacePadding();
-        workspace.setLayoutParams(lp);
+        Rect padding = getWorkspacePadding(null);
         workspace.setPadding(padding.left, padding.top, padding.right, padding.bottom);
         workspace.setPageSpacing(getWorkspacePageSpacing());
 
+        View qsbContainer = launcher.getQsbContainer();
+        lp = (FrameLayout.LayoutParams) qsbContainer.getLayoutParams();
+        lp.topMargin = padding.top;
+        qsbContainer.setLayoutParams(lp);
+
         // Layout the hotseat
         View hotseat = launcher.findViewById(R.id.hotseat);
         lp = (FrameLayout.LayoutParams) hotseat.getLayoutParams();