Welcome to mirror list, hosted at ThFree Co, Russian Federation.

NativeJobService.java « scheduling « maps « mapswithme « com « src « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cf7bee36e65e0af36350badc805d180d2859da75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.mapswithme.maps.scheduling;

import android.annotation.TargetApi;
import android.app.job.JobParameters;
import android.app.job.JobService;
import android.os.Build;
import android.support.annotation.NonNull;

import com.mapswithme.util.log.Logger;
import com.mapswithme.util.log.LoggerFactory;

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public class NativeJobService extends JobService
{
  private static final Logger LOGGER = LoggerFactory.INSTANCE.getLogger(LoggerFactory.Type.MISC);
  private static final String TAG = NativeJobService.class.getSimpleName();

  @SuppressWarnings("NullableProblems")
  @NonNull
  private JobServiceDelegate mDelegate;

  @Override
  public void onCreate()
  {
    super.onCreate();
    mDelegate = new JobServiceDelegate(getApplication());
  }

  @Override
  public boolean onStartJob(JobParameters params)
  {
    LOGGER.d(TAG, "onStartJob");
    return mDelegate.onStartJob();
  }

  @Override
  public boolean onStopJob(JobParameters params)
  {
    return mDelegate.onStopJob();
  }
}