Skip to content

Commit 6039337

Browse files
authored
Merge pull request #845 from OneSignal/830-fix
Removed JobIntentService import causing custom class of same name to …
2 parents 2c29743 + adcff28 commit 6039337

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private static void startGCMService(Context context, Bundle bundle) {
157157
}
158158

159159
/**
160-
* This function uses an android.support.v4.app.JobIntentService in order to enqueue the jobs.
160+
* This function uses a com.OneSignal.JobIntentService in order to enqueue the jobs.
161161
* Some devices with Api O and upper can't schedule more than 100 distinct jobs,
162162
* this will process one notification sequentially like an IntentService.
163163
*/

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import android.os.Build;
66
import android.support.annotation.NonNull;
77
import android.support.annotation.RequiresApi;
8-
import android.support.v4.app.JobIntentService;
8+
9+
// Uses modified JobIntentService class that's part of the onesignal package
910

1011
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
1112
public class GcmIntentJobService extends JobIntentService {
@@ -22,6 +23,6 @@ protected void onHandleWork(@NonNull Intent intent) {
2223
}
2324

2425
public static void enqueueWork(Context context, Intent intent) {
25-
enqueueWork(context, GcmIntentJobService.class, JOB_ID, intent);
26+
enqueueWork(context, GcmIntentJobService.class, JOB_ID, intent, false);
2627
}
2728
}

0 commit comments

Comments
 (0)