Skip to content

Commit cd4addf

Browse files
committed
Minor leftover Context fixup
1 parent b212512 commit cd4addf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sample/src/main/java/com/loopj/android/http/sample/AsyncBackgroundThreadSample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public RequestHandle executeSample(final AsyncHttpClient client, final String UR
5555
FutureTask<RequestHandle> future = new FutureTask<>(new Callable<RequestHandle>() {
5656
public RequestHandle call() {
5757
Log.d(LOG_TAG, "Executing GET request on background thread");
58-
return client.get(null, URL, headers, null, responseHandler);
58+
return client.get(ctx, URL, headers, null, responseHandler);
5959
}
6060
});
6161

@@ -66,7 +66,7 @@ public RequestHandle call() {
6666
handle = future.get(5, TimeUnit.SECONDS);
6767
Log.d(LOG_TAG, "Background thread for GET request has finished");
6868
} catch (Exception e) {
69-
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
69+
Toast.makeText(ctx, e.getMessage(), Toast.LENGTH_LONG).show();
7070
e.printStackTrace();
7171
}
7272

0 commit comments

Comments
 (0)