OSDN Git Service

Ensure we pass search bar bounds to GoogleSearch. (Bug 11968598)
authorWinson Chung <winsonc@google.com>
Mon, 2 Dec 2013 23:00:39 +0000 (15:00 -0800)
committerWinson Chung <winsonc@google.com>
Mon, 2 Dec 2013 23:01:39 +0000 (15:01 -0800)
Change-Id: I10027c2c10bbc5b2f2e63276dc91ceca0bf59a08

src/com/android/launcher3/DeviceProfile.java

index 9301885..9e1f1a7 100644 (file)
@@ -449,10 +449,12 @@ public class DeviceProfile {
                 //      that into account here too.
                 int gap = (int) ((width - 2 * edgeMarginPx -
                         (numColumns * cellWidthPx)) / (2 * (numColumns + 1)));
-                bounds.set(edgeMarginPx + gap, 0, availableWidthPx - (edgeMarginPx + gap),
+                bounds.set(edgeMarginPx + gap, getSearchBarTopOffset(),
+                        availableWidthPx - (edgeMarginPx + gap),
                         searchBarSpaceHeightPx);
             } else {
-                bounds.set(desiredWorkspaceLeftRightMarginPx - defaultWidgetPadding.left, 0,
+                bounds.set(desiredWorkspaceLeftRightMarginPx - defaultWidgetPadding.left,
+                        getSearchBarTopOffset(),
                         availableWidthPx - (desiredWorkspaceLeftRightMarginPx -
                         defaultWidgetPadding.right), searchBarSpaceHeightPx);
             }