From 175cc9efdcfb716bb4b55ebeb8481c9984a18fce Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Thu, 26 Nov 2015 02:02:57 -0800 Subject: sr: Fix build when oemlock plugin is enabled Change-Id: Ic600231c9883a6e951ad951455b5af426fd4207a --- recovery.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recovery.cpp b/recovery.cpp index e36e7d9..59e35c1 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -1413,9 +1413,10 @@ main(int argc, char **argv) { #ifdef HAVE_OEMLOCK if (oem_lock == OEM_LOCK_UNLOCK) { - if (device->WipeData()) status = INSTALL_ERROR; + device->PreWipeData(); if (erase_volume("/data", true)) status = INSTALL_ERROR; - if (wipe_cache && erase_volume("/cache", true)) status = INSTALL_ERROR; + if (should_wipe_cache && erase_volume("/cache", true)) status = INSTALL_ERROR; + device->PostWipeData(); if (status != INSTALL_SUCCESS) ui->Print("Data wipe failed.\n"); if (oemlock_set(0)) status = INSTALL_ERROR; // Force reboot regardless of actual status -- cgit v1.1