Trim strings retrieved from the applist XML

This commit is contained in:
Cameron Gutman 2015-02-25 19:56:56 -05:00
parent 3f7e4d817f
commit e6527de786

View File

@ -176,7 +176,7 @@ public class NvHTTP {
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());
details.macAddress = getXmlString(serverInfo, "mac"); details.macAddress = getXmlString(serverInfo, "mac").trim();
// If there's no LocalIP field, use the address we hit the server on // If there's no LocalIP field, use the address we hit the server on
String localIpStr = getXmlString(serverInfo, "LocalIP"); String localIpStr = getXmlString(serverInfo, "LocalIP");
@ -346,11 +346,11 @@ public class NvHTTP {
case (XmlPullParser.TEXT): case (XmlPullParser.TEXT):
NvApp app = appList.getLast(); NvApp app = appList.getLast();
if (currentTag.peek().equals("AppTitle")) { if (currentTag.peek().equals("AppTitle")) {
app.setAppName(xpp.getText()); app.setAppName(xpp.getText().trim());
} else if (currentTag.peek().equals("ID")) { } else if (currentTag.peek().equals("ID")) {
app.setAppId(xpp.getText()); app.setAppId(xpp.getText().trim());
} else if (currentTag.peek().equals("IsRunning")) { } else if (currentTag.peek().equals("IsRunning")) {
app.setIsRunning(xpp.getText()); app.setIsRunning(xpp.getText().trim());
} }
break; break;
} }