diff options
author | Yi Jin <jinyithu@google.com> | 2017-09-05 13:44:22 -0700 |
---|---|---|
committer | Yi Jin <jinyithu@google.com> | 2017-09-07 10:53:51 -0700 |
commit | 0f0471623e91c202fb7381a050cc331572fb439f (patch) | |
tree | 6c5b30199c6eea59c9a65743ad4767bc8f761aa7 /libs/incident/src | |
parent | 99c248feb2d1f863b864bdfd1e3b37af17f18732 (diff) |
Implement Pii Stripper Part 3
The incident request args sets privacy spec. Strip action is optimized
to run once for each type of spec and ready for flush multiple times.
Incident command is updated to take -p option to specify privacy spec.
Bug: 64687253
Test: unit tests written, manually run incident command to test as well
Change-Id: I6753df117f76dc1a5f4d2152baa3fbbf56b490e4
Diffstat (limited to 'libs/incident/src')
-rw-r--r-- | libs/incident/src/IncidentReportArgs.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/libs/incident/src/IncidentReportArgs.cpp b/libs/incident/src/IncidentReportArgs.cpp index f60490911aed..e62872238387 100644 --- a/libs/incident/src/IncidentReportArgs.cpp +++ b/libs/incident/src/IncidentReportArgs.cpp @@ -25,14 +25,16 @@ namespace os { IncidentReportArgs::IncidentReportArgs() :mSections(), - mAll(false) + mAll(false), + mDest(-1) { } IncidentReportArgs::IncidentReportArgs(const IncidentReportArgs& that) :mSections(that.mSections), mHeaders(that.mHeaders), - mAll(that.mAll) + mAll(that.mAll), + mDest(that.mDest) { } @@ -74,6 +76,11 @@ IncidentReportArgs::writeToParcel(Parcel* out) const } } + err = out->writeInt32(mDest); + if (err != NO_ERROR) { + return err; + } + return NO_ERROR; } @@ -120,6 +127,13 @@ IncidentReportArgs::readFromParcel(const Parcel* in) } } + int32_t dest; + err = in->readInt32(&dest); + if (err != NO_ERROR) { + return err; + } + mDest = dest; + return OK; } @@ -133,6 +147,12 @@ IncidentReportArgs::setAll(bool all) } void +IncidentReportArgs::setDest(int dest) +{ + mDest = dest; +} + +void IncidentReportArgs::addSection(int section) { if (!mAll) { |