Prevent leaking ServiceConnection when process/threads killed
Change-Id: Id5d85fbdd0d044a59cc61748432e3f714264bcd5
This commit is contained in:
parent
4418596f9b
commit
8ba8c1648c
@ -76,7 +76,11 @@ public abstract class ServiceProxy {
|
||||
// Run our task on a new thread
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
runTask();
|
||||
try {
|
||||
runTask();
|
||||
} finally {
|
||||
endTask();
|
||||
}
|
||||
}}).start();
|
||||
}
|
||||
|
||||
@ -134,7 +138,6 @@ public abstract class ServiceProxy {
|
||||
thread.join();
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
endTask();
|
||||
}
|
||||
|
||||
public boolean setTask(ProxyTask task, String name) {
|
||||
|
Loading…
Reference in New Issue
Block a user