summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-02-07 04:16:40 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-02-07 04:16:40 +0000
commit2b92401717ed7491581c78d45c5f457f63a721be (patch)
treefdb6dda5beb2a75b62734f8a0c01cb118eabefd5 /libs
parentd7fb7d59a11cb725d480cc43b73ebb10849d451b (diff)
parentdf6255a0c1b0932a51e98a32441d3332af837634 (diff)
Merge "Remove the IncidentHeaderProto dependency from statsd."
Diffstat (limited to 'libs')
-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