use of android.content.pm.LauncherApps.ShortcutQuery in project platform_frameworks_base by android.
the class BaseShortcutManagerTest method getLauncherShortcuts.
protected List<ShortcutInfo> getLauncherShortcuts(String launcher, int userId, int queryFlags) {
final List<ShortcutInfo>[] ret = new List[1];
runWithCaller(launcher, userId, () -> {
final ShortcutQuery q = new ShortcutQuery();
q.setQueryFlags(queryFlags);
ret[0] = mLauncherApps.getShortcuts(q, UserHandle.of(userId));
});
return ret[0];
}
use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by DirtyUnicorns.
the class BaseShortcutManagerTest method buildPinnedQuery.
protected static ShortcutQuery buildPinnedQuery(String packageName) {
final ShortcutQuery q = new ShortcutQuery();
q.setPackage(packageName);
q.setQueryFlags(ShortcutQuery.FLAG_GET_PINNED);
return q;
}
use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by DirtyUnicorns.
the class BaseShortcutManagerTest method buildQuery.
protected static ShortcutQuery buildQuery(long changedSince, String packageName, List<String> shortcutIds, ComponentName componentName, /* @ShortcutQuery.QueryFlags */
int flags) {
final ShortcutQuery q = new ShortcutQuery();
q.setChangedSince(changedSince);
q.setPackage(packageName);
q.setShortcutIds(shortcutIds);
q.setActivity(componentName);
q.setQueryFlags(flags);
return q;
}
use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by ResurrectionRemix.
the class BaseShortcutManagerTest method buildQueryWithFlags.
protected static ShortcutQuery buildQueryWithFlags(int queryFlags) {
final ShortcutQuery q = new ShortcutQuery();
q.setQueryFlags(queryFlags);
return q;
}
use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by ResurrectionRemix.
the class BaseShortcutManagerTest method getLauncherShortcuts.
protected List<ShortcutInfo> getLauncherShortcuts(String launcher, int userId, int queryFlags) {
final List<ShortcutInfo>[] ret = new List[1];
runWithCaller(launcher, userId, () -> {
final ShortcutQuery q = new ShortcutQuery();
q.setQueryFlags(queryFlags);
ret[0] = mLauncherApps.getShortcuts(q, UserHandle.of(userId));
});
return ret[0];
}
Aggregations