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

* commit '5b452a11631338a12fc3ee09ca091c900fd7a8ba':
  On factory reset, wipe the stored account challenges
This commit is contained in:
Andres Morales
2014-07-18 16:52:06 +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);