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

Commit 5387c110 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adding temporary workaround for for home click getting ignored" into ub-launcher3-master

parents 8a148aa9 56e36859
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ public class RecentsAnimationListenerSet implements RecentsAnimationListener {
        SwipeAnimationTargetSet targetSet = new SwipeAnimationTargetSet(controller, targets,
                homeContentInsets, minimizedHomeBounds);
        Utilities.postAsyncCallback(MAIN_THREAD_EXECUTOR.getHandler(), () -> {
            for (SwipeAnimationListener listener : mListeners) {
            for (SwipeAnimationListener listener : getListeners()) {
                listener.onRecentsAnimationStart(targetSet);
            }
        });
@@ -67,9 +67,13 @@ public class RecentsAnimationListenerSet implements RecentsAnimationListener {
    @Override
    public final void onAnimationCanceled() {
        Utilities.postAsyncCallback(MAIN_THREAD_EXECUTOR.getHandler(), () -> {
            for (SwipeAnimationListener listener : mListeners) {
            for (SwipeAnimationListener listener : getListeners()) {
                listener.onRecentsAnimationCanceled();
            }
        });
    }

    private SwipeAnimationListener[] getListeners() {
        return mListeners.toArray(new SwipeAnimationListener[mListeners.size()]);
    }
}
+10 −0
Original line number Diff line number Diff line
@@ -266,6 +266,16 @@ public final class LauncherInstrumentation {
                event -> true,
                "Pressing Home didn't produce any events");
        mDevice.waitForIdle();

        // Temporarily press home twice as the first click sometimes gets ignored  (b/124239413)
        executeAndWaitForEvent(
                () -> {
                    log("LauncherInstrumentation.pressHome before clicking");
                    getSystemUiObject("home").click();
                },
                event -> true,
                "Pressing Home didn't produce any events");
        mDevice.waitForIdle();
        return getWorkspace();
    }