Search in sources :

Example 6 with ShortcutQuery

use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by ResurrectionRemix.

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;
}
Also used : ShortcutQuery(android.content.pm.LauncherApps.ShortcutQuery)

Example 7 with ShortcutQuery

use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by ResurrectionRemix.

the class BaseShortcutManagerTest method buildAllQuery.

protected static ShortcutQuery buildAllQuery(String packageName) {
    final ShortcutQuery q = new ShortcutQuery();
    q.setPackage(packageName);
    q.setQueryFlags(ShortcutQuery.FLAG_GET_ALL_KINDS);
    return q;
}
Also used : ShortcutQuery(android.content.pm.LauncherApps.ShortcutQuery)

Example 8 with ShortcutQuery

use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by ResurrectionRemix.

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;
}
Also used : ShortcutQuery(android.content.pm.LauncherApps.ShortcutQuery)

Example 9 with ShortcutQuery

use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by crdroidandroid.

the class BaseShortcutManagerTest method buildAllQuery.

protected static ShortcutQuery buildAllQuery(String packageName) {
    final ShortcutQuery q = new ShortcutQuery();
    q.setPackage(packageName);
    q.setQueryFlags(ShortcutQuery.FLAG_GET_ALL_KINDS);
    return q;
}
Also used : ShortcutQuery(android.content.pm.LauncherApps.ShortcutQuery)

Example 10 with ShortcutQuery

use of android.content.pm.LauncherApps.ShortcutQuery in project android_frameworks_base by crdroidandroid.

the class BaseShortcutManagerTest method buildQueryWithFlags.

protected static ShortcutQuery buildQueryWithFlags(int queryFlags) {
    final ShortcutQuery q = new ShortcutQuery();
    q.setQueryFlags(queryFlags);
    return q;
}
Also used : ShortcutQuery(android.content.pm.LauncherApps.ShortcutQuery)

Aggregations

ShortcutQuery (android.content.pm.LauncherApps.ShortcutQuery)24 ComponentName (android.content.ComponentName)4 ShortcutInfo (android.content.pm.ShortcutInfo)4 ShortcutManagerTestUtils.cloneShortcutList (com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.cloneShortcutList)4 ArrayList (java.util.ArrayList)4 List (java.util.List)4