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

Commit 99edc19a authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

libsnapshot: NeedSnapshotsInFirstStageMount don't test for IsRecovery am: 1d32aa1a

Change-Id: I090cbac55a9d119392dbd18d96a000cf02c8ad53
parents b2965ba2 1d32aa1a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1387,12 +1387,14 @@ bool SnapshotManager::NeedSnapshotsInFirstStageMount() {
    auto slot = GetCurrentSlot();

    if (slot != Slot::Target) {
        if (slot == Slot::Source && !device_->IsRecovery()) {
        if (slot == Slot::Source) {
            // Device is rebooting into the original slot, so mark this as a
            // rollback.
            auto path = GetRollbackIndicatorPath();
            if (!android::base::WriteStringToFile("1", path)) {
                PLOG(ERROR) << "Unable to write rollback indicator: " << path;
            } else {
                LOG(INFO) << "Rollback detected, writing rollback indicator to " << path;
            }
        }
        LOG(INFO) << "Not booting from new slot. Will not mount snapshots.";