summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/ShortcutInfo.java
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2014-02-14 16:59:24 -0500
committerChris Wren <cwren@android.com>2014-03-11 13:41:05 -0400
commitaeff7ea43409d817490fbb8c22b8d4b9725bb54f (patch)
tree15d620ddc1b70e02d82852aae7000b69935c6c5c /src/com/android/launcher3/ShortcutInfo.java
parentbfbd52a5e618a86dc7a13bb5e4866759e181a7cb (diff)
downloadandroid_packages_apps_Trebuchet-aeff7ea43409d817490fbb8c22b8d4b9725bb54f.tar.gz
android_packages_apps_Trebuchet-aeff7ea43409d817490fbb8c22b8d4b9725bb54f.tar.bz2
android_packages_apps_Trebuchet-aeff7ea43409d817490fbb8c22b8d4b9725bb54f.zip
update promise icon status
also fix a crash in LauncherModel.DEBUG_LOADERS Bug: 10778992 Change-Id: Iafc28c1e0c2f2a1283783a7ce27e181634b62993
Diffstat (limited to 'src/com/android/launcher3/ShortcutInfo.java')
-rw-r--r--src/com/android/launcher3/ShortcutInfo.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java
index 13e3ef216..ede31758f 100644
--- a/src/com/android/launcher3/ShortcutInfo.java
+++ b/src/com/android/launcher3/ShortcutInfo.java
@@ -33,6 +33,24 @@ import java.util.ArrayList;
*/
public class ShortcutInfo extends ItemInfo {
+ /** This package is not installed, and there is no other information available. */
+ public static final int PACKAGE_STATE_UNKNOWN = -2;
+
+ /** This package is not installed, because installation failed. */
+ public static final int PACKAGE_STATE_ERROR = -1;
+
+ /** This package is installed. This is the typical case */
+ public static final int PACKAGE_STATE_DEFAULT = 0;
+
+ /** This package is not installed, but some external entity has promised to install it. */
+ public static final int PACKAGE_STATE_ENQUEUED = 1;
+
+ /** This package is not installed, but some external entity is downloading it. */
+ public static final int PACKAGE_STATE_DOWNLOADING = 2;
+
+ /** This package is not installed, but some external entity is installing it. */
+ public static final int PACKAGE_STATE_INSTALLING = 3;
+
/**
* The intent used to start the application.
*/
@@ -219,5 +237,15 @@ public class ShortcutInfo extends ItemInfo {
+ " customIcon=" + info.customIcon);
}
}
+
+ public boolean isPromise() {
+ return restoredIntent != null;
+ }
+
+ public boolean isPromiseFor(String pkgName) {
+ return restoredIntent != null
+ && pkgName != null
+ && pkgName.equals(restoredIntent.getComponent().getPackageName());
+ }
}