mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
Fix crash in onPause(). Fix IP address display in nvComputer.toString(). Increase mDNS response timeout to 1 second.
This commit is contained in:
parent
43e4af0c8b
commit
baf01b93e3
@ -28,8 +28,6 @@ public class Connection extends Activity {
|
||||
|
||||
private static final String DEFAULT_HOST = "192.168.1.240";
|
||||
public static final String HOST_KEY = "hostText";
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
@ -58,20 +56,18 @@ public class Connection extends Activity {
|
||||
Log.v("NvmDNS", "onCreate");
|
||||
|
||||
|
||||
NvmDNS dns = new NvmDNS();
|
||||
dns.execute();
|
||||
NvmDNS dns = new NvmDNS();
|
||||
dns.execute();
|
||||
|
||||
|
||||
setContentView(R.layout.activity_connection);
|
||||
|
||||
|
||||
this.statusButton = (Button) findViewById(R.id.statusButton);
|
||||
this.pairButton = (Button) findViewById(R.id.pairButton);
|
||||
this.hostText = (TextView) findViewById(R.id.hostTextView);
|
||||
|
||||
|
||||
//prefs = getPreferences(0);
|
||||
//this.hostText.setText(prefs.getString(Connection.HOST_KEY, Connection.DEFAULT_HOST));
|
||||
prefs = getPreferences(0);
|
||||
this.hostText.setText(prefs.getString(Connection.HOST_KEY, Connection.DEFAULT_HOST));
|
||||
|
||||
this.statusButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
|
@ -96,7 +96,7 @@ public class NvComputer {
|
||||
returnStringBuilder.append("\n|- Hostname: ");
|
||||
returnStringBuilder.append(this.hostname);
|
||||
returnStringBuilder.append("\n|- IP Address: ");
|
||||
returnStringBuilder.append(this.ipAddress.toString());
|
||||
returnStringBuilder.append(this.ipAddressString);
|
||||
returnStringBuilder.append("\n|- Computer State: ");
|
||||
returnStringBuilder.append(this.state);
|
||||
returnStringBuilder.append("\n|- Number of Apps: ");
|
||||
|
@ -33,7 +33,7 @@ public class NvmDNS extends AsyncTask<Void, Integer, Void> {
|
||||
public static InetAddress MDNS_MULTICAST_ADDRESS;
|
||||
public static final short MDNS_PORT = 5353;
|
||||
|
||||
public static final int WAIT_MS = 100;
|
||||
public static final int WAIT_MS = 1000;
|
||||
|
||||
private HashSet<NvComputer> responses;
|
||||
private MulticastSocket socket;
|
||||
|
Loading…
x
Reference in New Issue
Block a user