+ private static Context context;
+ private static void checkState() {
+ if (context == null)
+ throw new IllegalStateException("First call init with a valid context");
+ }
+ public static synchronized SQLiteDatabase getDatabase(DatabaseMode mode) {
+ checkState();