0

I have bind an activity to a remote service through aidl interface. Various other activities are also bound to it. After some point of time, calls are getting blocked. When I open that particular activity it starts a handlerthread and it is calling some remote methods through aidl interface. But they are blocked so thread is also getting blocked. Inside onDestroy() method, I am trying to do handlerthread.quit(), but thread is not stopping. So every time I am starting that activity threads are started but not getting stopped on destroying activity.

My question is how can I stop the handlerthread which is in blocked state?

4

1 回答 1

0

您的aidl 接口可能是双向的。尝试制作它们oneway,这将使它们无阻塞。

此外,如果您的要求不是让它们继续运行,请在此处查看此链接,它解释了如何停止处理程序线程。

于 2016-02-24T18:28:28.597 回答