public static ReaderDatabase getDatabase() { if (mReaderDb == null) { synchronized (mDbLock) { if (mReaderDb == null) { mReaderDb = new ReaderDatabase(WordPress.getContext()); // this ensures that onOpen() is called with a writable database (open will fail if app // calls getReadableDb() first) mReaderDb.getWritableDatabase(); } } } return mReaderDb; }