summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2015-11-17 19:56:48 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-11-17 19:56:48 +0000
commit6967df642114a9c84d993cfd544d5a32f04c26b1 (patch)
tree5c4a4b13095296637ba2384e4d283b21bf72db52
parentf191953c77af3c5b78e576a430577aaf050aa5f1 (diff)
parent97759fa8d1710c0ac87cd24c69a3d1f161ac3ec3 (diff)
downloadpackages_apps_Settings-6967df642114a9c84d993cfd544d5a32f04c26b1.zip
packages_apps_Settings-6967df642114a9c84d993cfd544d5a32f04c26b1.tar.gz
packages_apps_Settings-6967df642114a9c84d993cfd544d5a32f04c26b1.tar.bz2
[DO NOT MERGE] Preserve FRP lock if wiped during SUW am: 14bf226c79
am: 97759fa8d1 * commit '97759fa8d1710c0ac87cd24c69a3d1f161ac3ec3': [DO NOT MERGE] Preserve FRP lock if wiped during SUW
-rw-r--r--src/com/android/settings/MasterClearConfirm.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/settings/MasterClearConfirm.java b/src/com/android/settings/MasterClearConfirm.java
index 3521aa3..71837c6 100644
--- a/src/com/android/settings/MasterClearConfirm.java
+++ b/src/com/android/settings/MasterClearConfirm.java
@@ -20,6 +20,7 @@ import android.app.ProgressDialog;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.os.AsyncTask;
+import android.provider.Settings;
import android.service.persistentdata.PersistentDataBlockManager;
import com.android.internal.os.storage.ExternalStorageFormatter;
@@ -62,8 +63,12 @@ public class MasterClearConfirm extends Fragment {
final PersistentDataBlockManager pdbManager = (PersistentDataBlockManager)
getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
- if (pdbManager != null && !pdbManager.getOemUnlockEnabled()) {
- // if OEM unlock is enabled, this will be wiped during FR process.
+ if (pdbManager != null && !pdbManager.getOemUnlockEnabled() &&
+ Settings.Global.getInt(getActivity().getContentResolver(),
+ Settings.Global.DEVICE_PROVISIONED, 0) != 0) {
+ // if OEM unlock is enabled, this will be wiped during FR process. If disabled, it
+ // will be wiped here, unless the device is still being provisioned, in which case
+ // the persistent data block will be preserved.
final ProgressDialog progressDialog = getProgressDialog();
progressDialog.show();