app/src/main/java/org/andstatus/app/context/MyContextImpl.java
/**
     * 2019-01-16 After getting not only (usual previously) errors "A SQLiteConnection object for database ... was leaked!"
     * but also "SQLiteException: no such table" and "Failed to open database" in Android 9
     * and reading https://stackoverflow.com/questions/50476782/android-p-sqlite-no-such-table-error-after-copying-database-from-assets
     * and https://stackoverflow.com/questions/4557154/android-sqlite-db-when-to-close?noredirect=1&lq=1
     * I decided to db.close on every context release in order to have new instance for each MyContext */
2019-01-16 After getting not only (usual previously) errors "A SQLiteConnection object for database ...
2019 - 01 - 16 After getting not only ( usual previously ) errors " A SQLiteConnection object for database ...
@Override
    public void release(Supplier<String> reason) {
        setExpired(() -> "Release " + reason.get());
        try {
            if (db != null) db.close();
        } catch (Exception e) {
            MyLog.d(this, "db.close()", e);
        }
    }
@ Override public void release ( Supplier < String > reason ) { setExpired ( ( ) -> "Release " + reason . get ( ) ) ; try { if ( db != null ) db . close ( ) ; } catch ( Exception e ) { MyLog . d ( this , "db.close()" , e ) ; } }
2019-01-16 After getting not only (usual previously) errors "A SQLiteConnection object for database ... was leaked!"
2019 - 01 - 16 After getting not only ( usual previously ) errors " A SQLiteConnection object for database ... was leaked! "