am 7ab8929c: On factory reset, wipe the stored account challenges

* commit '7ab8929cc6ecbd1ba14c0d6ecb393b31f9a6fcda':
  On factory reset, wipe the stored account challenges
This commit is contained in:
Andres Morales
2014-07-18 16:46:20 +00:00
committed by Android Git Automerger

View File

@@ -16,6 +16,8 @@
package com.android.settings;
import android.content.Context;
import android.service.persistentdata.PersistentDataBlockManager;
import com.android.internal.os.storage.ExternalStorageFormatter;
import com.android.internal.widget.LockPatternUtils;
@@ -59,6 +61,13 @@ public class MasterClearConfirm extends Fragment {
return;
}
PersistentDataBlockManager pdbManager = (PersistentDataBlockManager)
getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
if (pdbManager != null) {
pdbManager.wipe();
}
if (mEraseSdCard) {
Intent intent = new Intent(ExternalStorageFormatter.FORMAT_AND_FACTORY_RESET);
intent.setComponent(ExternalStorageFormatter.COMPONENT_NAME);