aimitakeshi | 27ed8ad | 2010-07-29 10:12:27 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 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 | |
Glenn Kasten | 40ddcb7 | 2011-11-10 14:58:44 -0800 | [diff] [blame] | 17 | #define LOG_TAG "drmserver" |
| 18 | //#define LOG_NDEBUG 0 |
| 19 | |
aimitakeshi | 27ed8ad | 2010-07-29 10:12:27 +0900 | [diff] [blame] | 20 | #include <binder/IPCThreadState.h> |
| 21 | #include <binder/ProcessState.h> |
| 22 | #include <binder/IServiceManager.h> |
| 23 | #include <utils/Log.h> |
aimitakeshi | 27ed8ad | 2010-07-29 10:12:27 +0900 | [diff] [blame] | 24 | |
| 25 | #include <DrmManagerService.h> |
| 26 | |
| 27 | using namespace android; |
| 28 | |
Aurimas Liutikas | b223117 | 2016-02-12 16:57:08 -0800 | [diff] [blame] | 29 | int main() |
aimitakeshi | 27ed8ad | 2010-07-29 10:12:27 +0900 | [diff] [blame] | 30 | { |
Jeff Tinker | 5a7ddf4 | 2016-04-04 23:19:20 -0700 | [diff] [blame] | 31 | signal(SIGPIPE, SIG_IGN); |
| 32 | |
aimitakeshi | 27ed8ad | 2010-07-29 10:12:27 +0900 | [diff] [blame] | 33 | sp<ProcessState> proc(ProcessState::self()); |
| 34 | sp<IServiceManager> sm = defaultServiceManager(); |
Glenn Kasten | 40ddcb7 | 2011-11-10 14:58:44 -0800 | [diff] [blame] | 35 | ALOGV("ServiceManager: %p", sm.get()); |
aimitakeshi | 27ed8ad | 2010-07-29 10:12:27 +0900 | [diff] [blame] | 36 | DrmManagerService::instantiate(); |
| 37 | ProcessState::self()->startThreadPool(); |
| 38 | IPCThreadState::self()->joinThreadPool(); |
| 39 | } |
| 40 | |