fune/mobile/android/thirdparty/com/leanplum/LeanplumGcmRegistrationJobService.java
Andrei Lazar fc8235eccf Bug 1473518 - Abide by Android Oreo background execution limits [Leanplum after upgrade] r=nalexander
Refactored existing LeanplumPushInstanceIDService to support Oreo background
execution limits in Leanplum after upgrade.

MozReview-Commit-ID: JjUlrOv34KR
***

--HG--
extra : amend_source : df46ff00a671a02dc1c6fda3d0402d9216d7e84f
2018-07-06 13:21:27 +03:00

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;
}
}