tls-psk: improve error handling on connection error
This commit is contained in:
@@ -249,6 +249,16 @@ public class TransferPresenter implements KeyTransferCallback, LoaderCallbacks<L
|
||||
}, 750);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectionErrorConnect() {
|
||||
view.showErrorConnectionFailed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectionErrorListen() {
|
||||
view.showErrorListenFailed();
|
||||
}
|
||||
|
||||
|
||||
private void connectionStartConnect(String qrCodeContent) {
|
||||
connectionClear();
|
||||
@@ -336,6 +346,7 @@ public class TransferPresenter implements KeyTransferCallback, LoaderCallbacks<L
|
||||
|
||||
void showErrorBadKey();
|
||||
void showErrorConnectionFailed();
|
||||
void showErrorListenFailed();
|
||||
void showResultNotification(ImportKeyResult result);
|
||||
|
||||
void setSecretKeyAdapter(Adapter adapter);
|
||||
|
||||
@@ -229,6 +229,11 @@ public class TransferFragment extends Fragment implements TransferMvpView {
|
||||
Notify.create(getActivity(), "Connection failed!", Style.ERROR).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showErrorListenFailed() {
|
||||
Notify.create(getActivity(), "Error setting up server!", Style.ERROR).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showResultNotification(ImportKeyResult result) {
|
||||
result.createNotify(getActivity()).show();
|
||||
|
||||
Reference in New Issue
Block a user