Implement keepAliveBinder for setRpcClientDebug
setRpcClientDebug can now be called multiple times. Each will
set up a different RpcServer and opens up a different port.
When keepAliveBinder dies, the corresponding RpcServer also
dies.
Also fixes tests to meet new expectations.
- Positive tests now only run on remote binder, because the
keepAliveBinder object cannot be a local binder to call
linkToDeath.
- Negative tests keeps running on local and remote binders.
- Use real servicedispatcher.
Test: binderLibTest
Test: manual with servicedispatcher.
Bug: 182914638
Change-Id: Ic46ac54bb7988ee7d65546563f56f0a02c29ce7c
diff --git a/libs/binder/tests/Android.bp b/libs/binder/tests/Android.bp
index c7c899f..326d9fd 100644
--- a/libs/binder/tests/Android.bp
+++ b/libs/binder/tests/Android.bp
@@ -62,6 +62,7 @@
shared_libs: [
"libbase",
"libbinder",
+ "liblog",
"libutils",
],
static_libs: [
@@ -104,6 +105,7 @@
shared_libs: [
"libbase",
"libbinder",
+ "liblog",
"libutils",
],
static_libs: [