Move castInterface into details.
Test: pass
Test: hidl_test
Bug: 36075507
Change-Id: Icf4c744405cdc77ebbd4380fbef8b68ea07e3802
diff --git a/transport/include/hidl/HidlTransportSupport.h b/transport/include/hidl/HidlTransportSupport.h
index 8476f47..8a2a70a 100644
--- a/transport/include/hidl/HidlTransportSupport.h
+++ b/transport/include/hidl/HidlTransportSupport.h
@@ -47,6 +47,8 @@
*/
void joinRpcThreadpool();
+namespace details {
+
// cast the interface IParent to IChild.
// Return nullptr if parent is null or any failure.
template<typename IChild, typename IParent, typename BpChild, typename BpParent>
@@ -69,6 +71,8 @@
return sp<IChild>(static_cast<IChild *>(parent.get()));
}
+} // namespace details
+
} // namespace hardware
} // namespace android