public static SQLiteDatabase getDatabase(final boolean writable) {
        if (writable) {
            databaseLock.writeLock().lock();
            Log.d("lock db in writable mode");
        } else {
            databaseLock.readLock().lock();
            Log.d("lock db in readable mode");
        }
        return database;
    }
Solely to be used by {@link DBInspectionActivity}!
make sure to release the lock by using {@link #releaseDatabase}
main/src/main/java/cgeo/geocaching/storage/DataStore.java