diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index b92cf09186..36faeee47a 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -45,6 +45,7 @@ import android.graphics.Paint; import android.graphics.Point; import android.graphics.Rect; import android.graphics.RectF; +import android.graphics.drawable.AdaptiveIconDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.InsetDrawable; @@ -80,6 +81,7 @@ import com.android.launcher3.icons.LauncherIcons; import com.android.launcher3.icons.ShortcutCachingLogic; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.ItemInfoWithIcon; +import com.android.launcher3.model.data.SearchActionItemInfo; import com.android.launcher3.pm.ShortcutConfigActivityInfo; import com.android.launcher3.shortcuts.ShortcutKey; import com.android.launcher3.shortcuts.ShortcutRequest; @@ -705,6 +707,10 @@ public final class Utilities { } outObj[0] = icon; return icon; + } else if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_SEARCH_ACTION + && info instanceof SearchActionItemInfo) { + return new AdaptiveIconDrawable( + new FastBitmapDrawable(((SearchActionItemInfo) info).bitmap), null); } else { return null; } diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java index 57d6cc36ca..fa65945da3 100644 --- a/src/com/android/launcher3/dragndrop/DragView.java +++ b/src/com/android/launcher3/dragndrop/DragView.java @@ -205,6 +205,7 @@ public abstract class DragView extends Fram @TargetApi(Build.VERSION_CODES.O) public void setItemInfo(final ItemInfo info) { if (info.itemType != LauncherSettings.Favorites.ITEM_TYPE_APPLICATION + && info.itemType != LauncherSettings.Favorites.ITEM_TYPE_SEARCH_ACTION && info.itemType != LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT && info.itemType != LauncherSettings.Favorites.ITEM_TYPE_FOLDER) { return;