Fixing tests on a larger device

See atp for failed tests.

Widget container may return objects outside of screen, hence the test
failures.

Test: AddConfigWidgetTest.com.android.launcher3.ui.widget.AddConfigWidgetTest etc
Change-Id: Ia402dae0c9bc8f0585e57ac5f562a59e8ff4ed53
diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
index f81463a..7531331 100644
--- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
+++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
@@ -141,7 +141,8 @@
             // findObject can only execute after spring settles.
             mDevice.wait(Until.findObject(condition), SHORT_UI_TIMEOUT);
             UiObject2 widget = container.findObject(condition);
-            if (widget != null) {
+            if (widget != null && widget.getVisibleBounds().intersects(
+                    0, 0, mDevice.getDisplayWidth(), mDevice.getDisplayHeight())) {
                 return widget;
             }
         } while (container.scroll(Direction.DOWN, 1f));