From 502e4e708d11eab3cd396b46b7f209616b7b7d7c Mon Sep 17 00:00:00 2001 From: ql Date: Mon, 26 Jul 2021 08:08:09 +0000 Subject: [PATCH 1/3] update services/samgr/native/source/sa_main.cpp. Signed-off-by: NEEN --- services/samgr/native/source/sa_main.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/services/samgr/native/source/sa_main.cpp b/services/samgr/native/source/sa_main.cpp index 9811be2c..242a8418 100755 --- a/services/samgr/native/source/sa_main.cpp +++ b/services/samgr/native/source/sa_main.cpp @@ -13,15 +13,30 @@ * limitations under the License. */ +#include +#include + #include "errors.h" #include "ipc_skeleton.h" #include "ipc_types.h" #include "iservice_registry.h" #include "sam_log.h" #include "system_ability_manager.h" - + using namespace OHOS; +void startDBinderService(OHOS::sptr manager) { + int time = 30; + while (time-- > 0) { + sleep(1); + } + auto dBinder = manager->GetDBinder(); + if (dBinder != nullptr) { + bool ret = dBinder->StartDBinderService(); + HILOGI("started dbinder service result is %{public}s", ret ? "ok" : "fail"); + } +} + int main(int argc, char *argv[]) { HILOGI("%{public}s called, enter System Ability Manager ", __func__); @@ -31,9 +46,11 @@ int main(int argc, char *argv[]) // Tell IPCThreadState we're the service manager OHOS::sptr serv = manager->AsObject(); IPCSkeleton::SetContextObject(serv); + std::thread th(startDBinderService, manager); + th.detach(); // Create IPCThreadPool and join in. HILOGI("start System Ability Manager Loop"); OHOS::IPCSkeleton::JoinWorkThread(); return -1; -} +} \ No newline at end of file -- Gitee From 9fa12ae4fb2e22787226b7b6a4cb9164bb32d607 Mon Sep 17 00:00:00 2001 From: ql Date: Mon, 26 Jul 2021 08:12:59 +0000 Subject: [PATCH 2/3] update services/samgr/native/source/sa_main.cpp. Signed-off-by: NEEN --- services/samgr/native/source/sa_main.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/services/samgr/native/source/sa_main.cpp b/services/samgr/native/source/sa_main.cpp index 242a8418..9811be2c 100755 --- a/services/samgr/native/source/sa_main.cpp +++ b/services/samgr/native/source/sa_main.cpp @@ -13,29 +13,14 @@ * limitations under the License. */ -#include -#include - #include "errors.h" #include "ipc_skeleton.h" #include "ipc_types.h" #include "iservice_registry.h" #include "sam_log.h" #include "system_ability_manager.h" - -using namespace OHOS; -void startDBinderService(OHOS::sptr manager) { - int time = 30; - while (time-- > 0) { - sleep(1); - } - auto dBinder = manager->GetDBinder(); - if (dBinder != nullptr) { - bool ret = dBinder->StartDBinderService(); - HILOGI("started dbinder service result is %{public}s", ret ? "ok" : "fail"); - } -} +using namespace OHOS; int main(int argc, char *argv[]) { @@ -46,11 +31,9 @@ int main(int argc, char *argv[]) // Tell IPCThreadState we're the service manager OHOS::sptr serv = manager->AsObject(); IPCSkeleton::SetContextObject(serv); - std::thread th(startDBinderService, manager); - th.detach(); // Create IPCThreadPool and join in. HILOGI("start System Ability Manager Loop"); OHOS::IPCSkeleton::JoinWorkThread(); return -1; -} \ No newline at end of file +} -- Gitee From 30c9194f8f52297baf56a169d7cd9ec29ba0ef3b Mon Sep 17 00:00:00 2001 From: ql Date: Mon, 9 Aug 2021 10:17:37 +0000 Subject: [PATCH 3/3] add OAT.xml. Signed-off-by: NEEN --- OAT.xml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 OAT.xml diff --git a/OAT.xml b/OAT.xml new file mode 100644 index 00000000..9b3e485a --- /dev/null +++ b/OAT.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + \ No newline at end of file -- Gitee