mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Synchro db opening as early as possible.
This commit is contained in:
parent
d9ee6263fe
commit
8cff1c662f
2 changed files with 3 additions and 1 deletions
|
@ -55,8 +55,8 @@ public class BlurDatabaseHelper {
|
||||||
|
|
||||||
public BlurDatabaseHelper(Context context) {
|
public BlurDatabaseHelper(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
dbWrapper = new BlurDatabase(context);
|
|
||||||
synchronized (RW_MUTEX) {
|
synchronized (RW_MUTEX) {
|
||||||
|
dbWrapper = new BlurDatabase(context);
|
||||||
dbRO = dbWrapper.getRO();
|
dbRO = dbWrapper.getRO();
|
||||||
dbRW = dbWrapper.getRW();
|
dbRW = dbWrapper.getRW();
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,9 @@ public class FeedProvider extends ContentProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreate() {
|
public boolean onCreate() {
|
||||||
|
synchronized (BlurDatabaseHelper.RW_MUTEX) {
|
||||||
databaseHelper = new BlurDatabase(getContext().getApplicationContext());
|
databaseHelper = new BlurDatabase(getContext().getApplicationContext());
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue