Revert "When scrolling in All apps, scroll to last clickable row"
This reverts commit 7afd271a17ad21878b7b1caf53c6c5c1f4a99abc.
Reason for revert: b/144522058
Bug: 144522058
Change-Id: Ie104b092a44e3a2fee0803fa83f1af7f8fd0afdf
diff --git a/tests/tapl/com/android/launcher3/tapl/AllApps.java b/tests/tapl/com/android/launcher3/tapl/AllApps.java
index 1ecfff7..cc92327 100644
--- a/tests/tapl/com/android/launcher3/tapl/AllApps.java
+++ b/tests/tapl/com/android/launcher3/tapl/AllApps.java
@@ -29,8 +29,6 @@
import com.android.launcher3.ResourceUtils;
import com.android.launcher3.testing.TestProtocol;
-import java.util.stream.Collectors;
-
/**
* Operations on AllApps opened from Home. Also a parent for All Apps opened from Overview.
*/
@@ -69,7 +67,7 @@
return false;
}
if (iconBounds.bottom > displayBottom) {
- LauncherInstrumentation.log("hasClickableIcon: icon bottom below bottom offset");
+ LauncherInstrumentation.log("hasClickableIcon: icon center bellow bottom offset");
return false;
}
LauncherInstrumentation.log("hasClickableIcon: icon is clickable");
@@ -118,12 +116,7 @@
displayBottom)) {
mLauncher.scrollToLastVisibleRow(
allAppsContainer,
- mLauncher.getObjectsInContainer(allAppsContainer, "icon")
- .stream()
- .filter(object ->
- object.getVisibleBounds().bottom
- <= displayBottom)
- .collect(Collectors.toList()),
+ mLauncher.getObjectsInContainer(allAppsContainer, "icon"),
searchBox.getVisibleBounds().bottom
- allAppsContainer.getVisibleBounds().top);
final int newScroll = getAllAppsScroll();
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 0d3938f..1c851f4 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -797,15 +797,14 @@
// TODO: Make the gesture steps dependent on the distance so that it can run for various
// screen sizes
- final int totalMargin = Math.max(bottomMargin, getBottomGestureMargin(container));
scroll(
container,
Direction.DOWN,
new Rect(
0,
- totalMargin / 2,
0,
- totalMargin / 2),
+ 0,
+ Math.max(bottomMargin, getBottomGestureMargin(container))),
80);
}