Check and write some error in atrace.
Bug: 33305299
Test: compiles
Change-Id: I88c7ede6cbf68ca10d980e448456bb4ef2a73592
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index 8017e16..25c2a30 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -525,7 +525,12 @@
hidl_string fqInterfaceName = fqInstanceName.substr(0, n);
hidl_string instanceName = fqInstanceName.substr(n+1, std::string::npos);
auto getRet = sm->get(fqInterfaceName, instanceName, [&](const auto &interface) {
- interface->notifySyspropsChanged();
+ auto notifyRet = interface->notifySyspropsChanged();
+ if (!notifyRet.isOk()) {
+ fprintf(stderr, "failed to notifySyspropsChanged on service %s: %s\n",
+ fqInstanceName.c_str(),
+ notifyRet.getStatus().toString8().string());
+ }
});
if (!getRet.isOk()) {
fprintf(stderr, "failed to get service %s: %s\n",