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

Commit 78d27661 authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Android (Google) Code Review
Browse files

Merge "logd: stop log spam when integrity enforcement is suppressed" into nyc-dev

parents 34d5a20c 89e0429c
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -99,11 +99,20 @@ std::string LogAudit::getProperty(const std::string& name)
}

void LogAudit::enforceIntegrity() {
    static bool loggedOnce;
    bool once = loggedOnce;

    loggedOnce = true;

    if (!AUDITD_ENFORCE_INTEGRITY) {
        if (!once) {
            logToDmesg("integrity enforcement suppressed; not rebooting");
        }
    } else if (rebootToSafeMode) {
        if (getProperty("persist.sys.safemode") == "1") {
            if (!once) {
                logToDmesg("integrity enforcement suppressed; in safe mode");
            }
            return;
        }