summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dumpstate/1.0/default/DumpstateDevice.cpp6
-rw-r--r--dumpstate/1.0/default/android.hardware.dumpstate@1.0-service.rc3
2 files changed, 9 insertions, 0 deletions
diff --git a/dumpstate/1.0/default/DumpstateDevice.cpp b/dumpstate/1.0/default/DumpstateDevice.cpp
index 818a5312..88623afd 100644
--- a/dumpstate/1.0/default/DumpstateDevice.cpp
+++ b/dumpstate/1.0/default/DumpstateDevice.cpp
@@ -18,6 +18,7 @@
18 18
19#include "DumpstateDevice.h" 19#include "DumpstateDevice.h"
20 20
21#include <hidl/HidlBinderSupport.h>
21#include <log/log.h> 22#include <log/log.h>
22 23
23#include "DumpstateUtil.h" 24#include "DumpstateUtil.h"
@@ -37,6 +38,11 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
37 // this interface - since HIDL_FETCH_IDumpstateDevice() is not defined, this function will never 38 // this interface - since HIDL_FETCH_IDumpstateDevice() is not defined, this function will never
38 // be called by dumpstate. 39 // be called by dumpstate.
39 40
41 // Exit when dump is completed since this is a lazy HAL.
42 addPostCommandTask([]() {
43 exit(0);
44 });
45
40 if (handle == nullptr || handle->numFds < 1) { 46 if (handle == nullptr || handle->numFds < 1) {
41 ALOGE("no FDs\n"); 47 ALOGE("no FDs\n");
42 return Void(); 48 return Void();
diff --git a/dumpstate/1.0/default/android.hardware.dumpstate@1.0-service.rc b/dumpstate/1.0/default/android.hardware.dumpstate@1.0-service.rc
index 0f272485..dfbfb335 100644
--- a/dumpstate/1.0/default/android.hardware.dumpstate@1.0-service.rc
+++ b/dumpstate/1.0/default/android.hardware.dumpstate@1.0-service.rc
@@ -2,3 +2,6 @@ service dumpstate-1-0 /vendor/bin/hw/android.hardware.dumpstate@1.0-service
2 class hal 2 class hal
3 user system 3 user system
4 group system 4 group system
5 interface android.hardware.dumpstate@1.0::IDumpstateDevice default
6 oneshot
7 disabled