final class JobStorageDatabaseErrorHandler extends 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 the DatabaseErrorHandler param in the above calls, this class is used
as the default DatabaseErrorHandler.
| Constructor and Description |
|---|
JobStorageDatabaseErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
deleteApi14(Context context,
File databaseFile) |
(package private) void |
deleteApi16(File databaseFile) |
(package private) void |
deleteDatabaseFile(String fileName) |
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.void deleteDatabaseFile(String fileName)
void deleteApi16(File databaseFile)