Skip to content

Commit f42a12d

Browse files
committed
chore: cleanup
1 parent 73817e3 commit f42a12d

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

packages/https/platforms/android/java/com/nativescript/https/OkHttpResponse.java

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -396,31 +396,10 @@ static String responseBodyToString(OkHttpResponse response) throws IOException {
396396
}
397397

398398
public String asString() throws IOException {
399-
// if (getMainHandler().getLooper() != Looper.myLooper()) {
400-
// try {
401-
return responseBodyToString(this);
402-
// } catch (final Exception ex) {
403-
// Log.d("JS", "RuntimeException " + ex);
404-
// return null;
405-
// }
399+
// if (RUN_ON_MAIN_THREAD && getMainHandler().getLooper() === Looper.myLooper()) {
400+
// } else {
401+
return responseBodyToString(this);
406402
// }
407-
// final Object[] arr = new Object[1];
408-
// Log.d("JS", "test asString");
409-
// postAndWait(getMainHandler(), new Runnable() {
410-
// @Override
411-
// public void run() {
412-
// Log.d("JS", "test asString runnable");
413-
// try {
414-
// arr[1] = responseBodyToString(OkHttpResponse.this);
415-
// Log.d("JS", "test asString runnable result " + (String)arr[1]);
416-
// } catch (final Exception ex) {
417-
// Log.d("JS", "RuntimeException " + ex);
418-
// // throw new RuntimeException(ex);
419-
// }
420-
// }
421-
// });
422-
// Log.d("JS", "test asString result " + (String)arr[1]);
423-
// return (String)arr[1];
424403
}
425404

426405
public void asStringAsync(final OkHttpResponseAsyncCallback callback) {

0 commit comments

Comments
 (0)