Merge "remove gating for statsd logging of anomaly atoms"

This commit is contained in:
Chinmay Dhodapkar
2023-02-08 23:24:13 +00:00
committed by Android (Google) Code Review

View File

@@ -110,8 +110,15 @@ public final class AnomalyReporter {
return;
}
// Don't report if the server-side flag isn't loaded, as it implies other anomaly report
// related config hasn't loaded.
//always write atoms to statsd
TelephonyStatsLog.write(
TELEPHONY_ANOMALY_DETECTED,
carrierId,
eventId.getLeastSignificantBits(),
eventId.getMostSignificantBits());
// Don't report via Intent if the server-side flag isn't loaded, as it implies other anomaly
// report related config hasn't loaded.
try {
boolean isAnomalyReportEnabledFromServer = DeviceConfig.getBoolean(
DeviceConfig.NAMESPACE_TELEPHONY, KEY_IS_TELEPHONY_ANOMALY_REPORT_ENABLED,
@@ -122,12 +129,6 @@ public final class AnomalyReporter {
return;
}
TelephonyStatsLog.write(
TELEPHONY_ANOMALY_DETECTED,
carrierId,
eventId.getLeastSignificantBits(),
eventId.getMostSignificantBits());
// If this event has already occurred, skip sending intents for it; regardless log its
// invocation here.
Integer count = sEvents.containsKey(eventId) ? sEvents.get(eventId) + 1 : 1;