Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4550becc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove a few atoms from the timestamp truncating whitelist."

parents b23e1716 c4aa7604
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -365,11 +365,14 @@ write_stats_log_header(FILE* out, const Atoms& atoms, const AtomDecl &attributio
    fprintf(out, "};\n");
    fprintf(out, "};\n");
    fprintf(out, "\n");
    fprintf(out, "\n");


    std::set<string> kFuzzingAtomNames = { "mobile_radio_power_state_changed" };
    std::set<string> kTruncatingAtomNames =
        { "mobile_radio_power_state_changed", "audio_state_changed", "call_state_changed",
          "phone_signal_strength_changed", "mobile_bytes_transfer_by_fg_bg",
          "mobile_bytes_transfer"};
    fprintf(out, "const static std::set<int> kNotTruncatingTimestampAtomWhiteList = {\n");
    fprintf(out, "const static std::set<int> kNotTruncatingTimestampAtomWhiteList = {\n");
    for (set<AtomDecl>::const_iterator atom = atoms.decls.begin();
    for (set<AtomDecl>::const_iterator atom = atoms.decls.begin();
        atom != atoms.decls.end(); atom++) {
        atom != atoms.decls.end(); atom++) {
        if (kFuzzingAtomNames.find(atom->name) == kFuzzingAtomNames.end()) {
        if (kTruncatingAtomNames.find(atom->name) == kTruncatingAtomNames.end()) {
            string constant = make_constant_name(atom->name);
            string constant = make_constant_name(atom->name);
            fprintf(out, " %s,\n", constant.c_str());
            fprintf(out, " %s,\n", constant.c_str());
        }
        }