From 07533c520c428932945cdbdc73c25fe27bd376e2 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 2 Jun 2023 12:00:12 -0700 Subject: [PATCH] init: Fix ramdump when enabling shutdown animations. Fix a bug where services weren't stopped properly if shutdown animations were enabled. Bug: 285241485 Test: Pixel w/ ro.init.shutdown_animation=true Change-Id: I7f35572b5223f03f3f5a341fa7b5e90c01d56ce3 --- init/reboot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init/reboot.cpp b/init/reboot.cpp index 27a7876db..3351c4c45 100644 --- a/init/reboot.cpp +++ b/init/reboot.cpp @@ -680,8 +680,8 @@ static void DoReboot(unsigned int cmd, const std::string& reason, const std::str << "': " << result.error(); } s->SetShutdownCritical(); - } else if (do_shutdown_animation) { - continue; + } else if (do_shutdown_animation && s->classnames().count("animation") > 0) { + // Need these for shutdown animations. } else if (s->IsShutdownCritical()) { // Start shutdown critical service if not started. if (auto result = s->Start(); !result.ok()) {