#include "src/trace_processor/importers/android_bugreport/android_bugreport_reader.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/string_utils.h"
#include "protos/perfetto/common/builtin_clock.pbzero.h"
#include "src/trace_processor/importers/android_bugreport/android_dumpstate_reader.h"
#include "src/trace_processor/importers/android_bugreport/android_log_reader.h"
#include "src/trace_processor/importers/common/clock_tracker.h"
#include "src/trace_processor/importers/common/trace_file_tracker.h"
#include "src/trace_processor/types/trace_processor_context.h"
#include "src/trace_processor/util/status_macros.h"
#include "src/trace_processor/util/trace_type.h"
#include "src/trace_processor/util/zip_reader.h"
namespace perfetto::trace_processor {
namespace {
const util::ZipFile* FindBugReportFile(
const std::vector<util::ZipFile>& zip_file_entries) { … }
std::optional<int32_t> ExtractYearFromBugReportFilename(
const std::string& filename) { … }
}
bool AndroidBugreportReader::IsAndroidBugReport(
const std::vector<util::ZipFile>& zip_file_entries) { … }
util::Status AndroidBugreportReader::Parse(
TraceProcessorContext* context,
std::vector<util::ZipFile> zip_file_entries) { … }
AndroidBugreportReader::AndroidBugreportReader(
TraceProcessorContext* context,
std::vector<util::ZipFile> zip_file_entries)
: … { … }
AndroidBugreportReader::~AndroidBugreportReader() = default;
util::Status AndroidBugreportReader::ParseImpl() { … }
base::Status AndroidBugreportReader::ParseDumpstateTxt(
std::vector<TimestampedAndroidLogEvent> logcat_events) { … }
base::StatusOr<std::vector<TimestampedAndroidLogEvent>>
AndroidBugreportReader::ParsePersistentLogcat() { … }
bool AndroidBugreportReader::DetectYearAndBrFilename() { … }
}