Dumpstate: default service implementation.
- dumpstate will not have passthrough mode. All new implementations are
required anyway. It makes more sense to just have them binderized by
default.
Test: compiles/put on device in right location/running
Bug: 31982882
Change-Id: Ib0c12a2e0da931060f0e9e990fb63b6c7bc9e872
diff --git a/dumpstate/1.0/default/DumpstateDevice.cpp b/dumpstate/1.0/default/DumpstateDevice.cpp
index 4264235..8000d85 100644
--- a/dumpstate/1.0/default/DumpstateDevice.cpp
+++ b/dumpstate/1.0/default/DumpstateDevice.cpp
@@ -22,6 +22,9 @@
#include "DumpstateUtil.h"
+using android::os::dumpstate::DumpFileToFd;
+using android::os::dumpstate::RunCommandToFd;
+
namespace android {
namespace hardware {
namespace dumpstate {
@@ -30,6 +33,10 @@
// Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow.
Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
+ // NOTE: this is just an example on how to use the DumpstateUtil.h functions to implement
+ // this interface - since HIDL_FETCH_IDumpstateDevice() is not defined, this function will never
+ // be called by dumpstate.
+
if (handle->numFds < 1) {
ALOGE("no FDs\n");
return Void();
@@ -51,13 +58,6 @@
return Void();
}
-
-IDumpstateDevice* HIDL_FETCH_IDumpstateDevice(const char* /* name */) {
- // TODO: temporary returning nullptr until it's implemented on master devices
- return nullptr;
-// return new DumpstateDevice();
-}
-
} // namespace implementation
} // namespace V1_0
} // namespace dumpstate