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

Tue, 10 Feb 2015 18:12:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 10 Feb 2015 18:12:00 +0100
changeset 0
fb9019fb1bf7
permissions
-rw-r--r--

Import initial revisions of existing project AndroidCaldavSyncAdapater,
forked from upstream repository at 27e8a0f8495c92e0780d450bdf0c7cec77a03a55.

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

mercurial