summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-09-30 12:18:25 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-09-30 12:19:13 -0700
commitb57c893db8c567ffeeb3c61f4fb3545c4a256441 (patch)
tree3e8f5fe54b552ebea10583964dccc59f44875a67 /src/com/android/launcher3/shortcuts
parentde45283519570477b2c01feaa12e19e53cf0b57d (diff)
downloadandroid_packages_apps_Trebuchet-b57c893db8c567ffeeb3c61f4fb3545c4a256441.tar.gz
android_packages_apps_Trebuchet-b57c893db8c567ffeeb3c61f4fb3545c4a256441.tar.bz2
android_packages_apps_Trebuchet-b57c893db8c567ffeeb3c61f4fb3545c4a256441.zip
Removing some TODOs with proper system API
Change-Id: I0d0e667cd6af8a7b9dbf3d0fd417f009ae402519
Diffstat (limited to 'src/com/android/launcher3/shortcuts')
-rw-r--r--src/com/android/launcher3/shortcuts/DeepShortcutManager.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutManager.java b/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
index 49d6fa932..9037af4d2 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
@@ -42,13 +42,8 @@ import java.util.List;
public class DeepShortcutManager {
private static final String TAG = "DeepShortcutManager";
- // TODO: Replace this with platform constants when the new sdk is available.
- public static final int FLAG_MATCH_DYNAMIC = 1 << 0;
- public static final int FLAG_MATCH_MANIFEST = 1 << 3;
- public static final int FLAG_MATCH_PINNED = 1 << 1;
-
- private static final int FLAG_GET_ALL =
- FLAG_MATCH_DYNAMIC | FLAG_MATCH_PINNED | FLAG_MATCH_MANIFEST;
+ private static final int FLAG_GET_ALL = ShortcutQuery.FLAG_MATCH_DYNAMIC
+ | ShortcutQuery.FLAG_MATCH_MANIFEST | ShortcutQuery.FLAG_MATCH_PINNED;
private final LauncherApps mLauncherApps;
private boolean mWasLastCallSuccess;
@@ -86,7 +81,7 @@ public class DeepShortcutManager {
*/
public List<ShortcutInfoCompat> queryForShortcutsContainer(ComponentName activity,
List<String> ids, UserHandleCompat user) {
- return query(FLAG_MATCH_MANIFEST | FLAG_MATCH_DYNAMIC,
+ return query(ShortcutQuery.FLAG_MATCH_MANIFEST | ShortcutQuery.FLAG_MATCH_DYNAMIC,
activity.getPackageName(), activity, ids, user);
}
@@ -172,7 +167,7 @@ public class DeepShortcutManager {
*/
public List<ShortcutInfoCompat> queryForPinnedShortcuts(String packageName,
UserHandleCompat user) {
- return query(FLAG_MATCH_PINNED, packageName, null, null, user);
+ return query(ShortcutQuery.FLAG_MATCH_PINNED, packageName, null, null, user);
}
public List<ShortcutInfoCompat> queryForAllShortcuts(UserHandleCompat user) {