From 6bbc44bcc9df8f3cd1c5fef2014f7b259e6bd681 Mon Sep 17 00:00:00 2001 From: John Crawford Date: Thu, 19 Oct 2023 17:37:37 -0600 Subject: [PATCH] aod: fix flashlight brightness not being restored --- src/displayapp/DisplayApp.cpp | 3 +++ src/displayapp/Messages.h | 1 + src/systemtask/SystemTask.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 77dd81e964..52abbca8f4 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -245,6 +245,9 @@ void DisplayApp::Refresh() { case Messages::NotifyDeviceActivity: lv_disp_trig_activity(nullptr); break; + case Messages::RestoreBrightness: + RestoreBrightness(); + break; case Messages::GoToRunning: if (settingsController.GetAlwaysOnDisplay()) { lcd.LowPowerOff(); diff --git a/src/displayapp/Messages.h b/src/displayapp/Messages.h index 1418f6bea0..b83520908e 100644 --- a/src/displayapp/Messages.h +++ b/src/displayapp/Messages.h @@ -19,6 +19,7 @@ namespace Pinetime { BleFirmwareUpdateStarted, DimScreen, NotifyDeviceActivity, + RestoreBrightness, ShowPairingKey, AlarmTriggered, Chime, diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index cc863c91d4..72d25bdcbb 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -455,7 +455,7 @@ void SystemTask::HandleButtonAction(Controllers::ButtonActions action) { return; } - displayApp.PushMessage(Pinetime::Applications::Display::Messages::NotifyDeviceActivity); + displayApp.PushMessage(Pinetime::Applications::Display::Messages::RestoreBrightness); using Actions = Controllers::ButtonActions;