mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-25 14:02:54 +00:00
Keep the SpinnerDialog visible while the connectivity test runs
This commit is contained in:
parent
fb09c9692c
commit
08f8b6cb8e
@ -108,15 +108,18 @@ public class AddComputerManually extends Activity {
|
||||
ComputerDetails details = new ComputerDetails();
|
||||
details.manualAddress = host;
|
||||
success = managerBinder.addComputerBlocking(details);
|
||||
} catch (InterruptedException e) {
|
||||
// Propagate the InterruptedException to the caller for proper handling
|
||||
dialog.dismiss();
|
||||
throw e;
|
||||
} catch (IllegalArgumentException e) {
|
||||
// This can be thrown from OkHttp if the host fails to canonicalize to a valid name.
|
||||
// https://github.com/square/okhttp/blob/okhttp_27/okhttp/src/main/java/com/squareup/okhttp/HttpUrl.java#L705
|
||||
e.printStackTrace();
|
||||
success = false;
|
||||
} finally {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
// Keep the SpinnerDialog open while testing connectivity
|
||||
if (!success){
|
||||
wrongSiteLocal = isWrongSubnetSiteLocalAddress(host);
|
||||
}
|
||||
@ -129,6 +132,8 @@ public class AddComputerManually extends Activity {
|
||||
portTestResult = MoonBridge.ML_TEST_RESULT_INCONCLUSIVE;
|
||||
}
|
||||
|
||||
dialog.dismiss();
|
||||
|
||||
if (wrongSiteLocal) {
|
||||
Dialog.displayDialog(this, getResources().getString(R.string.conn_error_title), getResources().getString(R.string.addpc_wrong_sitelocal), false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user