defaultPassthroughServiceImplementation: default
Specify default argument to dPSI which allows the following calls:
- dPSI("foo", 1 /* maxThreads */);
- dPSI("foo");
- dPSI(1 /* maxThreads */);
- dPSI();
Test: compiles
Change-Id: If1f7100527583dd7d01c17c107282b043d710ee3
diff --git a/transport/include/hidl/LegacySupport.h b/transport/include/hidl/LegacySupport.h
index 9ee0635..3cc23f3 100644
--- a/transport/include/hidl/LegacySupport.h
+++ b/transport/include/hidl/LegacySupport.h
@@ -71,7 +71,7 @@
* Return value is exit status.
*/
template<class Interface>
-int defaultPassthroughServiceImplementation(std::string name = "default",
+int defaultPassthroughServiceImplementation(std::string name,
size_t maxThreads = 1) {
configureRpcThreadpool(maxThreads, true);
status_t result = registerPassthroughServiceImplementation<Interface>(name);
@@ -83,6 +83,10 @@
joinRpcThreadpool();
return 0;
}
+template<class Interface>
+int defaultPassthroughServiceImplementation(size_t maxThreads = 1) {
+ return defaultPassthroughServiceImplementation<Interface>("default", maxThreads);
+}
} // namespace hardware
} // namespace android