Esempio n. 1
0
  @Override
  public synchronized void close() {

    if (myDataBase != null) myDataBase.close();

    super.close();
  }
Esempio n. 2
0
  @Override
  public synchronized void close() {

    if (db != null) db.close();

    super.close();
  }
Esempio n. 3
0
 @Override
 public synchronized void close() {
   if (this.database != null) {
     this.database.close();
   }
   super.close();
 }
 // Close your database connection
 @Override
 public synchronized void close() {
   SQLiteDatabase db = getWritableDatabase();
   if (db != null) {
     db.close();
   }
   super.close();
 }
  @Override
  public synchronized void close() {

    if (myDataBase != null) myDataBase.close();
    SQLiteDatabase db = this.getReadableDatabase();
    db.close();
    super.close();
  }
Esempio n. 6
0
 @Override
 public void close() {
   if (_db != null) {
     // does android do this anyway?
     _db.close();
     _db = null;
   }
   super.close();
 }
 /** Implemented for tests */
 @Override
 public final void shutdown() {
   Context context = getContext();
   if (context != null) {
     context.getApplicationContext().unregisterComponentCallbacks(this);
   }
   dbHelper.close();
   dbHelper = null;
 }
Esempio n. 8
0
 private void runArchive(String databaseName) {
   SQLiteOpenHelper dbHelper = getOrCreateDatabaseHelper(databaseName);
   File dbFile = new File(dbHelper.getReadableDatabase().getPath());
   Log.i(LogUtil.TAG, "Running archive: " + dbFile.getAbsolutePath());
   dbHelper.close();
   FileArchive archive = getArchive(databaseName);
   if (archive.add(dbFile)) {
     dbFile.delete();
   }
 }
Esempio n. 9
0
 @Override
 public void onDestroy() {
   super.onDestroy();
   if (databaseHelpers != null) {
     for (SQLiteOpenHelper dbHelper : databaseHelpers.values()) {
       dbHelper.close();
     }
   }
   Log.i(LogUtil.TAG, "Destroyed");
 }
  @Override
  public synchronized void close() {

    if (this.miDB != null) {

      this.miDB.close();
    }

    super.close();
  }
Esempio n. 11
0
  @Override
  public synchronized void close() {

    if (mDataBase != null) {
      mDataBase.close();
      mDataBase = null;
    }

    super.close();
  }
Esempio n. 12
0
 @Override
 public void onTrimMemory(int level) {
   super.onTrimMemory(level);
   if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {
     // In the background. Close the database via
     // the helper. If there is an active connection, it will continue to process
     // due to reference counting.
     dbHelper.close();
   }
 }
 public void closeDB(String caller) {
   super.close();
   Logging.Log(LOG_TAG, "Database closed by:" + caller);
 }
  public synchronized void close() {

    if (myDatabase != null) myDatabase.close();

    super.close();
  }
Esempio n. 15
0
 /** Method to close the underlying database connection. */
 public void close() {
   helper.close();
 }
Esempio n. 16
0
 public synchronized void close() {
   if (myDataBase != null) {
     myDataBase.close();
   }
   super.close();
 }
Esempio n. 17
0
 @Override
 public synchronized void close() {
   if (myDataBase != null) myDataBase.close();
   SQLiteDatabase.releaseMemory();
   super.close();
 }
 @Override
 public void finalize() {
   super.close();
 }
Esempio n. 19
0
 public void close() {
   db.close();
   super.close();
 }
Esempio n. 20
0
 @Override
 public synchronized void close() {
   super.close();
   instance = null;
 }
Esempio n. 21
0
 public void close() {
   openHelper.close();
 }
Esempio n. 22
0
 @Override
 public synchronized void close() {
   super.close();
 }
Esempio n. 23
0
 public void close() {
   Log.i(LOGTAG, "Database closed");
   dbhelper.close();
 }
Esempio n. 24
0
 public void close() {
   dbHelper.close();
 }
Esempio n. 25
0
 public void init() {
   db = helper.getWritableDatabase();
   helper.close();
 }
 public synchronized void closeDataBase() throws SQLException {
   if (myDataBase != null) myDataBase.close();
   super.close();
 }