From b69ffdb2078e2272fa5637a8c8f2b58020946e20 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Wed, 19 Apr 2017 16:40:49 -0700 Subject: [PATCH] Stop hwbinder threads from app_process. To prevent it from hanging up. Bug: 37500397 Bug: 34085250 Test: DismissDialogsInstrumentation test Change-Id: Ia69f6a5676666bc9286272b82f242d7b1d0ee286 --- cmds/app_process/Android.mk | 1 + cmds/app_process/app_main.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmds/app_process/Android.mk b/cmds/app_process/Android.mk index eaad3a7ec5297..72fe0516f4808 100644 --- a/cmds/app_process/Android.mk +++ b/cmds/app_process/Android.mk @@ -5,6 +5,7 @@ app_process_common_shared_libs := \ libbinder \ libcutils \ libdl \ + libhwbinder \ liblog \ libnativeloader \ libutils \ diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 0ea141c292dd6..e56417b82fc05 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include @@ -85,6 +85,7 @@ public: ar->callMain(mClassName, mClass, mArgs); IPCThreadState::self()->stopProcess(); + hardware::IPCThreadState::self()->stopProcess(); } virtual void onZygoteInit() @@ -99,6 +100,7 @@ public: if (mClassName.isEmpty()) { // if zygote IPCThreadState::self()->stopProcess(); + hardware::IPCThreadState::self()->stopProcess(); } AndroidRuntime::onExit(code);