Remove uniqueId parameter from NvHTTP.getServerInfo

This commit is contained in:
Cameron Gutman 2016-01-02 16:28:58 -06:00
parent 67dc2ef9ab
commit 57da68c0e2
2 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ public class NvConnection {
{ {
NvHTTP h = new NvHTTP(context.serverAddress, uniqueId, null, cryptoProvider); NvHTTP h = new NvHTTP(context.serverAddress, uniqueId, null, cryptoProvider);
String serverInfo = h.getServerInfo(uniqueId); String serverInfo = h.getServerInfo();
String serverVersion = h.getServerVersion(serverInfo); String serverVersion = h.getServerVersion(serverInfo);
if (serverVersion == null || serverVersion.indexOf('.') < 0) { if (serverVersion == null || serverVersion.indexOf('.') < 0) {
context.connListener.displayMessage("Server major version not present"); context.connListener.displayMessage("Server major version not present");

View File

@ -169,7 +169,7 @@ public class NvHTTP {
} }
} }
public String getServerInfo(String uniqueId) throws MalformedURLException, IOException, XmlPullParserException { public String getServerInfo() throws MalformedURLException, IOException, XmlPullParserException {
String resp; String resp;
try { try {
resp = openHttpConnectionToString(baseUrlHttps + "/serverinfo?uniqueid=" + uniqueId, true); resp = openHttpConnectionToString(baseUrlHttps + "/serverinfo?uniqueid=" + uniqueId, true);
@ -192,7 +192,7 @@ public class NvHTTP {
public ComputerDetails getComputerDetails() throws MalformedURLException, IOException, XmlPullParserException { public ComputerDetails getComputerDetails() throws MalformedURLException, IOException, XmlPullParserException {
ComputerDetails details = new ComputerDetails(); ComputerDetails details = new ComputerDetails();
String serverInfo = getServerInfo(uniqueId); String serverInfo = getServerInfo();
details.name = getXmlString(serverInfo, "hostname").trim(); details.name = getXmlString(serverInfo, "hostname").trim();
details.uuid = UUID.fromString(getXmlString(serverInfo, "uniqueid").trim()); details.uuid = UUID.fromString(getXmlString(serverInfo, "uniqueid").trim());
@ -328,7 +328,7 @@ public class NvHTTP {
} }
public PairingManager.PairState getPairState() throws IOException, XmlPullParserException { public PairingManager.PairState getPairState() throws IOException, XmlPullParserException {
return pm.getPairState(getServerInfo(uniqueId)); return pm.getPairState(getServerInfo());
} }
public PairingManager.PairState getPairState(String serverInfo) throws IOException, XmlPullParserException { public PairingManager.PairState getPairState(String serverInfo) throws IOException, XmlPullParserException {