diff options
| author | petter <39340152+petterhs@users.noreply.github.com> | 2021-01-27 12:45:06 (GMT) |
|---|---|---|
| committer | petter <39340152+petterhs@users.noreply.github.com> | 2021-01-27 16:07:46 (GMT) |
| commit | d4c31bcbbe2f8b6d2e6c45203193745f9cb2a41b (patch) | |
| tree | fb77f1c235e86233b5f6c6046dbfe646749467fa /src/components/ble/AlertNotificationService.cpp | |
| parent | 523398d24a326a36784e9b28c9f3309a17df9363 (diff) | |
add mute button and functionality for call notification + new button icons
Diffstat (limited to 'src/components/ble/AlertNotificationService.cpp')
| -rw-r--r-- | src/components/ble/AlertNotificationService.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/ble/AlertNotificationService.cpp b/src/components/ble/AlertNotificationService.cpp index 5fb8338..0639119 100644 --- a/src/components/ble/AlertNotificationService.cpp +++ b/src/components/ble/AlertNotificationService.cpp @@ -118,3 +118,16 @@ void AlertNotificationService::RejectIncomingCall() { ble_gattc_notify_custom(connectionHandle, eventHandle, om); } + +void AlertNotificationService::MuteIncomingCall() { + auto response = IncomingCallResponses::Mute; + auto *om = ble_hs_mbuf_from_flat(&response, 1); + + uint16_t connectionHandle = systemTask.nimble().connHandle(); + + if (connectionHandle == 0 || connectionHandle == BLE_HS_CONN_HANDLE_NONE) { + return; + } + + ble_gattc_notify_custom(connectionHandle, eventHandle, om); +}
\ No newline at end of file |
