blob: 8fa7ed18e4c1fc76ef0fad2729b10711cfad4679 [file] [log] [blame]
Jim Millera34dc462015-05-07 18:52:53 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of 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,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#define LOG_TAG "fingerprintd"
18
19#include <cutils/log.h>
20#include <utils/Log.h>
21
22#include <binder/IPCThreadState.h>
23#include <binder/IServiceManager.h>
24#include <binder/PermissionCache.h>
25#include <utils/String16.h>
26
27#include <keystore/IKeystoreService.h>
28#include <keystore/keystore.h> // for error codes
29
30#include <hardware/hardware.h>
31#include <hardware/fingerprint.h>
32#include <hardware/hw_auth_token.h>
33
34#include "FingerprintDaemonProxy.h"
35
36int main() {
37 ALOGI("Starting " LOG_TAG);
38 android::sp<android::IServiceManager> serviceManager = android::defaultServiceManager();
39 android::sp<android::FingerprintDaemonProxy> proxy =
40 android::FingerprintDaemonProxy::getInstance();
41 android::status_t ret = serviceManager->addService(
42 android::FingerprintDaemonProxy::descriptor, proxy);
43 if (ret != android::OK) {
44 ALOGE("Couldn't register " LOG_TAG " binder service!");
45 return -1;
46 }
47
48 /*
49 * We're the only thread in existence, so we're just going to process
50 * Binder transaction as a single-threaded program.
51 */
52 android::IPCThreadState::self()->joinThreadPool();
53 ALOGI("Done");
54 return 0;
55}