TestAuthenticationService.java revision dcf751d75ad5d31620a4216d8c53fd59525e8bd8
1/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16
17package com.android.contacts.tests.testauth;
18
19import android.app.Service;
20import android.content.Intent;
21import android.os.IBinder;
22import android.util.Log;
23
24public abstract class TestAuthenticationService extends Service {
25
26    private TestAuthenticator mAuthenticator;
27
28    @Override
29    public void onCreate() {
30        Log.v(TestauthConstants.LOG_TAG, this + " Service started.");
31        mAuthenticator = new TestAuthenticator(this);
32    }
33
34    @Override
35    public void onDestroy() {
36        Log.v(TestauthConstants.LOG_TAG, this + " Service stopped.");
37    }
38
39    @Override
40    public IBinder onBind(Intent intent) {
41        Log.v(TestauthConstants.LOG_TAG, this + " getBinder() intent=" + intent);
42        return mAuthenticator.getIBinder();
43    }
44
45    public static class Basic extends TestAuthenticationService {
46    }
47}
48