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

Commit 51156967 authored by Lais Andrade's avatar Lais Andrade
Browse files

Use vibrator_service cmd for dumpstate

The local service "vibrator" was replaced by the new "vibrator_manager".

Fix: 180924179
Test: manual
Change-Id: I9d3921af2b3b0c31767090c86f0a3350a6d45b1a
parent 01833ba2
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -2417,7 +2417,9 @@ static void SendBroadcast(const std::string& action, const std::vector<std::stri


static void Vibrate(int duration_ms) {
static void Vibrate(int duration_ms) {
    // clang-format off
    // clang-format off
    RunCommand("", {"cmd", "vibrator", "vibrate", "-f", std::to_string(duration_ms), "dumpstate"},
    std::vector<std::string> args = {"cmd", "vibrator_manager", "synced", "-f", "-d", "dumpstate",
                                     "oneshot", std::to_string(duration_ms)};
    RunCommand("", args,
               CommandOptions::WithTimeout(10)
               CommandOptions::WithTimeout(10)
                   .Log("Vibrate: '%s'\n")
                   .Log("Vibrate: '%s'\n")
                   .Always()
                   .Always()