michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.fxa.sync; michael@0: michael@0: import android.app.Service; michael@0: import android.content.Intent; michael@0: import android.os.IBinder; michael@0: michael@0: public class FxAccountSyncService extends Service { michael@0: private static final Object syncAdapterLock = new Object(); michael@0: private static FxAccountSyncAdapter syncAdapter = null; michael@0: michael@0: @Override michael@0: public void onCreate() { michael@0: synchronized (syncAdapterLock) { michael@0: if (syncAdapter == null) { michael@0: syncAdapter = new FxAccountSyncAdapter(getApplicationContext(), true); michael@0: } michael@0: } michael@0: } michael@0: michael@0: @Override michael@0: public IBinder onBind(Intent intent) { michael@0: return syncAdapter.getSyncAdapterBinder(); michael@0: } michael@0: }