Make the pairing toast shorter. Display a nice message when we get a 404 instead of a huge URL.

This commit is contained in:
Cameron Gutman 2014-06-22 13:24:14 -07:00
parent 869cbe2e81
commit 579645c07c

View File

@ -1,5 +1,6 @@
package com.limelight; package com.limelight;
import java.io.FileNotFoundException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.SocketException; import java.net.SocketException;
import java.net.UnknownHostException; import java.net.UnknownHostException;
@ -251,7 +252,7 @@ public class Connection extends Activity {
return; return;
} }
Toast.makeText(Connection.this, "Pairing...", Toast.LENGTH_LONG).show(); Toast.makeText(Connection.this, "Pairing...", Toast.LENGTH_SHORT).show();
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -297,8 +298,11 @@ public class Connection extends Activity {
message = null; message = null;
} }
} }
} catch (UnknownHostException e1) { } catch (UnknownHostException e) {
message = "Failed to resolve host"; message = "Failed to resolve host";
} catch (FileNotFoundException e) {
message = "GFE returned an HTTP 404 error. Make sure your PC is running a supported GPU. Using remote desktop software can also cause this error. "
+ "Try rebooting your machine or reinstalling GFE.";
} catch (Exception e) { } catch (Exception e) {
message = e.getMessage(); message = e.getMessage();
} }