From 3441192d19fbf42700c5a5a9f835359fd9505796 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sun, 25 Dec 2016 23:11:49 +0100 Subject: [PATCH] Pebble 2: Fix Pebble Classic FW 3.x app variant being priorized over native Pebble 2 app variant Fixes #475 --- .../gadgetbridge/devices/pebble/PBWReader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/pebble/PBWReader.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/pebble/PBWReader.java index 3e3b4710..53be8a97 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/pebble/PBWReader.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/pebble/PBWReader.java @@ -124,10 +124,12 @@ public class PBWReader { ZipInputStream zis = new ZipInputStream(afin); ZipEntry ze; + boolean found = false; try { while ((ze = zis.getNextEntry()) != null) { if (ze.getName().startsWith(dir)) { platformDir = dir; + found = true; break; } } @@ -135,6 +137,9 @@ public class PBWReader { } catch (IOException e) { e.printStackTrace(); } + if (found) { + break; + } } if (platform.equals("chalk") && platformDir.equals("")) {