Merge "Allow factory reset without PERSISTENT_DATA_BLOCK_SERVICE"

This commit is contained in:
Treehugger Robot
2023-06-20 12:13:34 +00:00
committed by Gerrit Code Review

View File

@@ -86,13 +86,14 @@ public class MainClearConfirm extends InstrumentedFragment {
return;
}
final PersistentDataBlockManager pdbManager;
// pre-flight check hardware support PersistentDataBlockManager
if (SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals("")) {
return;
}
final PersistentDataBlockManager pdbManager = (PersistentDataBlockManager)
if (!SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals("")) {
pdbManager = (PersistentDataBlockManager)
getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
} else {
pdbManager = null;
}
if (shouldWipePersistentDataBlock(pdbManager)) {