mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 03:07:32 +01:00
add ignoring calls support to Amazfit Bip (probably Cor also and maybe Mi Band 3)
This commit is contained in:
parent
e066e0fae3
commit
12e16ac04a
@ -1056,7 +1056,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
|
|||||||
currentButtonPressTime = System.currentTimeMillis();
|
currentButtonPressTime = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleDeviceEvent(byte[] value) {
|
private void handleDeviceEvent(byte[] value) {
|
||||||
if (value == null || value.length == 0) {
|
if (value == null || value.length == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1064,13 +1064,14 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
|
|||||||
|
|
||||||
switch (value[0]) {
|
switch (value[0]) {
|
||||||
case HuamiDeviceEvent.CALL_REJECT:
|
case HuamiDeviceEvent.CALL_REJECT:
|
||||||
|
LOG.info("call rejected");
|
||||||
callCmd.event = GBDeviceEventCallControl.Event.REJECT;
|
callCmd.event = GBDeviceEventCallControl.Event.REJECT;
|
||||||
evaluateGBDeviceEvent(callCmd);
|
evaluateGBDeviceEvent(callCmd);
|
||||||
break;
|
break;
|
||||||
case HuamiDeviceEvent.CALL_IGNORE:
|
case HuamiDeviceEvent.CALL_IGNORE:
|
||||||
LOG.info("ignore call (not yet supported)");
|
LOG.info("call ignored");
|
||||||
//callCmd.event = GBDeviceEventCallControl.Event.IGNORE;
|
callCmd.event = GBDeviceEventCallControl.Event.IGNORE;
|
||||||
//evaluateGBDeviceEvent(callCmd);
|
evaluateGBDeviceEvent(callCmd);
|
||||||
break;
|
break;
|
||||||
case HuamiDeviceEvent.BUTTON_PRESSED:
|
case HuamiDeviceEvent.BUTTON_PRESSED:
|
||||||
LOG.info("button pressed");
|
LOG.info("button pressed");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user