本文整理汇总了Java中android.database.DefaultDatabaseErrorHandler类的典型用法代码示例。如果您正苦于以下问题:Java DefaultDatabaseErrorHandler类的具体用法?Java DefaultDatabaseErrorHandler怎么用?Java DefaultDatabaseErrorHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultDatabaseErrorHandler类属于android.database包,在下文中一共展示了DefaultDatabaseErrorHandler类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DatabaseHandler
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
private DatabaseHandler(Context context, String databaseName) throws SQLException {
String base = QuranFileUtils.getQuranDatabaseDirectory(context);
if (base == null) return;
String path = base + File.separator + databaseName;
Crashlytics.log("opening database file: " + path);
try {
database = SQLiteDatabase.openDatabase(path, null,
SQLiteDatabase.NO_LOCALIZED_COLLATORS, new DefaultDatabaseErrorHandler());
} catch (SQLiteDatabaseCorruptException sce) {
Crashlytics.log("corrupt database: " + databaseName);
throw sce;
} catch (SQLException se){
Crashlytics.log("database file " + path +
(new File(path).exists()? " exists" : " doesn't exist"));
throw se;
}
schemaVersion = getSchemaVersion();
matchString = "<font color=\"" +
ContextCompat.getColor(context, R.color.translation_highlight) +
"\">";
}
示例2: SuraTimingDatabaseHandler
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
private SuraTimingDatabaseHandler(String path) throws SQLException {
Crashlytics.log("opening gapless data file, " + path);
try {
mDatabase = SQLiteDatabase.openDatabase(path, null,
SQLiteDatabase.NO_LOCALIZED_COLLATORS, new DefaultDatabaseErrorHandler());
} catch (SQLiteDatabaseCorruptException sce) {
Crashlytics.log("database corrupted: " + path);
mDatabase = null;
} catch (SQLException se) {
Crashlytics.log("database at " + path +
(new File(path).exists() ? " exists" : " doesn't exist"));
Crashlytics.logException(se);
mDatabase = null;
}
}
示例3: getInstance
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
public static dbConnector getInstance(Context c){
if (mInstance == null) {
mInstance = new dbConnector(c.getApplicationContext(),
DATABASE_NAME,
null,
DATABASE_VERSION,
new DefaultDatabaseErrorHandler());
}
return mInstance;
}
示例4: ShadowSQLiteDatabase
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@Deprecated
private ShadowSQLiteDatabase(String path, int openFlags, CursorFactory cursorFactory, DatabaseErrorHandler errorHandler) {
mCursorFactory = cursorFactory;
mErrorHandler = errorHandler != null ? errorHandler : new DefaultDatabaseErrorHandler();
mConfigurationLocked = new SQLiteDatabaseConfiguration(path, openFlags);
}
示例5: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static ReciprSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new ReciprSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
示例6: SQLiteDatabase
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
private SQLiteDatabase(String path, int openFlags, CursorFactory cursorFactory,
DatabaseErrorHandler errorHandler) {
mCursorFactory = cursorFactory;
mErrorHandler = errorHandler != null ? errorHandler : new DefaultDatabaseErrorHandler();
mConfigurationLocked = new SQLiteDatabaseConfiguration(path, openFlags);
}
示例7: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static TasksSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new TasksSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
示例8: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static EarthquakeSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new EarthquakeSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
示例9: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static NovelReaderSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new NovelReaderSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
示例10: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static PreferencesSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new PreferencesSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
示例11: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static KeySQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new KeySQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION, new DefaultDatabaseErrorHandler());
}
示例12: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static PlaytogSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new PlaytogSQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION, new DefaultDatabaseErrorHandler());
}
示例13: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static KeySQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new KeySQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION,
new DefaultDatabaseErrorHandler());
}
示例14: newInstancePostHoneycomb
import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static PalidaMuerteSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new PalidaMuerteSQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION, new DefaultDatabaseErrorHandler());
}