1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-25 03:16:51 +01:00

Merge branch 'master' into feature-weather

This commit is contained in:
Andreas Shimokawa 2016-12-09 23:29:54 +01:00
commit a0e21d7c6d

View File

@ -2233,17 +2233,17 @@ public class PebbleProtocol extends GBDeviceProtocol {
switch (pebbleCmd) { switch (pebbleCmd) {
case APPLICATIONMESSAGE_PUSH: case APPLICATIONMESSAGE_PUSH:
if (endpoint == ENDPOINT_LAUNCHER) { LOG.info((endpoint == ENDPOINT_LAUNCHER ? "got LAUNCHER PUSH from UUID : " : "got APPLICATIONMESSAGE PUSH from UUID : ") + uuid);
LOG.info("got LAUNCHER PUSH from UUID " + uuid);
break;
}
LOG.info("got APPLICATIONMESSAGE PUSH from UUID " + uuid);
AppMessageHandler handler = mAppMessageHandlers.get(uuid); AppMessageHandler handler = mAppMessageHandlers.get(uuid);
if (handler != null) { if (handler != null) {
if (handler.isEnabled()) { if (handler.isEnabled()) {
ArrayList<Pair<Integer, Object>> dict = decodeDict(buf); if (endpoint == ENDPOINT_APPLICATIONMESSAGE) {
devEvts = handler.handleMessage(dict); ArrayList<Pair<Integer, Object>> dict = decodeDict(buf);
devEvts = handler.handleMessage(dict);
}
else {
devEvts = handler.pushMessage();
}
} else { } else {
devEvts = new GBDeviceEvent[]{null}; devEvts = new GBDeviceEvent[]{null};
} }