File tree Expand file tree Collapse file tree 1 file changed +3
-24
lines changed
packages/https/platforms/android/java/com/nativescript/https Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments