atrace: Don't NPE if we can't access hal-related tracepoint files.
This currently NPEs when Traceur attempts to start a trace.
Based on b/34242478, this is currently expected and we should fail
gracefully instead.
Bug: 37281960
Test: Starting a trace using Traceur on a userdebug build succeeds.
Change-Id: I082d5750625dec0e1db4a1dd341dc332d8dd752f
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index 05e1615..6cfbed9 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -552,7 +552,13 @@
// ignore
continue;
}
+
sp<IBase> interface = interfaceRet;
+ if (interface == nullptr) {
+ // ignore
+ continue;
+ }
+
auto notifyRet = interface->notifySyspropsChanged();
if (!notifyRet.isOk()) {
// ignore