Merge "Preserve FRP lock if wiped during SUW" into mnc-dev am: f0ff1631de am: 2075d98be6 am: 7d44fe6fdb

am: 6a7ff3186b

* commit '6a7ff3186b6ad03a08801b8bb3fff5a30185eb4d':
  Preserve FRP lock if wiped during SUW
This commit is contained in:
Russell Brenner
2015-11-17 01:47:46 +00:00
committed by android-build-merger

View File

@@ -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.logging.MetricsLogger;
@@ -63,8 +64,12 @@ public class MasterClearConfirm extends InstrumentedFragment {
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.
new AsyncTask<Void, Void, Void>() {
int mOldOrientation;
ProgressDialog mProgressDialog;