aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/Notifications.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/Notifications.cpp')
-rw-r--r--src/displayapp/screens/Notifications.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index 3a3f5f2b..45f72f2e 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -20,7 +20,7 @@ Notifications::Notifications(DisplayApp* app,
notificationManager {notificationManager},
alertNotificationService {alertNotificationService},
motorController {motorController},
- systemTask {systemTask},
+ wakeLock(systemTask),
mode {mode} {
notificationManager.ClearNewNotificationFlag();
@@ -40,7 +40,7 @@ Notifications::Notifications(DisplayApp* app,
validDisplay = false;
}
if (mode == Modes::Preview) {
- systemTask.PushMessage(System::Messages::DisableSleeping);
+ wakeLock.Lock();
if (notification.category == Controllers::NotificationManager::Categories::IncomingCall) {
motorController.StartRinging();
} else {
@@ -65,7 +65,6 @@ Notifications::~Notifications() {
lv_task_del(taskRefresh);
// make sure we stop any vibrations before exiting
motorController.StopRinging();
- systemTask.PushMessage(System::Messages::EnableSleeping);
lv_obj_clean(lv_scr_act());
}
@@ -120,7 +119,7 @@ void Notifications::Refresh() {
}
void Notifications::OnPreviewInteraction() {
- systemTask.PushMessage(System::Messages::EnableSleeping);
+ wakeLock.Release();
motorController.StopRinging();
if (timeoutLine != nullptr) {
lv_obj_del(timeoutLine);