summaryrefslogtreecommitdiff
path: root/cmds/incidentd/src/Reporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/incidentd/src/Reporter.cpp')
-rw-r--r--cmds/incidentd/src/Reporter.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmds/incidentd/src/Reporter.cpp b/cmds/incidentd/src/Reporter.cpp
index 00a31e0de43f..dc4065bce39b 100644
--- a/cmds/incidentd/src/Reporter.cpp
+++ b/cmds/incidentd/src/Reporter.cpp
@@ -286,6 +286,22 @@ void ReportBatch::clearPersistedRequests() {
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++) {