public final class DefaultDatabaseErrorHandler extends java.lang.Object implements DatabaseErrorHandler
An application can specify an implementation of DatabaseErrorHandler on the
following:
SQLiteDatabase#openOrCreateDatabase(String,
android.database.sqlite.SQLiteDatabase.CursorFactory, DatabaseErrorHandler)SQLiteDatabase#openDatabase(String,
android.database.sqlite.SQLiteDatabase.CursorFactory, int, DatabaseErrorHandler)DatabaseErrorHandler is used to handle database corruption errors, if they
occur.
If null is specified for DatabaeErrorHandler param in the above calls, then this class is used
as the default DatabaseErrorHandler.
| Constructor and Description |
|---|
DefaultDatabaseErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onCorruption(SQLiteDatabase dbObj)
defines the default method to be invoked when database corruption is detected.
|
public void onCorruption(SQLiteDatabase dbObj)
onCorruption in interface DatabaseErrorHandlerdbObj - the SQLiteDatabase object representing the database on which corruption
is detected.