mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 05:43:55 +01:00
26 lines
665 B
Java
26 lines
665 B
Java
package free.nrw.commons.contributions;
|
|
|
|
import android.app.*;
|
|
import android.content.*;
|
|
import android.os.*;
|
|
|
|
public class ContributionsSyncService extends Service {
|
|
|
|
private static final Object sSyncAdapterLock = new Object();
|
|
|
|
private static ContributionsSyncAdapter sSyncAdapter = null;
|
|
|
|
@Override
|
|
public void onCreate() {
|
|
synchronized (sSyncAdapterLock) {
|
|
if (sSyncAdapter == null) {
|
|
sSyncAdapter = new ContributionsSyncAdapter(getApplicationContext(), true);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public IBinder onBind(Intent intent) {
|
|
return sSyncAdapter.getSyncAdapterBinder();
|
|
}
|
|
}
|