|
1 | 1 | package novoda.lib.sqliteprovider.provider; |
2 | 2 |
|
3 | | -import android.content.*; |
4 | | -import android.database.*; |
| 3 | +import android.content.ContentUris; |
| 4 | +import android.content.ContentValues; |
| 5 | +import android.content.Context; |
| 6 | +import android.database.Cursor; |
| 7 | +import android.database.DatabaseUtils; |
| 8 | +import android.database.SQLException; |
5 | 9 | import android.database.sqlite.SQLiteDatabase; |
6 | 10 | import android.database.sqlite.SQLiteOpenHelper; |
7 | 11 | import android.net.Uri; |
8 | 12 |
|
| 13 | +import java.io.IOException; |
| 14 | +import java.util.List; |
| 15 | +import java.util.Map; |
| 16 | + |
9 | 17 | import novoda.lib.sqliteprovider.provider.action.InsertHelper; |
10 | 18 | import novoda.lib.sqliteprovider.sqlite.ExtendedSQLiteOpenHelper; |
11 | 19 | import novoda.lib.sqliteprovider.sqlite.ExtendedSQLiteQueryBuilder; |
12 | 20 | import novoda.lib.sqliteprovider.util.Log; |
13 | 21 | import novoda.lib.sqliteprovider.util.UriUtils; |
14 | 22 |
|
15 | | -import java.io.IOException; |
16 | | -import java.util.List; |
17 | | -import java.util.Map; |
18 | | - |
19 | 23 | public class SQLiteContentProviderImpl extends SQLiteContentProvider { |
20 | 24 |
|
21 | 25 | protected static final String ID = "_id"; |
@@ -50,7 +54,7 @@ protected SQLiteDatabase getReadableDatabase() { |
50 | 54 | @Override |
51 | 55 | protected SQLiteOpenHelper getDatabaseHelper(Context context) { |
52 | 56 | try { |
53 | | - return new ExtendedSQLiteOpenHelper(context); |
| 57 | + return new ExtendedSQLiteOpenHelper(context, getCursorFactory()); |
54 | 58 | } catch (IOException e) { |
55 | 59 | Log.Provider.e(e); |
56 | 60 | throw new IllegalStateException(e.getMessage()); |
@@ -151,4 +155,9 @@ public Cursor query(Uri uri, String[] projection, String selection, String[] sel |
151 | 155 | protected ExtendedSQLiteQueryBuilder getSQLiteQueryBuilder() { |
152 | 156 | return new ExtendedSQLiteQueryBuilder(); |
153 | 157 | } |
| 158 | + |
| 159 | + @Override |
| 160 | + protected SQLiteDatabase.CursorFactory getCursorFactory() { |
| 161 | + return null; |
| 162 | + } |
154 | 163 | } |
0 commit comments