mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
better network library initialization error processing
This commit is contained in:
parent
645d2b1ccf
commit
cdbd9b22c7
4 changed files with 21 additions and 6 deletions
|
@ -27,6 +27,7 @@ import android.content.Intent;
|
|||
import android.net.Uri;
|
||||
|
||||
import org.geometerplus.zlibrary.core.network.ZLNetworkContext;
|
||||
import org.geometerplus.zlibrary.core.network.ZLNetworkException;
|
||||
import org.geometerplus.zlibrary.core.options.Config;
|
||||
|
||||
import org.geometerplus.fbreader.network.*;
|
||||
|
@ -65,7 +66,10 @@ public abstract class Util implements UserRegistrationConstants {
|
|||
|
||||
final NetworkLibrary library = NetworkLibrary.Instance();
|
||||
if (!library.isInitialized()) {
|
||||
library.initialize(nc);
|
||||
try {
|
||||
library.initialize(nc);
|
||||
} catch (ZLNetworkException e) {
|
||||
}
|
||||
}
|
||||
if (action != null) {
|
||||
action.run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue