Replacing some fixed lookup flags with specific constant flag
This would make it easier to customize flags used on desktop icons Bug: 366237794 Flag: EXEMPT refactor Test: atest CacheLookupFlagTest Change-Id: I0f3f04ddbe73abea207a5b58a65714ff172b2726
This commit is contained in:
1 parent
eda3c8ec60
commit
c2639e464f
10 files changed
+68
-28
No files matched your search
@@ -23,9 +23,9 @@ import static com.android.launcher3.Flags.enableSmartspaceRemovalToggle;
|
||||
import static com.android.launcher3.Flags.enableTieredWidgetsByDefaultInPicker;
|
||||
import static com.android.launcher3.LauncherPrefs.IS_FIRST_LOAD_AFTER_RESTORE;
|
||||
import static com.android.launcher3.LauncherPrefs.SHOULD_SHOW_SMARTSPACE;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.DESKTOP_ICON_FLAG;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.TABLE_NAME;
|
||||
import static com.android.launcher3.icons.CacheableShortcutInfo.convertShortcutsToCacheableShortcuts;
|
||||
import static com.android.launcher3.icons.cache.CacheLookupFlag.DEFAULT_LOOKUP_FLAG;
|
||||
import static com.android.launcher3.model.BgDataModel.Callbacks.FLAG_HAS_SHORTCUT_PERMISSION;
|
||||
import static com.android.launcher3.model.BgDataModel.Callbacks.FLAG_PRIVATE_PROFILE_QUIET_MODE_ENABLED;
|
||||
import static com.android.launcher3.model.BgDataModel.Callbacks.FLAG_QUIET_MODE_CHANGE_PERMISSION;
|
||||
@@ -603,10 +603,10 @@ public class LoaderTask implements Runnable {
|
||||
info.rank = rank;
|
||||
|
||||
if (info instanceof WorkspaceItemInfo wii
|
||||
&& wii.getMatchingLookupFlag().useLowRes()
|
||||
&& wii.getMatchingLookupFlag().isVisuallyLessThan(DESKTOP_ICON_FLAG)
|
||||
&& wii.itemType == Favorites.ITEM_TYPE_APPLICATION
|
||||
&& verifiers.stream().anyMatch(it -> it.isItemInPreview(info.rank))) {
|
||||
mIconCache.getTitleAndIcon(wii, DEFAULT_LOOKUP_FLAG);
|
||||
mIconCache.getTitleAndIcon(wii, DESKTOP_ICON_FLAG);
|
||||
} else if (info instanceof AppPairInfo api) {
|
||||
api.fetchHiResIconsIfNeeded(mIconCache);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user