当前位置: 首页>>代码示例>>Java>>正文


Java DefaultDatabaseErrorHandler类代码示例

本文整理汇总了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) +
      "\">";
}
 
开发者ID:Elias33,项目名称:Quran,代码行数:23,代码来源:DatabaseHandler.java

示例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;
  }
}
 
开发者ID:Elias33,项目名称:Quran,代码行数:16,代码来源:SuraTimingDatabaseHandler.java

示例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;
}
 
开发者ID:Litterfeldt,项目名称:AStory,代码行数:11,代码来源:dbConnector.java

示例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);
}
 
开发者ID:kkmike999,项目名称:YuiHatano,代码行数:7,代码来源:ShadowSQLiteDatabase.java

示例5: newInstancePostHoneycomb

import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static ReciprSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
    return new ReciprSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
 
开发者ID:chennemann,项目名称:Recipr,代码行数:5,代码来源:ReciprSQLiteOpenHelper.java

示例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);
}
 
开发者ID:doppllib,项目名称:core-doppl,代码行数:7,代码来源:SQLiteDatabase.java

示例7: newInstancePostHoneycomb

import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static TasksSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
    return new TasksSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
 
开发者ID:dmytroKarataiev,项目名称:YalantisInternship,代码行数:5,代码来源:TasksSQLiteOpenHelper.java

示例8: newInstancePostHoneycomb

import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static EarthquakeSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
    return new EarthquakeSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
 
开发者ID:dmytroKarataiev,项目名称:EarthquakeSurvival,代码行数:5,代码来源:EarthquakeSQLiteOpenHelper.java

示例9: newInstancePostHoneycomb

import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static NovelReaderSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
    return new NovelReaderSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
 
开发者ID:crysehillmes,项目名称:smoothnovelreader,代码行数:5,代码来源:NovelReaderSQLiteOpenHelper.java

示例10: newInstancePostHoneycomb

import android.database.DefaultDatabaseErrorHandler; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static PreferencesSQLiteOpenHelper newInstancePostHoneycomb(Context context) {
    return new PreferencesSQLiteOpenHelper(context, new DefaultDatabaseErrorHandler());
}
 
开发者ID:mengdd,项目名称:PreferencesProvider,代码行数:5,代码来源:PreferencesSQLiteOpenHelper.java

示例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());
}
 
开发者ID:skubit,项目名称:skubit-satoshidice,代码行数:5,代码来源:KeySQLiteOpenHelper.java

示例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());
}
 
开发者ID:rainbowbreeze,项目名称:playtogether,代码行数:5,代码来源:PlaytogSQLiteOpenHelper.java

示例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());
}
 
开发者ID:skubit,项目名称:bitid-android,代码行数:6,代码来源:KeySQLiteOpenHelper.java

示例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());
}
 
开发者ID:caarmen,项目名称:PalidaMuerte,代码行数:5,代码来源:PalidaMuerteSQLiteOpenHelper.java


注:本文中的android.database.DefaultDatabaseErrorHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。