Merge tag 'android-11.0.0_r16' into android-10.0
Android 11.0.0 release 16 - twrp bringup patch
diff --git a/install/wipe_data.cpp b/install/wipe_data.cpp
index b0e44c7..b2da76b 100755
--- a/install/wipe_data.cpp
+++ b/install/wipe_data.cpp
@@ -27,10 +27,11 @@
#include <android-base/logging.h>
#include <android-base/stringprintf.h>
+#include "install/snapshot_utils.h"
#include "otautil/dirutil.h"
-#include "otautil/logging.h"
-#include "otautil/roots.h"
#include "recovery_ui/ui.h"
+#include "recovery_utils/logging.h"
+#include "recovery_utils/roots.h"
constexpr const char* CACHE_ROOT = "/cache";
constexpr const char* DATA_ROOT = "/data";
@@ -104,6 +105,12 @@
bool WipeData(Device* device, bool convert_fbe) {
// RecoveryUI* ui = device->GetUI();
// ui->Print("\n-- Wiping data...\n");
+
+ // if (!FinishPendingSnapshotMerges(device)) {
+ // ui->Print("Unable to check update status or complete merge, cannot wipe partitions.\n");
+ // return false;
+ // }
+
bool success = device->PreWipeData();
if (success) {
success &= EraseVolume(DATA_ROOT, convert_fbe);
@@ -120,4 +127,4 @@
}
// ui->Print("Data wipe %s.\n", success ? "complete" : "failed");
return success;
-}
\ No newline at end of file
+}