From ae58323a6b172f4a8607e6b187ea5c45b9b8e185 Mon Sep 17 00:00:00 2001 From: Andres Morales Date: Wed, 6 Aug 2014 17:01:19 -0700 Subject: [PATCH] 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 --- src/com/android/settings/MasterClearConfirm.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/MasterClearConfirm.java b/src/com/android/settings/MasterClearConfirm.java index 2ba1e7fcc1e..d14ad39a079 100644 --- a/src/com/android/settings/MasterClearConfirm.java +++ b/src/com/android/settings/MasterClearConfirm.java @@ -65,7 +65,10 @@ public class MasterClearConfirm extends Fragment { 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) {