Merge "[pixel-search] add escape hatch" into ub-launcher3-master

This commit is contained in:
Hilary Huo
2020-10-08 18:43:51 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 1 deletions
@@ -61,4 +61,8 @@ public class RemoteActionItemInfo extends ItemInfoWithIcon {
public boolean shouldStartInLauncher() {
return mShouldStart;
}
public boolean isEscapeHatch() {
return mToken.contains("item_type:[ESCAPE_HATCH]");
}
}
@@ -140,7 +140,7 @@ public class SearchResultIconRow extends DoubleShadowBubbleTextView implements
RemoteActionItemInfo itemInfo = new RemoteActionItemInfo(remoteAction, token, start);
applyFromRemoteActionInfo(itemInfo);
if (!loadIconFromResource()) {
if (itemInfo.isEscapeHatch() || !loadIconFromResource()) {
UI_HELPER_EXECUTOR.post(() -> {
// If the Drawable from the remote action is not AdaptiveBitmap, styling will not
// work.