update promise icon status

also fix a crash in LauncherModel.DEBUG_LOADERS

Bug: 10778992
Change-Id: Iafc28c1e0c2f2a1283783a7ce27e181634b62993
This commit is contained in:
Chris Wren committed 2014-03-11 13:41:05 -04:00
1 parent bfbd52a5e6
commit aeff7ea434
9 files changed
+268 -64

No files matched your search

@@ -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());
}
}