This source file includes following definitions.
- getOrCreateSyncAdapter
- onBind
- createChromiumSyncAdapter
package org.chromium.chrome.browser.sync;
import android.app.Application;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
public abstract class ChromiumSyncAdapterService extends Service {
private static ChromiumSyncAdapter sSyncAdapter = null;
private static final Object LOCK = new Object();
private ChromiumSyncAdapter getOrCreateSyncAdapter(Context applicationContext) {
synchronized (LOCK) {
if (sSyncAdapter == null) {
sSyncAdapter = createChromiumSyncAdapter(applicationContext, getApplication());
}
}
return sSyncAdapter;
}
@Override
public IBinder onBind(Intent intent) {
return getOrCreateSyncAdapter(getApplicationContext()).getSyncAdapterBinder();
}
protected abstract ChromiumSyncAdapter createChromiumSyncAdapter(Context applicationContext,
Application application);
}