Test: cts tested
Change-Id: I0329a64506b5838d2572cda0d1b86ad78bae4253
using android::util::ProtoOutputStream;
LogEvent::LogEvent(log_msg& msg) {
- android_log_context context =
+ mContext =
create_android_log_parser(msg.msg() + sizeof(uint32_t), msg.len() - sizeof(uint32_t));
mTimestampNs = msg.entry_v1.sec * NS_PER_SEC + msg.entry_v1.nsec;
mLogUid = msg.entry_v4.uid;
- init(context);
- if (context) {
- android_log_destroy(&context);
+ init(mContext);
+ if (mContext) {
+ android_log_destroy(&mContext);
}
}