mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 10:35:50 +01:00
PineTime: Display app name for VoIP app calls
This commit is contained in:
parent
5d15df0751
commit
c4bc43d918
@ -406,7 +406,14 @@ public class PineTimeJFSupport extends AbstractBTLEDeviceSupport implements DfuL
|
|||||||
public void onSetCallState(CallSpec callSpec) {
|
public void onSetCallState(CallSpec callSpec) {
|
||||||
if (callSpec.command == CallSpec.CALL_INCOMING) {
|
if (callSpec.command == CallSpec.CALL_INCOMING) {
|
||||||
TransactionBuilder builder = new TransactionBuilder("incomingcall");
|
TransactionBuilder builder = new TransactionBuilder("incomingcall");
|
||||||
String message = (byte) 0x01 + callSpec.name;
|
|
||||||
|
String message;
|
||||||
|
if (isFirmwareAtLeastVersion0_15() && callSpec.sourceName != null) {
|
||||||
|
message = (byte) 0x01 + callSpec.sourceName + "\0" + callSpec.name;
|
||||||
|
} else {
|
||||||
|
message = (byte) 0x01 + callSpec.name;
|
||||||
|
}
|
||||||
|
|
||||||
NewAlert alert = new NewAlert(AlertCategory.IncomingCall, 1, message);
|
NewAlert alert = new NewAlert(AlertCategory.IncomingCall, 1, message);
|
||||||
AlertNotificationProfile<?> profile = new AlertNotificationProfile<>(this);
|
AlertNotificationProfile<?> profile = new AlertNotificationProfile<>(this);
|
||||||
profile.setMaxLength(MaxNotificationLength);
|
profile.setMaxLength(MaxNotificationLength);
|
||||||
|
Loading…
Reference in New Issue
Block a user