Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92b03051 authored by Keun-young Park's avatar Keun-young Park
Browse files

do not start shutdown animation from init

- init will only keep animation related services as shutdown critical.
- external component like system server can start shutdown animation.

bug: 37500823
Test: reboot

(cherry picked from commit e2b04b71)

Change-Id: I9a0432148887557b705d6b8bbe35f5fb1ffad5b9
parent 57e3528d
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -341,18 +341,9 @@ void DoReboot(unsigned int cmd, const std::string& reason, const std::string& re
    Service* bootAnim = ServiceManager::GetInstance().FindServiceByName("bootanim");
    Service* surfaceFlinger = ServiceManager::GetInstance().FindServiceByName("surfaceflinger");
    if (bootAnim != nullptr && surfaceFlinger != nullptr && surfaceFlinger->IsRunning()) {
        property_set("service.bootanim.exit", "0");
        // Could be in the middle of animation. Stop and start so that it can pick
        // up the right mode.
        bootAnim->Stop();
        // start all animation classes if stopped.
        ServiceManager::GetInstance().ForEachServiceInClass("animation", [](Service* s) {
            s->Start();
            s->SetShutdownCritical();  // will not check animation class separately
        });
        bootAnim->Start();
        surfaceFlinger->SetShutdownCritical();
        bootAnim->SetShutdownCritical();
    }

    // optional shutdown step