Tweak ordering of first match search

- Tweak iteration for finding first match, go by operator priority and
  check each cell layout by order to return the first view that matches
- Also reset the launch cookie in cases where we're launching a task
  that doesn't support cookies (ie. via prediction), otherwise we may
  still try to associate it with the last launched cookie later

Fixes: 187720286
Test: Swipe up from various icon types across hotseat/workspace
Change-Id: I71c4c13c442b0884b2247589685f976eaaeb30a4
Signed-off-by: Winson Chung <winsonc@google.com>
This commit is contained in:
Winson Chung
2021-05-20 13:17:44 -07:00
parent 631767d919
commit bd2fa26bda
4 changed files with 25 additions and 33 deletions

View File

@@ -68,6 +68,8 @@ public class ItemInfo {
public static final boolean DEBUG = false;
public static final int NO_ID = -1;
// An id that doesn't match any item, including predicted apps with have an id=NO_ID
public static final int NO_MATCHING_ID = Integer.MIN_VALUE;
/**
* The id in the settings database for this item