Skip to content

Commit df027d7

Browse files
committed
Added OS_ prefix so tests wait for these threads
* This would create a deadlock on the main thread in the past, Roboelectric 4.0 may have fixed this.
1 parent a0febec commit df027d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OneSignalRestClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,23 @@ public static void put(final String url, final JSONObject jsonBody, final Respon
6666
public void run() {
6767
makeRequest(url, "PUT", jsonBody, responseHandler, TIMEOUT, null);
6868
}
69-
}).start();
69+
}, "OS_REST_ASYNC_PUT").start();
7070
}
7171

7272
public static void post(final String url, final JSONObject jsonBody, final ResponseHandler responseHandler) {
7373
new Thread(new Runnable() {
7474
public void run() {
7575
makeRequest(url, "POST", jsonBody, responseHandler, TIMEOUT, null);
7676
}
77-
}).start();
77+
}, "OS_REST_ASYNC_POST").start();
7878
}
7979

8080
public static void get(final String url, final ResponseHandler responseHandler, @NonNull final String cacheKey) {
8181
new Thread(new Runnable() {
8282
public void run() {
8383
makeRequest(url, null, null, responseHandler, GET_TIMEOUT, cacheKey);
8484
}
85-
}).start();
85+
}, "OS_REST_ASYNC_GET").start();
8686
}
8787

8888
public static void getSync(final String url, final ResponseHandler responseHandler, @NonNull String cacheKey) {

0 commit comments

Comments
 (0)