1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/org/gege/caldavsyncadapter/authenticator/AuthenticationService.java Tue Feb 10 18:12:00 2015 +0100 1.3 @@ -0,0 +1,59 @@ 1.4 +/** 1.5 + * Copyright (c) 2012-2013, Gerald Garcia 1.6 + * 1.7 + * This file is part of Andoid Caldav Sync Adapter Free. 1.8 + * 1.9 + * Andoid Caldav Sync Adapter Free is free software: you can redistribute 1.10 + * it and/or modify it under the terms of the GNU General Public License 1.11 + * as published by the Free Software Foundation, either version 3 of the 1.12 + * License, or at your option any later version. 1.13 + * 1.14 + * Andoid Caldav Sync Adapter Free is distributed in the hope that 1.15 + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 1.16 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1.17 + * GNU General Public License for more details. 1.18 + * 1.19 + * You should have received a copy of the GNU General Public License 1.20 + * along with Andoid Caldav Sync Adapter Free. 1.21 + * If not, see <http://www.gnu.org/licenses/>. 1.22 + * 1.23 + */ 1.24 + 1.25 +package org.gege.caldavsyncadapter.authenticator; 1.26 + 1.27 +import android.app.Service; 1.28 +import android.content.Intent; 1.29 +import android.os.IBinder; 1.30 +import android.util.Log; 1.31 + 1.32 + 1.33 +public class AuthenticationService extends Service { 1.34 + 1.35 + private static final String TAG = "AuthenticationService"; 1.36 + 1.37 + private Authenticator mAuthenticator; 1.38 + 1.39 + @Override 1.40 + public void onCreate() { 1.41 + if (Log.isLoggable(TAG, Log.VERBOSE)) { 1.42 + Log.v(TAG, "SampleSyncAdapter Authentication Service started."); 1.43 + } 1.44 + mAuthenticator = new Authenticator(this); 1.45 + } 1.46 + 1.47 + @Override 1.48 + public void onDestroy() { 1.49 + if (Log.isLoggable(TAG, Log.VERBOSE)) { 1.50 + Log.v(TAG, "SampleSyncAdapter Authentication Service stopped."); 1.51 + } 1.52 + } 1.53 + 1.54 + @Override 1.55 + public IBinder onBind(Intent intent) { 1.56 + if (Log.isLoggable(TAG, Log.VERBOSE)) { 1.57 + Log.v(TAG, "getBinder()... returning the AccountAuthenticator binder for intent " 1.58 + + intent); 1.59 + } 1.60 + return mAuthenticator.getIBinder(); 1.61 + } 1.62 +} 1.63 \ No newline at end of file