use of nodomain.freeyourgadget.gadgetbridge.devices.lefun.commands.FindPhoneCommand in project Gadgetbridge by Freeyourgadget.
the class LefunDeviceSupport method handleAntiLoss.
/**
* Handles find phone request
*
* @param data the response
* @return whether the response has been handled
*/
private boolean handleAntiLoss(byte[] data) {
try {
FindPhoneCommand cmd = new FindPhoneCommand();
cmd.deserialize(data);
GBDeviceEventFindPhone event = new GBDeviceEventFindPhone();
event.event = GBDeviceEventFindPhone.Event.START;
evaluateGBDeviceEvent(event);
return true;
} catch (IllegalArgumentException e) {
LOG.error("Failed to handle anti-loss", e);
return false;
}
}
Aggregations