package org.ccci.gto.android.common.db;

import android.annotation.TargetApi;
import android.content.Context;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Build;

public abstract class SQLiteOpenHelperCompat extends SQLiteOpenHelper {
    public SQLiteOpenHelperCompat(Context context, String name,
                                  SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public SQLiteOpenHelperCompat(Context context, String name, SQLiteDatabase.CursorFactory factory, int version,
                                  DatabaseErrorHandler errorHandler) {
        super(context, name, factory, version, errorHandler);
    }

    @Override
    public void onConfigure(SQLiteDatabase db) {
        // call super onConfigure only if it would exist
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            super.onConfigure(db);
        }
    }

    @Override
    public void onOpen(SQLiteDatabase db) {
        // trigger onConfigure now if it isn't triggered by Android itself
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
            onConfigure(db);
        }

        // trigger parent onOpen
        super.onOpen(db);
    }
}

@@ -237,43 +237,147 @@
 Lite
-OpenHelper;%0Aimport android.os.Build
+Database.CursorFactory;%0Aimport android.database.sqlite.SQLiteOpenHelper;%0Aimport android.os.Build;%0Aimport android.support.annotation.NonNull
 ;%0A%0Ap
@@ -514,58 +514,9 @@
 ame,
-%0A                                  SQLiteDatabase.
+ 
 Curs
@@ -714,31 +714,16 @@
 g name, 
-SQLiteDatabase.
 CursorFa
@@ -932,16 +932,31 @@
 nfigure(
+@NonNull final 
 SQLiteDa
@@ -1185,16 +1185,31 @@
  onOpen(
+@NonNull final 
 SQLiteDa

add a couple annotations and final keywords