From 0c872a920ebe3810d5784d93bd08af8faa08b45e Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Mon, 17 Aug 2015 22:49:53 +0200 Subject: [PATCH] Pebble: always set token to -1 before waiting for a new one This could fix potential problems with app installation --- .../gadgetbridge/service/devices/pebble/PebbleIoThread.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleIoThread.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleIoThread.java index a268d5866..69d49379a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleIoThread.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleIoThread.java @@ -123,6 +123,7 @@ public class PebbleIoThread extends GBDeviceIoThread { mBinarySize = pi.getFileSize(); mBytesWritten = 0; writeInstallApp(mPebbleProtocol.encodeUploadStart(pi.getType(), mInstallSlot, mBinarySize)); + mAppInstallToken = -1; mInstallState = PebbleAppInstallState.WAIT_TOKEN; break; case WAIT_TOKEN: