blob: 2fc2d0aecd3c1ce95d8703bab29553ad0b1f5510 [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
Jim Millera34dc462015-05-07 18:52:53 -070019#include <binder/IPCThreadState.h>
20#include <binder/IServiceManager.h>
21#include <binder/PermissionCache.h>
Jim Millera34dc462015-05-07 18:52:53 -070022#include <hardware/hardware.h>
23#include <hardware/fingerprint.h>
24#include <hardware/hw_auth_token.h>
Mark Salyzyn66ce3e02016-09-28 10:07:20 -070025#include <keystore/IKeystoreService.h>
26#include <keystore/keystore.h> // for error codes
Mark Salyzyn30f991f2017-01-10 13:19:54 -080027#include <log/log.h>
Mark Salyzyn66ce3e02016-09-28 10:07:20 -070028#include <utils/Log.h>
29#include <utils/String16.h>
Jim Millera34dc462015-05-07 18:52:53 -070030
31#include "FingerprintDaemonProxy.h"
32
33int main() {
34 ALOGI("Starting " LOG_TAG);
35 android::sp<android::IServiceManager> serviceManager = android::defaultServiceManager();
36 android::sp<android::FingerprintDaemonProxy> proxy =
37 android::FingerprintDaemonProxy::getInstance();
38 android::status_t ret = serviceManager->addService(
39 android::FingerprintDaemonProxy::descriptor, proxy);
40 if (ret != android::OK) {
41 ALOGE("Couldn't register " LOG_TAG " binder service!");
42 return -1;
43 }
44
45 /*
46 * We're the only thread in existence, so we're just going to process
47 * Binder transaction as a single-threaded program.
48 */
49 android::IPCThreadState::self()->joinThreadPool();
50 ALOGI("Done");
51 return 0;
52}