use of com.ichi2.anki.CollectionHelper.CollectionIntegrityStorageCheck in project Anki-Android by ankidroid.
the class DeckPicker method integrityCheck.
// Callback method to handle database integrity check
public void integrityCheck() {
// #5852 - We were having issues with integrity checks where the users had run out of space.
// display a dialog box if we don't have the space
CollectionIntegrityStorageCheck status = CollectionIntegrityStorageCheck.createInstance(this);
if (status.shouldWarnOnIntegrityCheck()) {
Timber.d("Displaying File Size confirmation");
new MaterialDialog.Builder(this).title(R.string.check_db_title).content(status.getWarningDetails(this)).positiveText(R.string.integrity_check_continue_anyway).onPositive((dialog, which) -> performIntegrityCheck()).negativeText(R.string.dialog_cancel).show();
} else {
performIntegrityCheck();
}
}
Aggregations