Pebble: Bugfix for beeing stuck while waiting for a slot, when none is available
This commit is contained in:
parent
31b01d860f
commit
01e96f9c8d
|
@ -73,7 +73,7 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
||||||
private PebbleAppInstallState mInstallState = PebbleAppInstallState.UNKNOWN;
|
private PebbleAppInstallState mInstallState = PebbleAppInstallState.UNKNOWN;
|
||||||
private PebbleInstallable[] mPebbleInstallables = null;
|
private PebbleInstallable[] mPebbleInstallables = null;
|
||||||
private int mCurrentInstallableIndex = -1;
|
private int mCurrentInstallableIndex = -1;
|
||||||
private int mInstallSlot = -1;
|
private int mInstallSlot = -2;
|
||||||
private int mCRC = -1;
|
private int mCRC = -1;
|
||||||
|
|
||||||
public static Notification createInstallNotification(String text, boolean ongoing, Context context) {
|
public static Notification createInstallNotification(String text, boolean ongoing, Context context) {
|
||||||
|
@ -139,7 +139,10 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
||||||
if (mIsInstalling) {
|
if (mIsInstalling) {
|
||||||
switch (mInstallState) {
|
switch (mInstallState) {
|
||||||
case APP_WAIT_SLOT:
|
case APP_WAIT_SLOT:
|
||||||
if (mInstallSlot != -1) {
|
if (mInstallSlot == -1) {
|
||||||
|
finishInstall(true); // no slots available
|
||||||
|
}
|
||||||
|
else if (mInstallSlot >= 0) {
|
||||||
updateInstallNotification("starting installation", true, getContext());
|
updateInstallNotification("starting installation", true, getContext());
|
||||||
mInstallState = PebbleAppInstallState.APP_START_INSTALL;
|
mInstallState = PebbleAppInstallState.APP_START_INSTALL;
|
||||||
continue;
|
continue;
|
||||||
|
@ -460,7 +463,7 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
||||||
mIsInstalling = false;
|
mIsInstalling = false;
|
||||||
mZis = null;
|
mZis = null;
|
||||||
mAppInstallToken = -1;
|
mAppInstallToken = -1;
|
||||||
mInstallSlot = -1;
|
mInstallSlot = -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void quit() {
|
public void quit() {
|
||||||
|
|
Loading…
Reference in New Issue