I think it won't break anything?

This commit is contained in:
d8ahazard
2016-09-08 14:47:04 -05:00
parent f404fe0570
commit e3866eeb29
14 changed files with 567 additions and 556 deletions
@@ -1,5 +1,7 @@
package com.topjohnwu.magisk.utils;
import android.util.Log;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
@@ -33,12 +35,15 @@ public class WebRequest {
*/
public String makeWebServiceCall(String url, int requestmethod) {
addNewLine=false;
Log.d("Magisk","WebRequest: Service call received for URL " + url);
return this.makeWebServiceCall(url, requestmethod, null);
}
public String makeWebServiceCall(String url, int requestmethod, boolean addNewLines) {
addNewLine = addNewLines;
Log.d("Magisk","WebRequest: Service call(bool) received for URL " + url);
return this.makeWebServiceCall(url, requestmethod, null);
}
@@ -99,7 +104,11 @@ public class WebRequest {
String line;
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
while ((line = br.readLine()) != null) {
response += line + "\n";
if (addNewLine) {
response += line + "\n";
} else {
response += line;
}
}
} else {
response = "";