From b57c893db8c567ffeeb3c61f4fb3545c4a256441 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Fri, 30 Sep 2016 12:18:25 -0700 Subject: Removing some TODOs with proper system API Change-Id: I0d0e667cd6af8a7b9dbf3d0fd417f009ae402519 --- .../android/launcher3/shortcuts/DeepShortcutManager.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/com/android/launcher3/shortcuts') 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 queryForShortcutsContainer(ComponentName activity, List 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 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 queryForAllShortcuts(UserHandleCompat user) { -- cgit v1.2.3