forked from mirrors/gecko-dev
Refactored existing LeanplumPushInstanceIDService to support Oreo background execution limits in Leanplum after upgrade. MozReview-Commit-ID: JjUlrOv34KR *** --HG-- extra : amend_source : df46ff00a671a02dc1c6fda3d0402d9216d7e84f
25 lines
No EOL
656 B
Java
25 lines
No EOL
656 B
Java
package com.leanplum;
|
|
import android.annotation.TargetApi;
|
|
import android.app.job.JobParameters;
|
|
import android.app.job.JobService;
|
|
|
|
/**
|
|
* Leanplum GCM registration Job Service to start registration service.
|
|
*
|
|
* @author Anna Orlova
|
|
*/
|
|
@TargetApi(21)
|
|
public class LeanplumGcmRegistrationJobService extends JobService {
|
|
public static final int JOB_ID = -63722755;
|
|
|
|
@Override
|
|
public boolean onStartJob(JobParameters jobParameters) {
|
|
LeanplumNotificationHelper.startPushRegistrationService(this, "GCM");
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean onStopJob(JobParameters jobParameters) {
|
|
return false;
|
|
}
|
|
} |