Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d82d6671 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Revert "When scrolling in All apps, scroll to last clickable row"" into ub-launcher3-master

parents 498c9d63 a354835c
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@ import androidx.test.uiautomator.UiObject2;
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.
 */
@@ -77,7 +75,7 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer {
            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");
@@ -126,12 +124,7 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer {
                            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();
+2 −3
Original line number Diff line number Diff line
@@ -797,15 +797,14 @@ public final class LauncherInstrumentation {

        // 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);
    }