Java 类android.database.DefaultDatabaseErrorHandler 实例源码
项目:Quran
文件:DatabaseHandler.java
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) +
"\">";
}
项目:Quran
文件:SuraTimingDatabaseHandler.java
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;
}
}
项目:AStory
文件:dbConnector.java
public static dbConnector getInstance(Context c){
if (mInstance == null) {
mInstance = new dbConnector(c.getApplicationContext(),
DATABASE_NAME,
null,
DATABASE_VERSION,
new DefaultDatabaseErrorHandler());
}
return mInstance;
}
项目:YuiHatano
文件:ShadowSQLiteDatabase.java
@Deprecated
private ShadowSQLiteDatabase(String path, int openFlags, CursorFactory cursorFactory, DatabaseErrorHandler errorHandler) {
mCursorFactory = cursorFactory;
mErrorHandler = errorHandler != null ? errorHandler : new DefaultDatabaseErrorHandler();
mConfigurationLocked = new SQLiteDatabaseConfiguration(path, openFlags);
}
项目:KBUnitTest
文件:ShadowSQLiteDatabase.java
@Deprecated
private ShadowSQLiteDatabase(String path, int openFlags, CursorFactory cursorFactory, DatabaseErrorHandler errorHandler) {
mCursorFactory = cursorFactory;
mErrorHandler = errorHandler != null ? errorHandler : new DefaultDatabaseErrorHandler();
mConfigurationLocked = new SQLiteDatabaseConfiguration(path, openFlags);
}
项目:Recipr
文件:ReciprSQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static ReciprSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new ReciprSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
项目:core-doppl
文件:SQLiteDatabase.java
private SQLiteDatabase(String path, int openFlags, CursorFactory cursorFactory,
DatabaseErrorHandler errorHandler) {
mCursorFactory = cursorFactory;
mErrorHandler = errorHandler != null ? errorHandler : new DefaultDatabaseErrorHandler();
mConfigurationLocked = new SQLiteDatabaseConfiguration(path, openFlags);
}
项目:YalantisInternship
文件:TasksSQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static TasksSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new TasksSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
项目:EarthquakeSurvival
文件:EarthquakeSQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static EarthquakeSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new EarthquakeSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
项目:smoothnovelreader
文件:NovelReaderSQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static NovelReaderSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new NovelReaderSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
项目:PreferencesProvider
文件:PreferencesSQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static PreferencesSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new PreferencesSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
项目:skubit-satoshidice
文件:KeySQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static KeySQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new KeySQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION, new DefaultDatabaseErrorHandler());
}
项目:playtogether
文件:PlaytogSQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static PlaytogSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new PlaytogSQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION, new DefaultDatabaseErrorHandler());
}
项目:bitid-android
文件:KeySQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static KeySQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new KeySQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION,
new DefaultDatabaseErrorHandler());
}
项目:playtogether
文件:PlaytogSQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static PlaytogSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new PlaytogSQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION, new DefaultDatabaseErrorHandler());
}
项目:PalidaMuerte
文件:PalidaMuerteSQLiteOpenHelper.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static PalidaMuerteSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
return new PalidaMuerteSQLiteOpenHelper(context, DATABASE_FILE_NAME, null, DATABASE_VERSION, new DefaultDatabaseErrorHandler());
}