mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 03:52:48 +00:00
Improve verbose debugging
This commit is contained in:
parent
814557435d
commit
6eaabc84aa
@ -256,7 +256,20 @@ public class NvHTTP {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String openHttpConnectionToString(String url, boolean enableReadTimeout) throws MalformedURLException, IOException {
|
String openHttpConnectionToString(String url, boolean enableReadTimeout) throws MalformedURLException, IOException {
|
||||||
ResponseBody resp = openHttpConnection(url, enableReadTimeout);
|
if (verbose) {
|
||||||
|
LimeLog.info("Requesting URL: "+url);
|
||||||
|
}
|
||||||
|
|
||||||
|
ResponseBody resp;
|
||||||
|
try {
|
||||||
|
resp = openHttpConnection(url, enableReadTimeout);
|
||||||
|
} catch (IOException e) {
|
||||||
|
if (verbose) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
Scanner s = new Scanner(resp.byteStream());
|
Scanner s = new Scanner(resp.byteStream());
|
||||||
|
|
||||||
String str = "";
|
String str = "";
|
||||||
@ -268,7 +281,7 @@ public class NvHTTP {
|
|||||||
resp.close();
|
resp.close();
|
||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
System.out.println(str);
|
LimeLog.info(url+" -> "+str);
|
||||||
}
|
}
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
@ -364,10 +377,16 @@ public class NvHTTP {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public LinkedList<NvApp> getAppList() throws GfeHttpResponseException, IOException, XmlPullParserException {
|
public LinkedList<NvApp> getAppList() throws GfeHttpResponseException, IOException, XmlPullParserException {
|
||||||
ResponseBody resp = openHttpConnection(baseUrl + "/applist?uniqueid=" + uniqueId, true);
|
if (verbose) {
|
||||||
LinkedList<NvApp> appList = getAppListByReader(new InputStreamReader(resp.byteStream()));
|
// Use the raw function so the app list is printed
|
||||||
resp.close();
|
return getAppListByReader(new StringReader(getAppListRaw()));
|
||||||
return appList;
|
}
|
||||||
|
else {
|
||||||
|
ResponseBody resp = openHttpConnection(baseUrl + "/applist?uniqueid=" + uniqueId, true);
|
||||||
|
LinkedList<NvApp> appList = getAppListByReader(new InputStreamReader(resp.byteStream()));
|
||||||
|
resp.close();
|
||||||
|
return appList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unpair() throws IOException {
|
public void unpair() throws IOException {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user