diff options
Diffstat (limited to 'libs/incident/src/IncidentReportArgs.cpp')
-rw-r--r-- | libs/incident/src/IncidentReportArgs.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/libs/incident/src/IncidentReportArgs.cpp b/libs/incident/src/IncidentReportArgs.cpp index 9d8a98338ef0..db495cfbf7e1 100644 --- a/libs/incident/src/IncidentReportArgs.cpp +++ b/libs/incident/src/IncidentReportArgs.cpp @@ -26,7 +26,8 @@ namespace os { IncidentReportArgs::IncidentReportArgs() :mSections(), mAll(false), - mPrivacyPolicy(-1) + mPrivacyPolicy(-1), + mGzip(false) { } @@ -36,7 +37,8 @@ IncidentReportArgs::IncidentReportArgs(const IncidentReportArgs& that) mAll(that.mAll), mPrivacyPolicy(that.mPrivacyPolicy), mReceiverPkg(that.mReceiverPkg), - mReceiverCls(that.mReceiverCls) + mReceiverCls(that.mReceiverCls), + mGzip(that.mGzip) { } @@ -93,6 +95,11 @@ IncidentReportArgs::writeToParcel(Parcel* out) const return err; } + err = out->writeInt32(mGzip); + if (err != NO_ERROR) { + return err; + } + return NO_ERROR; } @@ -149,6 +156,15 @@ IncidentReportArgs::readFromParcel(const Parcel* in) mReceiverPkg = String8(in->readString16()).string(); mReceiverCls = String8(in->readString16()).string(); + int32_t gzip; + err = in->readInt32(&gzip); + if (err != NO_ERROR) { + return err; + } + if (gzip != 0) { + mGzip = gzip; + } + return OK; } @@ -193,6 +209,12 @@ IncidentReportArgs::addHeader(const vector<uint8_t>& headerProto) mHeaders.push_back(headerProto); } +void +IncidentReportArgs::setGzip(bool gzip) +{ + mGzip = gzip; +} + bool IncidentReportArgs::containsSection(int section, bool specific) const { |