mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00
more refactoring: String -> ZLNetworkException (code is still not compilable)
This commit is contained in:
parent
b2f140c612
commit
b5aea623a2
12 changed files with 120 additions and 101 deletions
|
@ -26,10 +26,10 @@ import android.widget.TextView;
|
|||
import android.content.DialogInterface;
|
||||
|
||||
import org.geometerplus.zlibrary.ui.android.R;
|
||||
|
||||
import org.geometerplus.zlibrary.ui.android.dialogs.ZLAndroidDialogManager;
|
||||
|
||||
import org.geometerplus.zlibrary.core.util.ZLBoolean3;
|
||||
import org.geometerplus.zlibrary.core.network.ZLNetworkException;
|
||||
|
||||
import org.geometerplus.fbreader.network.authentication.NetworkAuthenticationManager;
|
||||
|
||||
|
@ -91,17 +91,19 @@ class AuthenticationDialog extends NetworkDialog {
|
|||
mgr.UserNameOption.setValue(login);
|
||||
final Runnable runnable = new Runnable() {
|
||||
public void run() {
|
||||
String err = mgr.authorise(password);
|
||||
if (err != null) {
|
||||
try {
|
||||
mgr.authorise(password);
|
||||
} catch (ZLNetworkException e) {
|
||||
mgr.logOut();
|
||||
sendError(true, false, err);
|
||||
sendError(true, false, e.getMessage());
|
||||
return;
|
||||
}
|
||||
if (mgr.needsInitialization()) {
|
||||
err = mgr.initialize();
|
||||
if (err != null) {
|
||||
try {
|
||||
mgr.initialize();
|
||||
} catch (ZLNetworkException e) {
|
||||
mgr.logOut();
|
||||
sendError(true, false, err);
|
||||
sendError(true, false, e.getMessage());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue