Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3c2ae8c945
1 changed files with 2 additions and 3 deletions
|
@ -14,9 +14,8 @@ public class SQLiteAPIImpl implements SQLiteAPI {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SQLiteConnection getOrCreateDatabase(String name, boolean readOnly) {
|
public SQLiteConnection getOrCreateDatabase(String name, boolean readOnly) {
|
||||||
android.database.sqlite.SQLiteDatabase db = SQLiteDatabase.openDatabase(app.getDatabasePath(name).getAbsolutePath(), null,
|
android.database.sqlite.SQLiteDatabase db = app.openOrCreateDatabase(name,
|
||||||
(readOnly? SQLiteDatabase.OPEN_READONLY : (SQLiteDatabase.OPEN_READWRITE | SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING))
|
readOnly ? SQLiteDatabase.OPEN_READONLY : (SQLiteDatabase.OPEN_READWRITE | SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING), null);
|
||||||
| SQLiteDatabase.CREATE_IF_NECESSARY);
|
|
||||||
if(db == null) {
|
if(db == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue