diff options
author | Winson Chung <winsonc@google.com> | 2012-05-07 10:34:12 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2012-05-07 11:11:52 -0700 |
commit | be365165ed00205265c1876c4829fa9ac630da2a (patch) | |
tree | 0206c9f408de7e2f5760d6210f00761dfc1e040c /src/com/android/launcher2/ApplicationInfo.java | |
parent | 96b8a056f81720e632d07e3467f1528e834f746e (diff) | |
download | android_packages_apps_Trebuchet-be365165ed00205265c1876c4829fa9ac630da2a.tar.gz android_packages_apps_Trebuchet-be365165ed00205265c1876c4829fa9ac630da2a.tar.bz2 android_packages_apps_Trebuchet-be365165ed00205265c1876c4829fa9ac630da2a.zip |
Try and resolve the package name from the intent directly falling back to the resolved component name if it fails. (Bug 6452306)
Change-Id: Ifb2187fb845f807f30df966bf298ffde1b779b46
Diffstat (limited to 'src/com/android/launcher2/ApplicationInfo.java')
-rw-r--r-- | src/com/android/launcher2/ApplicationInfo.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher2/ApplicationInfo.java b/src/com/android/launcher2/ApplicationInfo.java index 1fc1d1f55..281d59c68 100644 --- a/src/com/android/launcher2/ApplicationInfo.java +++ b/src/com/android/launcher2/ApplicationInfo.java @@ -102,6 +102,12 @@ class ApplicationInfo extends ItemInfo { firstInstallTime = info.firstInstallTime; } + /** Returns the package name that the shortcut's intent will resolve to, or an empty string if + * none exists. */ + String getPackageName() { + return super.getPackageName(intent); + } + /** * Creates the application intent based on a component name and various launch flags. * Sets {@link #itemType} to {@link LauncherSettings.BaseLauncherColumns#ITEM_TYPE_APPLICATION}. |