Merge "update with -Wdocumentation."
diff --git a/base/HidlInternal.cpp b/base/HidlInternal.cpp
index 81b353d..440b30f 100644
--- a/base/HidlInternal.cpp
+++ b/base/HidlInternal.cpp
@@ -31,16 +31,17 @@
#include <regex>
extern "C" __attribute__((weak)) void __sanitizer_cov_dump();
-const char* kGcovPrefixEnvVar = "GCOV_PREFIX";
-const char* kGcovPrefixOverrideEnvVar = "GCOV_PREFIX_OVERRIDE";
-const char* kGcovPrefixPath = "/data/misc/trace/";
-const char* kSysPropHalCoverage = "hal.coverage.enable";
+
+const char kGcovPrefixEnvVar[] = "GCOV_PREFIX";
+const char kGcovPrefixOverrideEnvVar[] = "GCOV_PREFIX_OVERRIDE";
+const char kGcovPrefixPath[] = "/data/misc/trace/";
+const char kSysPropHalCoverage[] = "hal.coverage.enable";
#if defined(__LP64__)
-const char* kSysPropInstrumentationPath = "hal.instrumentation.lib.path.64";
+const char kSysPropInstrumentationPath[] = "hal.instrumentation.lib.path.64";
#else
-const char* kSysPropInstrumentationPath = "hal.instrumentation.lib.path.32";
+const char kSysPropInstrumentationPath[] = "hal.instrumentation.lib.path.32";
#endif
-#endif
+#endif // LIBHIDL_TARGET_DEBUGGABLE
namespace android {
namespace hardware {
diff --git a/transport/manager/1.2/IClientCallback.hal b/transport/manager/1.2/IClientCallback.hal
index 030bcd0..1189e44 100644
--- a/transport/manager/1.2/IClientCallback.hal
+++ b/transport/manager/1.2/IClientCallback.hal
@@ -18,9 +18,15 @@
interface IClientCallback {
/**
- * Called when there are no clients remaining for the HAL registered with this service.
+ * This is called when there is a transition between having >= 1 clients and having 0 clients
+ * (or vice versa).
*
* @param registered binder 'server' registered with IServiceManager's registerClientCallback
+ * @param hasClients whether there are currently clients
+ * true - when there are >= 1 clients. This must be called as soon as IServiceManager::get
+ * is called (no race).
+ * false - when there are 0 clients. This may be delayed if it is thought that another
+ * may be used again soon.
*/
- oneway onNoClients(interface registered);
+ oneway onClients(interface registered, bool hasClients);
};
diff --git a/transport/manager/1.2/IServiceManager.hal b/transport/manager/1.2/IServiceManager.hal
index 8d34fb6..ae3fdfd 100644
--- a/transport/manager/1.2/IServiceManager.hal
+++ b/transport/manager/1.2/IServiceManager.hal
@@ -29,7 +29,8 @@
/**
* Adds a callback that must be called when the specified server has no clients.
*
- * This must only be called after the first time the service has no clients.
+ * If the service has clients at the time of registration, the callback is called with
+ * hasClients true. After that, it is called based on the changes in clientele.
*
* @param server non-null service waiting to have no clients
* @param cb non-null callback to call when there are no clients