diff --git a/app/src/main/java/com/limelight/Game.java b/app/src/main/java/com/limelight/Game.java
index b7ebe571..9a39b590 100644
--- a/app/src/main/java/com/limelight/Game.java
+++ b/app/src/main/java/com/limelight/Game.java
@@ -1506,11 +1506,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
runOnUiThread(new Runnable() {
@Override
public void run() {
- if (spinner != null) {
- spinner.dismiss();
- spinner = null;
- }
-
if (!displayedFailureDialog) {
displayedFailureDialog = true;
LimeLog.severe(stage + " failed: " + errorCode);
@@ -1520,8 +1515,27 @@ public class Game extends Activity implements SurfaceHolder.Callback,
Toast.makeText(Game.this, getResources().getText(R.string.video_decoder_init_failed), Toast.LENGTH_LONG).show();
}
- Dialog.displayDialog(Game.this, getResources().getString(R.string.conn_error_title),
- getResources().getString(R.string.conn_error_msg) + " " + stage +" (error "+errorCode+")", true);
+ String dialogText = getResources().getString(R.string.conn_error_msg) + " " + stage +" (error "+errorCode+")";
+ if (portFlags != 0) {
+ int ret = MoonBridge.testClientConnectivity("conntest-android.moonlight-stream.org", 443, portFlags);
+ if (ret != MoonBridge.ML_TEST_RESULT_INCONCLUSIVE && ret != 0) {
+ dialogText += "\n\n" + getResources().getString(R.string.nettest_text_blocked);
+ }
+ }
+
+ // testClientConnectivity() can take a little while, so leave the spinner dialog up until it's done
+ if (spinner != null) {
+ spinner.dismiss();
+ spinner = null;
+ }
+
+ Dialog.displayDialog(Game.this, getResources().getString(R.string.conn_error_title), dialogText, true);
+ }
+ else {
+ if (spinner != null) {
+ spinner.dismiss();
+ spinner = null;
+ }
}
}
});
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3a90330f..6f6fac31 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -31,6 +31,7 @@
Your network does not appear to be blocking Moonlight. If you still have trouble connecting, check your PC\'s firewall settings.\n\nIf you are trying to stream over the Internet, install the Moonlight Internet Hosting Tool on your PC and run the included Internet Streaming Tester to check your PC\'s Internet connection.
The network test could not be performed. Please try again later.
Your device\'s current network connection seems to be blocking Moonlight. Streaming over the Internet may not work properly while connected to this network.\n\nThe following network ports were blocked:\n
+ Your device\'s current network connection is blocking Moonlight. Streaming over the Internet may not work properly while connected to this network.
Pairing…