1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 12:26:48 +01:00

Workaround for non-working outgoing call display. Fixes #6.

This is still a bit ugly because we cannot (yet?) detect whether remote has
taken the call or not. So we will start counting in-call time from the moment
we start dialling.
This commit is contained in:
Andreas Shimokawa 2015-03-07 14:40:59 +01:00
parent e52e26168a
commit 4e7553836b

View File

@ -175,8 +175,19 @@ public class PebbleProtocol {
pebbleCmd = PHONECONTROL_INCOMINGCALL;
break;
case CALL_OUTGOING:
pebbleCmd = PHONECONTROL_OUTGOINGCALL;
break;
// pebbleCmd = PHONECONTROL_OUTGOINGCALL;
/*
* HACK/WORKAROUND for non-working outgoing call display.
* Just send a incoming call command immediately followed by a start call command
* This prevents vibration of the Pebble.
*/
byte[] callmsg = encodeMessage(ENDPOINT_PHONECONTROL, PHONECONTROL_INCOMINGCALL, 0, parts);
byte[] startmsg = encodeMessage(ENDPOINT_PHONECONTROL, PHONECONTROL_START, 0, parts);
byte[] msg = new byte[callmsg.length + startmsg.length];
System.arraycopy(callmsg, 0, msg, 0, callmsg.length);
System.arraycopy(startmsg, 0, msg, startmsg.length, startmsg.length);
return msg;
// END HACK
default:
return null;
}