Get incidentd cts working again.
- The buffer size increased, and the CTS test that checked that
was triggering.
- Privacy filtering wasn't working for the stack trace sections
- The incident command was not handling the default arguments correctly
- The throttler was throttling streaming reports, which made the
test flaky.
Bug: 126253679
Test: atest CtsIncidentHostTestCases
Change-Id: I342cd7d0421ea8c22b7796fc99e779f21855af73
diff --git a/cmds/incidentd/src/Reporter.cpp b/cmds/incidentd/src/Reporter.cpp
index 00a31e0..dc4065b 100644
--- a/cmds/incidentd/src/Reporter.cpp
+++ b/cmds/incidentd/src/Reporter.cpp
@@ -286,6 +286,22 @@
mPersistedRequests.clear();
}
+void ReportBatch::transferStreamingRequests(const sp<ReportBatch>& that) {
+ for (vector<sp<ReportRequest>>::iterator request = mStreamingRequests.begin();
+ request != mStreamingRequests.end(); request++) {
+ that->mStreamingRequests.push_back(*request);
+ }
+ mStreamingRequests.clear();
+}
+
+void ReportBatch::transferPersistedRequests(const sp<ReportBatch>& that) {
+ for (map<ComponentName, sp<ReportRequest>>::iterator it = mPersistedRequests.begin();
+ it != mPersistedRequests.end(); it++) {
+ that->mPersistedRequests[it->first] = it->second;
+ }
+ mPersistedRequests.clear();
+}
+
void ReportBatch::getFailedRequests(vector<sp<ReportRequest>>* requests) {
for (map<ComponentName, sp<ReportRequest>>::iterator it = mPersistedRequests.begin();
it != mPersistedRequests.end(); it++) {