atrace: Poke PDX services using utility class.
Poke PDX services to enable tracing in stand-alone services.
Bug: 37432968
Test: build; run systrace with gfx flag; observe bufferhubd traces.
Change-Id: Id03a82fa51c6ca7c595ecc29c15a742295c53d46
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index 6cfbed9..f8e0ad5 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -41,6 +41,7 @@
#include <hidl/ServiceManagement.h>
#include <cutils/properties.h>
+#include <pdx/default_transport/service_utility.h>
#include <utils/String8.h>
#include <utils/Timers.h>
#include <utils/Tokenizer.h>
@@ -48,6 +49,7 @@
#include <android-base/file.h>
using namespace android;
+using pdx::default_transport::ServiceUtility;
using std::string;
#define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0])))
@@ -814,6 +816,7 @@
ok &= setAppCmdlineProperty(&packageList[0]);
ok &= pokeBinderServices();
pokeHalServices();
+ ok &= ServiceUtility::PokeServices();
// Disable all the sysfs enables. This is done as a separate loop from
// the enables to allow the same enable to exist in multiple categories.
@@ -851,6 +854,7 @@
setTagsProperty(0);
clearAppProperties();
pokeBinderServices();
+ ServiceUtility::PokeServices();
// Set the options back to their defaults.
setTraceOverwriteEnable(true);