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

Commit 892cda43 authored by Sami Tolvanen's avatar Sami Tolvanen Committed by android-build-merger
Browse files

Merge "logd: stop log spam when integrity enforcement is suppressed"

am: 9218477a

* commit '9218477a':
  logd: stop log spam when integrity enforcement is suppressed
parents e4877329 9218477a
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;
        }