summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-12-15 17:40:07 -0800
committerSunny Goyal <sunnygoyal@google.com>2017-01-03 15:58:53 -0800
commit3fe4a146cf774261ab3552dd8ab392439c771e54 (patch)
tree5df73ef8f1166bfa827f46bb40a99974e8246cca /src/com/android/launcher3/shortcuts
parentbf8a265deb093e147a5289e0958cc9b1bc50a6e3 (diff)
downloadandroid_packages_apps_Trebuchet-3fe4a146cf774261ab3552dd8ab392439c771e54.tar.gz
android_packages_apps_Trebuchet-3fe4a146cf774261ab3552dd8ab392439c771e54.tar.bz2
android_packages_apps_Trebuchet-3fe4a146cf774261ab3552dd8ab392439c771e54.zip
Simplifying IconCache access code
Providing a way to access icon cache without LauncherAcitivtiyInfo. This allows fetching LauncherActivityInfo only when required, thus avoiding system RPC when the icon is already in cache. Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
Diffstat (limited to 'src/com/android/launcher3/shortcuts')
-rw-r--r--src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java6
-rw-r--r--src/com/android/launcher3/shortcuts/ShortcutKey.java6
2 files changed, 3 insertions, 9 deletions
diff --git a/src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java b/src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java
index acc632c36..dac216054 100644
--- a/src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java
+++ b/src/com/android/launcher3/shortcuts/ShortcutInfoCompat.java
@@ -25,8 +25,6 @@ import android.os.Build;
import android.os.UserHandle;
import com.android.launcher3.ItemInfo;
-import com.android.launcher3.compat.DeferredLauncherActivityInfo;
-import com.android.launcher3.compat.LauncherActivityInfoCompat;
import com.android.launcher3.compat.UserManagerCompat;
/**
@@ -122,8 +120,4 @@ public class ShortcutInfoCompat {
public String toString() {
return mShortcutInfo.toString();
}
-
- public LauncherActivityInfoCompat getActivityInfo(Context context) {
- return new DeferredLauncherActivityInfo(getActivity(), getUserHandle(), context);
- }
}
diff --git a/src/com/android/launcher3/shortcuts/ShortcutKey.java b/src/com/android/launcher3/shortcuts/ShortcutKey.java
index 8f7266632..e86bfb2b2 100644
--- a/src/com/android/launcher3/shortcuts/ShortcutKey.java
+++ b/src/com/android/launcher3/shortcuts/ShortcutKey.java
@@ -4,7 +4,7 @@ import android.content.ComponentName;
import android.content.Intent;
import android.os.UserHandle;
-import com.android.launcher3.ShortcutInfo;
+import com.android.launcher3.ItemInfo;
import com.android.launcher3.util.ComponentKey;
/**
@@ -32,7 +32,7 @@ public class ShortcutKey extends ComponentKey {
return new ShortcutKey(intent.getPackage(), user, shortcutId);
}
- public static ShortcutKey fromShortcutInfo(ShortcutInfo info) {
- return fromIntent(info.getPromisedIntent(), info.user);
+ public static ShortcutKey fromItemInfo(ItemInfo info) {
+ return fromIntent(info.getIntent(), info.user);
}
}