Loading libs/binder/Android.bp +9 −0 Original line number Diff line number Diff line Loading @@ -271,6 +271,15 @@ cc_library_shared { defaults: ["libbinder_tls_defaults"], } // For testing cc_library_static { name: "libbinder_tls_static", defaults: ["libbinder_tls_defaults"], visibility: [ ":__subpackages__", ], } // AIDL interface between libbinder and framework.jar filegroup { name: "libbinder_aidl", Loading libs/binder/tests/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,7 @@ cc_test { defaults: [ "binder_test_defaults", "libbinder_ndk_host_user", "libbinder_tls_shared_deps", ], srcs: [ Loading @@ -159,6 +160,7 @@ cc_test { "liblog", ], static_libs: [ "libbinder_tls_static", "binderRpcTestIface-cpp", "binderRpcTestIface-ndk_platform", ], Loading libs/binder/tests/binderRpcTest.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <binder/RpcSession.h> #include <binder/RpcTransport.h> #include <binder/RpcTransportRaw.h> #include <binder/RpcTransportTls.h> #include <gtest/gtest.h> #include <chrono> Loading @@ -54,16 +55,18 @@ static_assert(RPC_WIRE_PROTOCOL_VERSION + 1 == RPC_WIRE_PROTOCOL_VERSION_NEXT || RPC_WIRE_PROTOCOL_VERSION == RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL); const char* kLocalInetAddress = "127.0.0.1"; enum class RpcSecurity { RAW }; enum class RpcSecurity { RAW, TLS }; static inline std::vector<RpcSecurity> RpcSecurityValues() { return {RpcSecurity::RAW}; return {RpcSecurity::RAW, RpcSecurity::TLS}; } static inline std::unique_ptr<RpcTransportCtxFactory> newFactory(RpcSecurity rpcSecurity) { switch (rpcSecurity) { case RpcSecurity::RAW: return RpcTransportCtxFactoryRaw::make(); case RpcSecurity::TLS: return RpcTransportCtxFactoryTls::make(); default: LOG_ALWAYS_FATAL("Unknown RpcSecurity %d", rpcSecurity); } Loading Loading
libs/binder/Android.bp +9 −0 Original line number Diff line number Diff line Loading @@ -271,6 +271,15 @@ cc_library_shared { defaults: ["libbinder_tls_defaults"], } // For testing cc_library_static { name: "libbinder_tls_static", defaults: ["libbinder_tls_defaults"], visibility: [ ":__subpackages__", ], } // AIDL interface between libbinder and framework.jar filegroup { name: "libbinder_aidl", Loading
libs/binder/tests/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,7 @@ cc_test { defaults: [ "binder_test_defaults", "libbinder_ndk_host_user", "libbinder_tls_shared_deps", ], srcs: [ Loading @@ -159,6 +160,7 @@ cc_test { "liblog", ], static_libs: [ "libbinder_tls_static", "binderRpcTestIface-cpp", "binderRpcTestIface-ndk_platform", ], Loading
libs/binder/tests/binderRpcTest.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <binder/RpcSession.h> #include <binder/RpcTransport.h> #include <binder/RpcTransportRaw.h> #include <binder/RpcTransportTls.h> #include <gtest/gtest.h> #include <chrono> Loading @@ -54,16 +55,18 @@ static_assert(RPC_WIRE_PROTOCOL_VERSION + 1 == RPC_WIRE_PROTOCOL_VERSION_NEXT || RPC_WIRE_PROTOCOL_VERSION == RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL); const char* kLocalInetAddress = "127.0.0.1"; enum class RpcSecurity { RAW }; enum class RpcSecurity { RAW, TLS }; static inline std::vector<RpcSecurity> RpcSecurityValues() { return {RpcSecurity::RAW}; return {RpcSecurity::RAW, RpcSecurity::TLS}; } static inline std::unique_ptr<RpcTransportCtxFactory> newFactory(RpcSecurity rpcSecurity) { switch (rpcSecurity) { case RpcSecurity::RAW: return RpcTransportCtxFactoryRaw::make(); case RpcSecurity::TLS: return RpcTransportCtxFactoryTls::make(); default: LOG_ALWAYS_FATAL("Unknown RpcSecurity %d", rpcSecurity); } Loading