[FL-2515] Keep backlight on for updater ops (#1184)
* [FL-2515] Keep backlight on for updater ops * Notification: Renamed backlight sequences to more obvious names Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -25,6 +25,7 @@ static void sd_mount_callback(const void* message, void* context) {
|
||||
|
||||
void updater_scene_main_on_enter(void* context) {
|
||||
Updater* updater = (Updater*)context;
|
||||
notification_message(updater->notification, &sequence_display_backlight_enforce_on);
|
||||
UpdaterMainView* main_view = updater->main_view;
|
||||
|
||||
FuriPubSubSubscription* sub =
|
||||
@@ -92,8 +93,9 @@ bool updater_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
void updater_scene_main_on_exit(void* context) {
|
||||
Updater* updater = (Updater*)context;
|
||||
|
||||
notification_message(updater->notification, &sequence_display_backlight_enforce_auto);
|
||||
furi_pubsub_unsubscribe(
|
||||
storage_get_pubsub(updater->storage), updater_main_get_storage_pubsub(updater->main_view));
|
||||
|
||||
scene_manager_set_scene_state(updater->scene_manager, UpdaterSceneMain, 0);
|
||||
}
|
||||
}
|
||||
|
@@ -47,6 +47,7 @@ Updater* updater_alloc(const char* arg) {
|
||||
}
|
||||
|
||||
updater->storage = furi_record_open("storage");
|
||||
updater->notification = furi_record_open("notification");
|
||||
|
||||
updater->gui = furi_record_open("gui");
|
||||
updater->view_dispatcher = view_dispatcher_alloc();
|
||||
@@ -119,6 +120,7 @@ void updater_free(Updater* updater) {
|
||||
|
||||
furi_record_close("gui");
|
||||
furi_record_close("storage");
|
||||
furi_record_close("notification");
|
||||
|
||||
free(updater);
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#include <gui/scene_manager.h>
|
||||
#include <gui/modules/widget.h>
|
||||
#include <storage/storage.h>
|
||||
#include <notification/notification_app.h>
|
||||
#include <update_util/update_operation.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -41,6 +42,7 @@ typedef struct UpdaterManifestProcessingState {
|
||||
typedef struct {
|
||||
// GUI
|
||||
Gui* gui;
|
||||
NotificationApp* notification;
|
||||
SceneManager* scene_manager;
|
||||
ViewDispatcher* view_dispatcher;
|
||||
Storage* storage;
|
||||
|
Reference in New Issue
Block a user