mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-05 22:15:54 +02:00
Pebble: Propagate watch apps launches outside of PebbleProtocol
This does not do anything yet.
This commit is contained in:
parent
daf6d12c62
commit
31122f0b09
@ -12,12 +12,14 @@ public class GBDeviceEventAppManagement extends GBDeviceEvent {
|
||||
UNKNOWN,
|
||||
INSTALL,
|
||||
DELETE,
|
||||
START,
|
||||
STOP,
|
||||
}
|
||||
|
||||
public enum Event {
|
||||
UNKNOWN,
|
||||
SUCCESS,
|
||||
ACKNOLEDGE,
|
||||
ACKNOWLEDGE,
|
||||
FAILURE,
|
||||
REQUEST,
|
||||
}
|
||||
|
@ -562,6 +562,9 @@ class PebbleIoThread extends GBDeviceIoThread {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case START:
|
||||
LOG.info("got GBDeviceEventAppManagement START event for uuid: " + appMgmt.uuid);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1915,7 +1915,13 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
if (handler != null) {
|
||||
return handler.pushMessage();
|
||||
}
|
||||
break;
|
||||
else {
|
||||
GBDeviceEventAppManagement gbDeviceEventAppManagement = new GBDeviceEventAppManagement();
|
||||
gbDeviceEventAppManagement.uuid = uuid;
|
||||
gbDeviceEventAppManagement.type = GBDeviceEventAppManagement.EventType.START;
|
||||
gbDeviceEventAppManagement.event = GBDeviceEventAppManagement.Event.SUCCESS;
|
||||
return new GBDeviceEvent[] {gbDeviceEventAppManagement};
|
||||
}
|
||||
case APPRUNSTATE_STOP:
|
||||
LOG.info(ENDPOINT_NAME + ": stopped " + uuid);
|
||||
break;
|
||||
@ -2246,9 +2252,18 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
if (endpoint == ENDPOINT_APPLICATIONMESSAGE) {
|
||||
devEvts = decodeDictToJSONAppMessage(uuid, buf);
|
||||
}
|
||||
else {
|
||||
GBDeviceEventAppManagement gbDeviceEventAppManagement = new GBDeviceEventAppManagement();
|
||||
gbDeviceEventAppManagement.uuid = uuid;
|
||||
gbDeviceEventAppManagement.type = GBDeviceEventAppManagement.EventType.START;
|
||||
gbDeviceEventAppManagement.event = GBDeviceEventAppManagement.Event.SUCCESS;
|
||||
devEvts = new GBDeviceEvent[] {gbDeviceEventAppManagement};
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
LOG.error(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user