src/org/gege/caldavsyncadapter/authenticator/AuthenticationService.java

changeset 0
fb9019fb1bf7
equal deleted inserted replaced
-1:000000000000 0:da485fbf59a3
1 /**
2 * Copyright (c) 2012-2013, Gerald Garcia
3 *
4 * This file is part of Andoid Caldav Sync Adapter Free.
5 *
6 * Andoid Caldav Sync Adapter Free is free software: you can redistribute
7 * it and/or modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation, either version 3 of the
9 * License, or at your option any later version.
10 *
11 * Andoid Caldav Sync Adapter Free is distributed in the hope that
12 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Andoid Caldav Sync Adapter Free.
18 * If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22 package org.gege.caldavsyncadapter.authenticator;
23
24 import android.app.Service;
25 import android.content.Intent;
26 import android.os.IBinder;
27 import android.util.Log;
28
29
30 public class AuthenticationService extends Service {
31
32 private static final String TAG = "AuthenticationService";
33
34 private Authenticator mAuthenticator;
35
36 @Override
37 public void onCreate() {
38 if (Log.isLoggable(TAG, Log.VERBOSE)) {
39 Log.v(TAG, "SampleSyncAdapter Authentication Service started.");
40 }
41 mAuthenticator = new Authenticator(this);
42 }
43
44 @Override
45 public void onDestroy() {
46 if (Log.isLoggable(TAG, Log.VERBOSE)) {
47 Log.v(TAG, "SampleSyncAdapter Authentication Service stopped.");
48 }
49 }
50
51 @Override
52 public IBinder onBind(Intent intent) {
53 if (Log.isLoggable(TAG, Log.VERBOSE)) {
54 Log.v(TAG, "getBinder()... returning the AccountAuthenticator binder for intent "
55 + intent);
56 }
57 return mAuthenticator.getIBinder();
58 }
59 }

mercurial