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

OwnCloudSettingsSyncService.java « services « owncloudnewsreader « luhmer « de « java « main « src « News-Android-App - github.com/nextcloud/news-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 213e7bf1a9547eaaa6a3e13f96751f8aec41758d (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
package de.luhmer.owncloudnewsreader.services;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import de.luhmer.owncloudnewsreader.authentication.OwnCloudSyncAdapter;

public class OwnCloudSettingsSyncService extends Service {
	  private static final Object sSyncAdapterLock = new Object();
	  private static OwnCloudSyncAdapter sSyncAdapter = null;
	 
	  @Override
	  public void onCreate() {
	      synchronized (sSyncAdapterLock) {
	          if (sSyncAdapter == null) {
	              sSyncAdapter = new OwnCloudSyncAdapter(this, true);
	          }
	      }
	  }
	 
	  @Override
	  public IBinder onBind(Intent intent) {
	      return sSyncAdapter.getSyncAdapterBinder();
	  }
}