|
7 | 7 |
|
8 | 8 | package com.reactnativecommunity.asyncstorage;
|
9 | 9 |
|
10 |
| -import javax.annotation.Nullable; |
11 |
| - |
12 | 10 | import android.content.Context;
|
13 | 11 | import android.database.sqlite.SQLiteDatabase;
|
14 | 12 | import android.database.sqlite.SQLiteException;
|
15 | 13 | import android.database.sqlite.SQLiteOpenHelper;
|
16 |
| - |
17 | 14 | import com.facebook.common.logging.FLog;
|
18 | 15 | import com.facebook.react.common.ReactConstants;
|
| 16 | +import java.io.File; |
| 17 | +import javax.annotation.Nullable; |
19 | 18 |
|
20 | 19 | /**
|
21 | 20 | * Database supplier of the database used by react native. This creates, opens and deletes the
|
@@ -44,7 +43,6 @@ public class ReactDatabaseSupplier extends SQLiteOpenHelper {
|
44 | 43 | private Context mContext;
|
45 | 44 | private @Nullable SQLiteDatabase mDb;
|
46 | 45 | private long mMaximumDatabaseSize = BuildConfig.AsyncStorage_db_size * 1024L * 1024L;
|
47 |
| - private boolean disableLocalizedCollators = BuildConfig.AsyncStorage_noLocalizedCollators; |
48 | 46 |
|
49 | 47 | private ReactDatabaseSupplier(Context context) {
|
50 | 48 | super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
@@ -86,13 +84,7 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
86 | 84 | if (tries > 0) {
|
87 | 85 | deleteDatabase();
|
88 | 86 | }
|
89 |
| - |
90 |
| - if(disableLocalizedCollators) { |
91 |
| - String dbPath = mContext.getDatabasePath(DATABASE_NAME).getPath(); |
92 |
| - mDb = SQLiteDatabase.openDatabase(dbPath, null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READWRITE); |
93 |
| - } else { |
94 |
| - mDb = getWritableDatabase(); |
95 |
| - } |
| 87 | + mDb = getWritableDatabase(); |
96 | 88 | break;
|
97 | 89 | } catch (SQLiteException e) {
|
98 | 90 | lastSQLiteException = e;
|
|
0 commit comments