Don't wipe PST partition if OEM unlock is enabled
This will be wiped by the recovery system and the OEM
unlock bit will be retained.
Bug: 16631974
Change-Id: I65522dd93c8465ff7f7ecbcef404bff6e9c864d6
diff --git a/src/com/android/settings/MasterClearConfirm.java b/src/com/android/settings/MasterClearConfirm.java
index 2ba1e7f..d14ad39 100644
--- a/src/com/android/settings/MasterClearConfirm.java
+++ b/src/com/android/settings/MasterClearConfirm.java
@@ -65,7 +65,10 @@
getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
if (pdbManager != null) {
- pdbManager.wipe();
+ // if OEM unlock is enabled, this will be wiped during FR process.
+ if (!pdbManager.getOemUnlockEnabled()) {
+ pdbManager.wipe();
+ }
}
if (mEraseSdCard) {