From ecbad471beb580be1c4e087ad76efe65274a7bd6 Mon Sep 17 00:00:00 2001 From: Tommy Webb Date: Mon, 16 Jan 2023 18:53:37 -0500 Subject: [PATCH] Skip glitchy search animation * Entering and leaving search now takes effect right away. * Should fix race in which tapping an app while search results are loading causes a tap on the previous app in the position, rather than on the search result. * Helps prevent the scrollbar from appearing to be scrolled down somewhat when leaving search with floating header rows present; still happens sometimes, though (on stock OS launcher, too). Change-Id: I67bc59456eb2e57e13b1b99509d3313ff0243b88 --- .../launcher3/allapps/ActivityAllAppsContainerView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index 3a709b1011..5f42938b15 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -128,7 +128,8 @@ public class ActivityAllAppsContainerView public static final float PULL_MULTIPLIER = .02f; public static final float FLING_VELOCITY_MULTIPLIER = 1200f; protected static final String BUNDLE_KEY_CURRENT_PAGE = "launcher.allapps.current_page"; - private static final long DEFAULT_SEARCH_TRANSITION_DURATION_MS = 300; + // As of this writing, search transition does not seem to work properly, so set duration to 0. + private static final long DEFAULT_SEARCH_TRANSITION_DURATION_MS = 0; // Render the header protection at all times to debug clipping issues. private static final boolean DEBUG_HEADER_PROTECTION = false; /** Context of an activity or window that is inflating this container. */