michael@0: /** michael@0: * Copyright (c) 2012-2013, Gerald Garcia michael@0: * michael@0: * This file is part of Andoid Caldav Sync Adapter Free. michael@0: * michael@0: * Andoid Caldav Sync Adapter Free is free software: you can redistribute michael@0: * it and/or modify it under the terms of the GNU General Public License michael@0: * as published by the Free Software Foundation, either version 3 of the michael@0: * License, or at your option any later version. michael@0: * michael@0: * Andoid Caldav Sync Adapter Free is distributed in the hope that michael@0: * it will be useful, but WITHOUT ANY WARRANTY; without even the implied michael@0: * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the michael@0: * GNU General Public License for more details. michael@0: * michael@0: * You should have received a copy of the GNU General Public License michael@0: * along with Andoid Caldav Sync Adapter Free. michael@0: * If not, see . michael@0: * michael@0: */ michael@0: michael@0: package org.gege.caldavsyncadapter.authenticator; michael@0: michael@0: import android.app.Service; michael@0: import android.content.Intent; michael@0: import android.os.IBinder; michael@0: import android.util.Log; michael@0: michael@0: michael@0: public class AuthenticationService extends Service { michael@0: michael@0: private static final String TAG = "AuthenticationService"; michael@0: michael@0: private Authenticator mAuthenticator; michael@0: michael@0: @Override michael@0: public void onCreate() { michael@0: if (Log.isLoggable(TAG, Log.VERBOSE)) { michael@0: Log.v(TAG, "SampleSyncAdapter Authentication Service started."); michael@0: } michael@0: mAuthenticator = new Authenticator(this); michael@0: } michael@0: michael@0: @Override michael@0: public void onDestroy() { michael@0: if (Log.isLoggable(TAG, Log.VERBOSE)) { michael@0: Log.v(TAG, "SampleSyncAdapter Authentication Service stopped."); michael@0: } michael@0: } michael@0: michael@0: @Override michael@0: public IBinder onBind(Intent intent) { michael@0: if (Log.isLoggable(TAG, Log.VERBOSE)) { michael@0: Log.v(TAG, "getBinder()... returning the AccountAuthenticator binder for intent " michael@0: + intent); michael@0: } michael@0: return mAuthenticator.getIBinder(); michael@0: } michael@0: }