plugins/cordova-sqlite-storage/src/android/io/sqlc/SQLitePlugin.java
/**
     * Clean up and close all open databases.
     */
Clean up and close all open databases.
Clean up and close all open databases .
@Override
    public void onDestroy() {
        while (!dbrmap.isEmpty()) {
            String dbname = dbrmap.keySet().iterator().next();
            this.closeDatabaseNow(dbname);
            DBRunner r = dbrmap.get(dbname);
            try {
                r.q.put(new DBQuery());
            } catch(Exception e) {
                Log.e(SQLitePlugin.class.getSimpleName(), "INTERNAL PLUGIN CLEANUP ERROR: could not stop db thread due to exception", e);
            }
            dbrmap.remove(dbname);
        }
    }
@ Override public void onDestroy ( ) { while ( ! dbrmap . isEmpty ( ) ) { String dbname = dbrmap . keySet ( ) . iterator ( ) . next ( ) ; this . closeDatabaseNow ( dbname ) ; DBRunner r = dbrmap . get ( dbname ) ; try { r . q . put ( new DBQuery ( ) ) ; } catch ( Exception e ) { Log . e ( SQLitePlugin . class . getSimpleName ( ) , "INTERNAL PLUGIN CLEANUP ERROR: could not stop db thread due to exception" , e ) ; } dbrmap . remove ( dbname ) ; } }
Clean up and close all open databases.
Clean up and close all open databases .
// stop the db runner thread: