mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 08:05:55 +01:00
Pebble: Fix error when reinstalling apps, useful for upgrading/downgrading
Fixes #65
This commit is contained in:
parent
4f8a7ea64d
commit
efac912929
@ -3,6 +3,7 @@
|
|||||||
####Next Version
|
####Next Version
|
||||||
* Pebble: Support launching of Watchapps though the AppManager Activity
|
* Pebble: Support launching of Watchapps though the AppManager Activity
|
||||||
* Pebble: Fix firmware installation when all 8 app slots are in use (and probably firmware installation form recovery)
|
* Pebble: Fix firmware installation when all 8 app slots are in use (and probably firmware installation form recovery)
|
||||||
|
* Pebble: Fix error when reinstalling apps, useful for upgrading/downgrading
|
||||||
* Pebble: Support CM 12.1 Music App
|
* Pebble: Support CM 12.1 Music App
|
||||||
* Mi Band: Make vibration count configurable for different kinds of Notifications
|
* Mi Band: Make vibration count configurable for different kinds of Notifications
|
||||||
* Support rebooting Mi Band/Pebble through the Debug Activity
|
* Support rebooting Mi Band/Pebble through the Debug Activity
|
||||||
|
@ -318,13 +318,31 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
|||||||
// right now on the Pebble we also receive this on a failed/successful installation ;/
|
// right now on the Pebble we also receive this on a failed/successful installation ;/
|
||||||
switch (appMgmtRes.result) {
|
switch (appMgmtRes.result) {
|
||||||
case FAILURE:
|
case FAILURE:
|
||||||
LOG.info("failure removing app"); // TODO: report to AppManager
|
if (mIsInstalling) {
|
||||||
finishInstall(true);
|
if (mInstallState == PebbleAppInstallState.WAIT_SLOT) {
|
||||||
|
// get the free slot
|
||||||
|
writeInstallApp(mPebbleProtocol.encodeAppInfoReq());
|
||||||
|
} else {
|
||||||
|
finishInstall(true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG.info("failure removing app");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
finishInstall(false);
|
if (mIsInstalling) {
|
||||||
// refresh app list
|
if (mInstallState == PebbleAppInstallState.WAIT_SLOT) {
|
||||||
write(mPebbleProtocol.encodeAppInfoReq());
|
// get the free slot
|
||||||
|
writeInstallApp(mPebbleProtocol.encodeAppInfoReq());
|
||||||
|
} else {
|
||||||
|
finishInstall(false);
|
||||||
|
// refresh app list
|
||||||
|
write(mPebbleProtocol.encodeAppInfoReq());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG.info("successfully removed app");
|
||||||
|
write(mPebbleProtocol.encodeAppInfoReq());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -397,7 +415,7 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
|||||||
mInstallSlot = 0;
|
mInstallSlot = 0;
|
||||||
mInstallState = PebbleAppInstallState.START_INSTALL;
|
mInstallState = PebbleAppInstallState.START_INSTALL;
|
||||||
} else {
|
} else {
|
||||||
writeInstallApp(mPebbleProtocol.encodeAppInfoReq());
|
writeInstallApp(mPebbleProtocol.encodeAppDelete(mPBWReader.getGBDeviceApp().getUUID()));
|
||||||
mInstallState = PebbleAppInstallState.WAIT_SLOT;
|
mInstallState = PebbleAppInstallState.WAIT_SLOT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user