Code example for SQLiteDatabase

Methods: isOpen, isDbLockedByOtherThreads

0
db = super.getWritableDatabase();
      lockedAt = new Throwable();
    } 
 
    if(db.isDbLockedByOtherThreads())
    { 
      Log.v("DATABASE!", "Database is locked: ", new Throwable());
      Log.v("DATABASE!", "Locked at: ", lockedAt);
    } 
 
    return db;
  } 
 
  public synchronized <T> T executeWritableTask(WritableDatabaseTask<T> task)
  { 
    SQLiteDatabase database = getDatabase();
 
    T result;
    database.beginTransaction();
    try