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

Commit b97bd44d authored by Eric Biggers's avatar Eric Biggers Committed by Android (Google) Code Review
Browse files

Merge "SystemServer: remove FDE workaround from runtime restart detection"

parents c4ecc52f 7f747ed8
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -651,19 +651,14 @@ public final class SystemServer implements Dumpable {
        mFactoryTestMode = FactoryTest.getMode();

        // Record process start information.
        // Note SYSPROP_START_COUNT will increment by *2* on a FDE device when it fully boots;
        // one for the password screen, second for the actual boot.
        mStartCount = SystemProperties.getInt(SYSPROP_START_COUNT, 0) + 1;
        mRuntimeStartElapsedTime = SystemClock.elapsedRealtime();
        mRuntimeStartUptime = SystemClock.uptimeMillis();
        Process.setStartTimes(mRuntimeStartElapsedTime, mRuntimeStartUptime,
                mRuntimeStartElapsedTime, mRuntimeStartUptime);

        // Remember if it's runtime restart(when sys.boot_completed is already set) or reboot
        // We don't use "mStartCount > 1" here because it'll be wrong on a FDE device.
        // TODO: mRuntimeRestart will *not* be set to true if the proccess crashes before
        // sys.boot_completed is set. Fix it.
        mRuntimeRestart = "1".equals(SystemProperties.get("sys.boot_completed"));
        // Remember if it's runtime restart or reboot.
        mRuntimeRestart = mStartCount > 1;
    }

    @Override