Fix SnapshotManager instantiation.

New() should be used instead of NewForFirstStageMount().

Bug: 168258606
Test: data wipe with VABC merge in progress
Change-Id: Idf2b01a504b577766da303091721764242e99a69
This commit is contained in:
David Anderson 2021-02-04 20:22:29 -08:00
parent 0cd9a63603
commit ebce8e6306

View file

@ -32,7 +32,7 @@ bool FinishPendingSnapshotMerges(Device* device) {
} }
RecoveryUI* ui = device->GetUI(); RecoveryUI* ui = device->GetUI();
auto sm = SnapshotManager::NewForFirstStageMount(); auto sm = SnapshotManager::New();
if (!sm) { if (!sm) {
ui->Print("Could not create SnapshotManager.\n"); ui->Print("Could not create SnapshotManager.\n");
return false; return false;
@ -57,7 +57,7 @@ bool CreateSnapshotPartitions() {
return true; return true;
} }
auto sm = SnapshotManager::NewForFirstStageMount(); auto sm = SnapshotManager::New();
if (!sm) { if (!sm) {
// SnapshotManager could not be created. The device is still in a // SnapshotManager could not be created. The device is still in a
// consistent state and can continue with the mounting of the existing // consistent state and can continue with the mounting of the existing