diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-04-02 10:27:03 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-04-10 19:01:32 -0700 |
commit | 0b037789662d1c16627dc5b509d1ac55bc76971b (patch) | |
tree | 7d6d8d9d7b175f9c10fbfa69f60d09c5929fc299 /src/com/android/launcher3/compat | |
parent | 85e3d4cc5ea4e554639868069f4fd409731f7bbb (diff) | |
download | android_packages_apps_Trebuchet-0b037789662d1c16627dc5b509d1ac55bc76971b.tar.gz android_packages_apps_Trebuchet-0b037789662d1c16627dc5b509d1ac55bc76971b.tar.bz2 android_packages_apps_Trebuchet-0b037789662d1c16627dc5b509d1ac55bc76971b.zip |
Deduping shortcuts to app-shortcuts if they have a valid intent
> Only deduping shortcuts for the primary user as custom shortcuts
for secondary users is not supported.
Change-Id: If129dee64a395602006ebb996d4b09b93b89084f
Diffstat (limited to 'src/com/android/launcher3/compat')
-rw-r--r-- | src/com/android/launcher3/compat/LauncherActivityInfoCompat.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/launcher3/compat/LauncherActivityInfoCompat.java b/src/com/android/launcher3/compat/LauncherActivityInfoCompat.java index 90a4d1a1f..07ef0efb7 100644 --- a/src/com/android/launcher3/compat/LauncherActivityInfoCompat.java +++ b/src/com/android/launcher3/compat/LauncherActivityInfoCompat.java @@ -17,7 +17,9 @@ package com.android.launcher3.compat; import android.content.ComponentName; +import android.content.Context; import android.content.pm.ApplicationInfo; +import android.content.pm.ResolveInfo; import android.graphics.drawable.Drawable; public abstract class LauncherActivityInfoCompat { @@ -32,4 +34,11 @@ public abstract class LauncherActivityInfoCompat { public abstract ApplicationInfo getApplicationInfo(); public abstract long getFirstInstallTime(); public abstract Drawable getBadgedIcon(int density); + + /** + * Creates a LauncherActivityInfoCompat for the primary user. + */ + public static LauncherActivityInfoCompat fromResolveInfo(ResolveInfo info, Context context) { + return new LauncherActivityInfoCompatV16(context, info); + } } |