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

Commit 08e6363a authored by Muhammad Qureshi's avatar Muhammad Qureshi Committed by Automerger Merge Worker
Browse files

Merge "Remove libstatsmetadata" into rvc-dev am: 271cbbd7 am: ff0d53f0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11923902

Change-Id: I848ee487a73eb5657ce43cf5ad8109759482897b
parents c0c16627 ff0d53f0
Loading
Loading
Loading
Loading
+0 −46
Original line number Diff line number Diff line
@@ -116,7 +116,6 @@ cc_defaults {
        "libcutils",
        "libgtest_prod",
        "libprotoutil",
        "libstatsmetadata",
        "libstatslog_statsd",
        "libsysutils",
        "libutils",
@@ -129,51 +128,6 @@ cc_defaults {
    ],
}

// ================
// libstatsmetadata
// ================

genrule {
    name: "atoms_info.h",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --atomsInfoHeader $(genDir)/atoms_info.h",
    out: [
        "atoms_info.h",
    ],
}

genrule {
    name: "atoms_info.cpp",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --atomsInfoCpp $(genDir)/atoms_info.cpp",
    out: [
        "atoms_info.cpp",
    ],
}

cc_library_static {
    name: "libstatsmetadata",
    host_supported: true,
    generated_sources: [
        "atoms_info.cpp",
    ],
    generated_headers: [
        "atoms_info.h",
    ],
    cflags: [
        "-Wall",
        "-Werror",
    ],
    export_generated_headers: [
        "atoms_info.h",
    ],
    apex_available: [
        //TODO(b/149782403): Remove this once statsd no longer links against libstatsmetadata
        "com.android.os.statsd",
        "test_com.android.os.statsd",
    ],
}

genrule {
    name: "statslog_statsd.h",
    tools: ["stats-log-api-gen"],
+0 −2
Original line number Diff line number Diff line
@@ -110,8 +110,6 @@ extend google.protobuf.FieldOptions {

    optional LogMode log_mode = 50002 [default = MODE_AUTOMATIC];

    optional bool allow_from_any_uid = 50003 [default = false];

    repeated string module = 50004;

    optional bool truncate_timestamp = 50005 [default = false];
+5 −7
Original line number Diff line number Diff line
@@ -145,8 +145,7 @@ message Atom {
        PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"];
        WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"];
        AnomalyDetected anomaly_detected = 46 [(module) = "statsd"];
        AppBreadcrumbReported app_breadcrumb_reported =
                47 [(allow_from_any_uid) = true, (module) = "statsd"];
        AppBreadcrumbReported app_breadcrumb_reported = 47 [(module) = "statsd"];
        AppStartOccurred app_start_occurred = 48 [(module) = "framework", (module) = "statsdtest"];
        AppStartCanceled app_start_canceled = 49 [(module) = "framework"];
        AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"];
@@ -157,7 +156,7 @@ message Atom {
        AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"];
        ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"];
        BootSequenceReported boot_sequence_reported = 57;
        DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true, (module) = "statsd"];
        DaveyOccurred davey_occurred = 58 [(module) = "statsd"];
        OverlayStateChanged overlay_state_changed =
                59 [(module) = "framework", (module) = "statsdtest"];
        ForegroundServiceStateChanged foreground_service_state_changed
@@ -186,8 +185,7 @@ message Atom {
        WTFOccurred wtf_occurred = 80 [(module) = "framework"];
        LowMemReported low_mem_reported = 81 [(module) = "framework"];
        GenericAtom generic_atom = 82;
        KeyValuePairsAtom key_value_pairs_atom =
                83 [(allow_from_any_uid) = true, (module) = "framework", (module) = "statsd"];
        KeyValuePairsAtom key_value_pairs_atom = 83 [(module) = "framework", (module) = "statsd"];
        VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"];
        DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"];
        ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
@@ -317,7 +315,7 @@ message Atom {
        AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"];
        AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"];
        TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"];
        HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true, (module) = "framework"];
        HiddenApiUsed hidden_api_used = 178 [(module) = "framework"];
        StyleUIChanged style_ui_changed = 179 [(module) = "sysui"];
        PrivacyIndicatorsInteracted privacy_indicators_interacted =
                180 [(module) = "permissioncontroller"];
@@ -383,7 +381,7 @@ message Atom {
        UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226;
        CameraActionEvent camera_action_event = 227 [(module) = "framework"];
        AppCompatibilityChangeReported app_compatibility_change_reported =
            228 [(allow_from_any_uid) = true, (module) = "framework"];
                228 [(module) = "framework"];
        PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"];
        VmsClientConnectionStateChanged vms_client_connection_state_changed =
                230 [(module) = "car"];
+0 −8
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
#include <private/android_filesystem_config.h>

#include "CountMetricProducer.h"
#include "atoms_info.h"
#include "condition/CombinationConditionTracker.h"
#include "condition/SimpleConditionTracker.h"
#include "guardrail/StatsdStats.h"
@@ -372,13 +371,6 @@ void MetricsManager::onDumpReport(const int64_t dumpTimeStampNs,


bool MetricsManager::checkLogCredentials(const LogEvent& event) {
    // TODO(b/154856835): Remove this check once we get whitelist from the config.
    if (android::util::AtomsInfo::kWhitelistedAtoms.find(event.GetTagId()) !=
      android::util::AtomsInfo::kWhitelistedAtoms.end())
    {
        return true;
    }

    if (mWhitelistedAtomIds.find(event.GetTagId()) != mWhitelistedAtomIds.end()) {
        return true;
    }
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ cc_binary_host {
    name: "stats-log-api-gen",
    srcs: [
        "Collation.cpp",
        "atoms_info_writer.cpp",
        "java_writer.cpp",
        "java_writer_q.cpp",
        "main.cpp",
Loading