Skip to content

Commit

Permalink
Fix: Adding PWA/deep shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
machiav3lli committed Dec 5, 2023
1 parent ba6b751 commit 870f7c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/com/android/launcher3/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
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.pm.UserCache;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.shortcuts.ShortcutRequest;
Expand All @@ -108,6 +109,7 @@
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.BaseDragLayer;
import com.android.launcher3.widget.PendingAddShortcutInfo;
import com.saggitt.omega.preferences.NeoPrefs;
import com.saggitt.omega.util.Config;

Expand Down Expand Up @@ -757,6 +759,12 @@ public static Drawable loadFullDrawableWithoutTheme(Context context, ItemInfo in
.getIconProvider().getIcon(
activityInfo, activity.getDeviceProfile().inv.fillResIconDpi);
} else if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
if (info instanceof PendingAddShortcutInfo) {
ShortcutConfigActivityInfo activityInfo =
((PendingAddShortcutInfo) info).mActivityInfo;
outObj[0] = activityInfo;
return activityInfo.getFullResIcon(appState.getIconCache());
}
List<ShortcutInfo> si = ShortcutKey.fromItemInfo(info)
.buildRequest(context)
.query(ShortcutRequest.ALL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class PendingAddShortcutInfo extends PendingAddItemInfo {

// TODO: Make it @NonNull
protected ShortcutConfigActivityInfo mActivityInfo;
public ShortcutConfigActivityInfo mActivityInfo;

public PendingAddShortcutInfo(ShortcutConfigActivityInfo activityInfo) {
this.mActivityInfo = activityInfo;
Expand Down

0 comments on commit 870f7c3

Please sign in to comment.