Skip to content

Commit 3cb157f

Browse files
committed
fix(android): return type check
1 parent b2d3ee5 commit 3cb157f

File tree

1 file changed

+2
-2
lines changed
  • src/platforms/android/java/com/github/triniwiz/async

1 file changed

+2
-2
lines changed

src/platforms/android/java/com/github/triniwiz/async/Async.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ public void onProgress(long loaded, long total) {
518518
result.content = stream.toString();
519519
result.contentText = (String) result.content;
520520
callback.onComplete(result);
521-
} else if (returnType.equals("application/json")) {
521+
} else if (returnType.contains("application/json")) {
522522
String returnValue = stream.toString();
523523
JSONTokener tokener = new JSONTokener(returnValue);
524524
Object value = tokener.nextValue();
@@ -542,7 +542,7 @@ public void onProgress(long loaded, long total) {
542542
if (isTextType(returnType)) {
543543
result.content = stream.toString();
544544
callback.onCancel(result);
545-
} else if (returnType.equals("application/json")) {
545+
} else if (returnType.contains("application/json")) {
546546
String returnValue = stream.toString();
547547
JSONTokener tokener = new JSONTokener(returnValue);
548548
try {

0 commit comments

Comments
 (0)