summaryrefslogtreecommitdiffstats
path: root/cmds/surfaceflinger/main_surfaceflinger.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-07-14 20:16:27 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-07-14 20:16:27 -0700
commitc74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c (patch)
tree6888e3fd649f47ecd8937de677475439c97985de /cmds/surfaceflinger/main_surfaceflinger.cpp
parent78983a9133d3dd3f08b1ec462a7e2f9e7bfa9e2f (diff)
parent24651682edaf71e8a826f23a7ea09bc97c8072c4 (diff)
downloadframeworks_base-c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c.zip
frameworks_base-c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c.tar.gz
frameworks_base-c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c.tar.bz2
am 24651682: added BinderService<> template to help creating native binder services
Merge commit '24651682edaf71e8a826f23a7ea09bc97c8072c4' into gingerbread-plus-aosp * commit '24651682edaf71e8a826f23a7ea09bc97c8072c4': added BinderService<> template to help creating native binder services
Diffstat (limited to 'cmds/surfaceflinger/main_surfaceflinger.cpp')
-rw-r--r--cmds/surfaceflinger/main_surfaceflinger.cpp31
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;
}