[DO NOT MERGE] Preserve FRP lock if wiped during SUW
am: 14bf226c79
* commit '14bf226c79ee16fc5dd502d81e12bf18b932f39e':
[DO NOT MERGE] Preserve FRP lock if wiped during SUW
This commit is contained in:
@@ -20,6 +20,7 @@ import android.app.ProgressDialog;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.provider.Settings;
|
||||||
import android.service.persistentdata.PersistentDataBlockManager;
|
import android.service.persistentdata.PersistentDataBlockManager;
|
||||||
import com.android.internal.os.storage.ExternalStorageFormatter;
|
import com.android.internal.os.storage.ExternalStorageFormatter;
|
||||||
|
|
||||||
@@ -62,8 +63,12 @@ public class MasterClearConfirm extends Fragment {
|
|||||||
final PersistentDataBlockManager pdbManager = (PersistentDataBlockManager)
|
final PersistentDataBlockManager pdbManager = (PersistentDataBlockManager)
|
||||||
getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
|
getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
|
||||||
|
|
||||||
if (pdbManager != null && !pdbManager.getOemUnlockEnabled()) {
|
if (pdbManager != null && !pdbManager.getOemUnlockEnabled() &&
|
||||||
// if OEM unlock is enabled, this will be wiped during FR process.
|
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();
|
final ProgressDialog progressDialog = getProgressDialog();
|
||||||
progressDialog.show();
|
progressDialog.show();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user