Ensure only one bugreport is in progress in dumpstate
BUG: 123571915
Test: current bugreport flows work
Test: interactive bugreport
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
Test: adb shell /data/nativetest64/dumpstate_smoke_test/dumpstate_smoke_test
Change-Id: I1145a27ed6dde43142789d876902e32d1a286bb2
diff --git a/cmds/dumpstate/DumpstateService.h b/cmds/dumpstate/DumpstateService.h
index faeea53..68eda47 100644
--- a/cmds/dumpstate/DumpstateService.h
+++ b/cmds/dumpstate/DumpstateService.h
@@ -51,7 +51,11 @@
binder::Status cancelBugreport();
private:
- Dumpstate& ds_;
+ // Dumpstate object which contains all the bugreporting logic.
+ // Note that dumpstate is a oneshot service, so this object is meant to be used at most for
+ // one bugreport.
+ // This service does not own this object.
+ Dumpstate* ds_;
std::mutex lock_;
};