Handle call notification the same way than other notifications.

Display the call notifications in the Notification app, with buttons to accept/reject the call.
This commit is contained in:
Jean-François Milants
2021-01-24 17:22:39 +01:00
parent 6d76dbc911
commit 219bafb01a
13 changed files with 198 additions and 90 deletions

View File

@@ -40,13 +40,12 @@ SystemTask::SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd,
Components::LittleVgl &lvgl,
Controllers::Battery &batteryController, Controllers::Ble &bleController,
Controllers::DateTime &dateTimeController,
Pinetime::Controllers::NotificationManager& notificationManager,
Pinetime::Drivers::Hrs3300& heartRateSensor) :
spi{spi}, lcd{lcd}, spiNorFlash{spiNorFlash},
twiMaster{twiMaster}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController},
heartRateController{*this},
bleController{bleController}, dateTimeController{dateTimeController},
watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager},
watchdog{}, watchdogView{watchdog},
heartRateSensor{heartRateSensor},
nimbleController(*this, bleController,dateTimeController, notificationManager, batteryController, spiNorFlash, heartRateController) {
systemTasksMsgQueue = xQueueCreate(10, 1);
@@ -161,10 +160,6 @@ void SystemTask::Work() {
if(isSleeping && !isWakingUp) GoToRunning();
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::NewNotification);
break;
case Messages::OnNewCall:
if(isSleeping && !isWakingUp) GoToRunning();
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::NewCall);
break;
case Messages::BleConnected:
ReloadIdleTimer();
isBleDiscoveryTimerRunning = true;

View File

@@ -37,7 +37,6 @@ namespace Pinetime {
Components::LittleVgl &lvgl,
Controllers::Battery &batteryController, Controllers::Ble &bleController,
Controllers::DateTime &dateTimeController,
Pinetime::Controllers::NotificationManager& manager,
Pinetime::Drivers::Hrs3300& heartRateSensor);
@@ -73,7 +72,7 @@ namespace Pinetime {
std::atomic<bool> isWakingUp{false};
Pinetime::Drivers::Watchdog watchdog;
Pinetime::Drivers::WatchdogView watchdogView;
Pinetime::Controllers::NotificationManager& notificationManager;
Pinetime::Controllers::NotificationManager notificationManager;
Pinetime::Drivers::Hrs3300& heartRateSensor;
Pinetime::Controllers::NimbleController nimbleController;