summaryrefslogtreecommitdiff
path: root/libs/incident
diff options
context:
space:
mode:
authorYao Chen <yaochen@google.com>2019-02-06 16:45:40 -0800
committerYao Chen <yaochen@google.com>2019-02-07 09:45:13 -0800
commitec216489fc63974e5260cd87e3e6e25b1ddbee11 (patch)
treea939ad229631db40895d8dc57a72af83d8bdf10b /libs/incident
parenta28aa5e6ec9e9be09b8c7982e1479760e35d79bb (diff)
Remove the IncidentHeaderProto dependency from statsd.
+ IncidentReportArgs takes the bytes instead of IncidentHeaderProto object This cl is the ag/6287053 + build fix. Test: incidentd_test && statsd_test Change-Id: I86bcb48f4ab212b36ca4611a1fa05faace9c3702
Diffstat (limited to 'libs/incident')
-rw-r--r--libs/incident/Android.bp3
-rw-r--r--libs/incident/include/android/os/IncidentReportArgs.h4
-rw-r--r--libs/incident/src/IncidentReportArgs.cpp10
3 files changed, 4 insertions, 13 deletions
diff --git a/libs/incident/Android.bp b/libs/incident/Android.bp
index 0619a9c100dd..905e3039ff88 100644
--- a/libs/incident/Android.bp
+++ b/libs/incident/Android.bp
@@ -36,7 +36,6 @@ cc_library_shared {
srcs: [
":libincident_aidl",
- "proto/android/os/header.proto",
"proto/android/os/metadata.proto",
"src/IncidentReportArgs.cpp",
],
@@ -47,4 +46,4 @@ cc_library_shared {
},
export_include_dirs: ["include"],
-}
+} \ No newline at end of file
diff --git a/libs/incident/include/android/os/IncidentReportArgs.h b/libs/incident/include/android/os/IncidentReportArgs.h
index ee1e33c43b89..5e8eac1833ce 100644
--- a/libs/incident/include/android/os/IncidentReportArgs.h
+++ b/libs/incident/include/android/os/IncidentReportArgs.h
@@ -24,8 +24,6 @@
#include <set>
#include <vector>
-#include "frameworks/base/libs/incident/proto/android/os/header.pb.h"
-
namespace android {
namespace os {
@@ -49,7 +47,7 @@ public:
void setAll(bool all);
void setDest(int dest);
void addSection(int section);
- void addHeader(const IncidentHeaderProto& headerProto);
+ void addHeader(const vector<uint8_t>& headerProto);
inline bool all() const { return mAll; }
bool containsSection(int section) const;
diff --git a/libs/incident/src/IncidentReportArgs.cpp b/libs/incident/src/IncidentReportArgs.cpp
index 26261ef929ae..06b7a5b682b1 100644
--- a/libs/incident/src/IncidentReportArgs.cpp
+++ b/libs/incident/src/IncidentReportArgs.cpp
@@ -161,15 +161,9 @@ IncidentReportArgs::addSection(int section)
}
void
-IncidentReportArgs::addHeader(const IncidentHeaderProto& headerProto)
+IncidentReportArgs::addHeader(const vector<uint8_t>& headerProto)
{
- vector<uint8_t> header;
- auto serialized = headerProto.SerializeAsString();
- if (serialized.empty()) return;
- for (auto it = serialized.begin(); it != serialized.end(); it++) {
- header.push_back((uint8_t)*it);
- }
- mHeaders.push_back(header);
+ mHeaders.push_back(headerProto);
}
bool