diff options
| author | Mathias Agopian <mathias@google.com> | 2010-07-14 20:18:50 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-07-14 20:18:50 -0700 |
| commit | 53459436ed17f46d695d061b08e952a00d679ae6 (patch) | |
| tree | 8bf0e718e33156e37d5f7be95346d83336596608 /cmds | |
| parent | 0779682a490f12f102cd0cf1e768e3c68cfdc512 (diff) | |
| parent | c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c (diff) | |
| download | frameworks_base-53459436ed17f46d695d061b08e952a00d679ae6.zip frameworks_base-53459436ed17f46d695d061b08e952a00d679ae6.tar.gz frameworks_base-53459436ed17f46d695d061b08e952a00d679ae6.tar.bz2 | |
am c74034b6: am 24651682: added BinderService<> template to help creating native binder services
Merge commit 'c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c'
* commit 'c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c':
added BinderService<> template to help creating native binder services
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/surfaceflinger/main_surfaceflinger.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/cmds/surfaceflinger/main_surfaceflinger.cpp b/cmds/surfaceflinger/main_surfaceflinger.cpp index d650721..78b1007 100644 --- a/cmds/surfaceflinger/main_surfaceflinger.cpp +++ b/cmds/surfaceflinger/main_surfaceflinger.cpp @@ -1,18 +1,25 @@ -#include <binder/IPCThreadState.h> -#include <binder/ProcessState.h> -#include <binder/IServiceManager.h> -#include <utils/Log.h> +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include <binder/BinderService.h> #include <SurfaceFlinger.h> using namespace android; -int main(int argc, char** argv) -{ - sp<ProcessState> proc(ProcessState::self()); - sp<IServiceManager> sm = defaultServiceManager(); - LOGI("ServiceManager: %p", sm.get()); - SurfaceFlinger::instantiate(); - ProcessState::self()->startThreadPool(); - IPCThreadState::self()->joinThreadPool(); +int main(int argc, char** argv) { + SurfaceFlinger::publishAndJoinThreadPool(); + return 0; } |
