Merge "Tweak ordering of first match search" into sc-dev am: 07414d5cd5 am: 7af9af114d am: 09ce40258e

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14668159

Change-Id: Ibdb52d8b901f5b7b6bcb3e1f014f0b420a3e6c7b
This commit is contained in:
Winson Chung authored and Automerger Merge Worker committed 2021-05-21 04:23:10 +00:00
commit c01ab34bf1
4 files changed
+25 -33

No files matched your search

@@ -20,6 +20,7 @@ import static com.android.launcher3.AbstractFloatingView.TYPE_HIDE_BACK_BUTTON;
import static com.android.launcher3.LauncherState.FLAG_HIDE_BACK_BUTTON;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.NO_OFFSET;
import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID;
import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
@@ -499,6 +500,8 @@ public abstract class BaseQuickstepLauncher extends Launcher
// Also allow swiping to folders
break;
}
// Reset any existing launch cookies associated with the cookie
opts.setLaunchCookie(ObjectWrapper.wrap(NO_MATCHING_ID));
return;
}
switch (info.itemType) {
@@ -509,6 +512,8 @@ public abstract class BaseQuickstepLauncher extends Launcher
// Fall through and continue if it's an app, shortcut, or widget
break;
default:
// Reset any existing launch cookies associated with the cookie
opts.setLaunchCookie(ObjectWrapper.wrap(NO_MATCHING_ID));
return;
}
opts.setLaunchCookie(ObjectWrapper.wrap(new Integer(info.id)));
@@ -21,6 +21,7 @@ import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.Utilities.boundToRange;
import static com.android.launcher3.Utilities.dpToPx;
import static com.android.launcher3.config.FeatureFlags.PROTOTYPE_APP_CLOSE;
import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID;
import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION;
import static com.android.launcher3.views.FloatingIconView.getFloatingIconView;
@@ -234,7 +235,7 @@ public class LauncherSwipeHandlerV2 extends
// Find the associated item info for the launch cookie (if available), note that predicted
// apps actually have an id of -1, so use another default id here
int launchCookieItemId = -2;
int launchCookieItemId = NO_MATCHING_ID;
for (IBinder cookie : launchCookies) {
Integer itemId = ObjectWrapper.unwrap(cookie);
if (itemId != null) {