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

Commit 06b27332 authored by Priyanka Advani (xWF)'s avatar Priyanka Advani (xWF) Committed by Android (Google) Code Review
Browse files

Revert "Make sure to set SVC_CRITICAL regardless of other agrs"

This reverts commit e9051637.

Reason for revert: Droidmonitor created revert due to b/414717084. Will be verifying through ABTD before submission.

Bug: 410865568
Fix: 414717084
Fix: 407187416
Change-Id: I339d7c4fbd0efc25898c1e1e725d141345ac58b7
parent e9051637
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -112,28 +112,24 @@ Result<void> ServiceParser::ParseCritical(std::vector<std::string>&& args) {
    for (auto it = args.begin() + 1; it != args.end(); ++it) {
        auto arg = android::base::Split(*it, "=");
        if (arg.size() != 2) {
            LOG(ERROR) << "critical: Argument '" << *it << "' is not supported";
            continue;
            return Error() << "critical: Argument '" << *it << "' is not supported";
        } else if (arg[0] == "target") {
            fatal_reboot_target = arg[1];
        } else if (arg[0] == "window") {
            int minutes;
            auto window = ExpandProps(arg[1]);
            if (!window.ok()) {
                LOG(ERROR) << "critical: Could not expand argument ': " << arg[1];
                continue;
                return Error() << "critical: Could not expand argument ': " << arg[1];
            }
            if (*window == "off") {
                continue;
                return {};
            }
            if (!ParseInt(*window, &minutes, 0)) {
                LOG(ERROR) << "critical: 'fatal_crash_window' must be an integer > 0";
                continue;
                return Error() << "critical: 'fatal_crash_window' must be an integer > 0";
            }
            fatal_crash_window = std::chrono::minutes(minutes);
        } else {
            LOG(ERROR) << "critical: Argument '" << *it << "' is not supported";
            continue;
            return Error() << "critical: Argument '" << *it << "' is not supported";
        }
    }