Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 745aff42 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix regression where ShortcutRequest returns no results" into ub-launcher3-master

parents 442d5e5b d11fa28d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -58,10 +58,20 @@ public class ShortcutRequest {
        mUserHandle = userHandle;
    }

    /** @see #forPackage(String, List) */
    public ShortcutRequest forPackage(String packageName) {
        return forPackage(packageName, (List<String>) null);
    }

    /** @see #forPackage(String, List) */
    public ShortcutRequest forPackage(String packageName, String... shortcutIds) {
        return forPackage(packageName, Arrays.asList(shortcutIds));
    }

    /**
     * @param shortcutIds If null, match all shortcuts, otherwise only match the given id's.
     * @return A list of ShortcutInfo's associated with the given package.
     */
    public ShortcutRequest forPackage(String packageName, @Nullable List<String> shortcutIds) {
        if (!GO_DISABLE_WIDGETS && packageName != null) {
            mQuery.setPackage(packageName);