RpcSession attaches/detaches thread on JVM (second attempt)
If AndroidRuntimeGetJavaVM exists, attach current
thread before the while loop in join, and detach after
the while loop.
This ensures the Java thread is attached / detached
appropriately for binder threads that handles RPC calls.
Test: run aservice on Java services
Bug: 190450693
Change-Id: Ie37aea20047294d4c24c79aa95965d6dde5965b3
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index da570f3..cb65bef 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -192,6 +192,7 @@
header_libs: [
"libbinder_headers",
+ "libandroid_runtime_vm_headers",
],
export_header_lib_headers: [