summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/ShortcutInfo.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-07-22 13:48:29 -0700
committerSunny Goyal <sunnygoyal@google.com>2014-08-01 14:45:39 -0700
commite755d469d40b95e763a9dcb67d0e4f511d1948dd (patch)
treeefeb5b14ebf555a41f37bac96b8eb198e61c7899 /src/com/android/launcher3/ShortcutInfo.java
parentc5b6ac7215329d9f827731a43c330451f38b9965 (diff)
downloadandroid_packages_apps_Trebuchet-e755d469d40b95e763a9dcb67d0e4f511d1948dd.tar.gz
android_packages_apps_Trebuchet-e755d469d40b95e763a9dcb67d0e4f511d1948dd.tar.bz2
android_packages_apps_Trebuchet-e755d469d40b95e763a9dcb67d0e4f511d1948dd.zip
Implementing a package install progress listener for L
issue: 15835307 Change-Id: I71aaea087963f2e0e1206447190cbe23c174057d
Diffstat (limited to 'src/com/android/launcher3/ShortcutInfo.java')
-rw-r--r--src/com/android/launcher3/ShortcutInfo.java29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java
index dc019b272..612b0a5aa 100644
--- a/src/com/android/launcher3/ShortcutInfo.java
+++ b/src/com/android/launcher3/ShortcutInfo.java
@@ -42,13 +42,7 @@ public class ShortcutInfo extends ItemInfo {
public static final int PACKAGE_STATE_DEFAULT = 0;
/** {@link #mState} meaning some external entity has promised to install this package. */
- public static final int PACKAGE_STATE_ENQUEUED = 1;
-
- /** {@link #mState} meaning but some external entity is downloading this package. */
- public static final int PACKAGE_STATE_DOWNLOADING = 2;
-
- /** {@link #mState} meaning some external entity is installing this package. */
- public static final int PACKAGE_STATE_INSTALLING = 3;
+ public static final int PACKAGE_STATE_INSTALLING = 1;
/**
* The intent used to start the application.
@@ -89,6 +83,11 @@ public class ShortcutInfo extends ItemInfo {
*/
protected int mState;
+ /**
+ * The installation progress [0-100] of the package that this shortcut represents.
+ */
+ protected int mProgress;
+
long firstInstallTime;
int flags = 0;
@@ -237,16 +236,24 @@ public class ShortcutInfo extends ItemInfo {
public boolean isAbandoned() {
return isPromise()
- && (mState == ShortcutInfo.PACKAGE_STATE_ERROR
- || mState == ShortcutInfo.PACKAGE_STATE_UNKNOWN);
+ && (mState == PACKAGE_STATE_ERROR
+ || mState == PACKAGE_STATE_UNKNOWN);
}
- public int getState() {
- return mState;
+ public int getProgress() {
+ return mProgress;
+ }
+
+ public void setProgress(int progress) {
+ mProgress = progress;
}
public void setState(int state) {
mState = state;
}
+
+ public int getState() {
+ return mState;
+ }
}