mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
opds-fbreader scheme support
This commit is contained in:
parent
07bc085d28
commit
e07dcbf47e
5 changed files with 64 additions and 36 deletions
|
@ -49,12 +49,7 @@ public abstract class Util implements UserRegistrationConstants {
|
|||
return intent;
|
||||
}
|
||||
|
||||
static void initLibrary(final Activity activity) {
|
||||
final NetworkLibrary library = NetworkLibrary.Instance();
|
||||
if (library.isInitialized()) {
|
||||
return;
|
||||
}
|
||||
|
||||
static void initLibrary(final Activity activity, final Runnable action) {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
UIUtil.wait("loadingNetworkLibrary", new Runnable() {
|
||||
|
@ -63,7 +58,13 @@ public abstract class Util implements UserRegistrationConstants {
|
|||
new SQLiteNetworkDatabase(activity.getApplication());
|
||||
}
|
||||
|
||||
library.initialize();
|
||||
final NetworkLibrary library = NetworkLibrary.Instance();
|
||||
if (!library.isInitialized()) {
|
||||
library.initialize();
|
||||
}
|
||||
if (action != null) {
|
||||
action.run();
|
||||
}
|
||||
}
|
||||
}, activity);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue