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

This commit is contained in:
TreeHugger Robot 2020-01-18 00:46:44 +00:00 committed by Android (Google) Code Review
commit 745aff4294
1 changed files with 10 additions and 0 deletions

View File

@ -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);