diff --git a/applications/services/power/power_service/power.c b/applications/services/power/power_service/power.c index 7badb7103..39724910c 100644 --- a/applications/services/power/power_service/power.c +++ b/applications/services/power/power_service/power.c @@ -300,9 +300,11 @@ static void power_loader_callback(const void* message, void* context) { Power* power = context; const LoaderEvent* event = message; - if(event->type == LoaderEventTypeApplicationStarted) { + if(event->type == LoaderEventTypeApplicationBeforeLoad) { power_auto_shutdown_inhibit(power); - } else if(event->type == LoaderEventTypeApplicationStopped) { + } else if( + event->type == LoaderEventTypeApplicationLoadFailed || + event->type == LoaderEventTypeApplicationStopped) { power_auto_shutdown_arm(power); } }