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/Privacy.h b/cmds/incidentd/src/Privacy.h
index b599c1c4..9cde748 100644
--- a/cmds/incidentd/src/Privacy.h
+++ b/cmds/incidentd/src/Privacy.h
@@ -50,8 +50,11 @@
// DESTINATION Enum in frameworks/base/core/proto/android/privacy.proto.
uint8_t policy;
+
// A list of regexp rules for stripping string fields in proto.
const char** patterns;
+
+ string toString() const;
};
// Encode field id used by ProtoOutputStream.
@@ -90,6 +93,11 @@
// TODO: Add privacy flag in incident.proto and auto generate it inside Privacy.
bool sectionEncryption(int section_id);
+/**
+ * If a privacy policy is other than the defined values, update it to a real one.
+ */
+uint8_t cleanup_privacy_policy(uint8_t policy);
+
} // namespace incidentd
} // namespace os
} // namespace android