Loading telephony/java/android/telephony/AnomalyReporter.java +21 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.telephony; import static android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID; import static com.android.internal.telephony.TelephonyStatsLog.TELEPHONY_ANOMALY_DETECTED; import android.annotation.NonNull; Loading Loading @@ -73,6 +75,7 @@ public final class AnomalyReporter { * * This method sends the {@link TelephonyManager#ACTION_ANOMALY_REPORTED} broadcast, which is * system protected. Invoking this method unless you are the system will result in an error. * Carrier Id will be set as UNKNOWN_CARRIER_ID. * * @param eventId a fixed event ID that will be sent for each instance of the same event. This * ID should be generated randomly. Loading @@ -81,6 +84,23 @@ public final class AnomalyReporter { * static and must not contain any sensitive information (especially PII). */ public static void reportAnomaly(@NonNull UUID eventId, String description) { reportAnomaly(eventId, description, UNKNOWN_CARRIER_ID); } /** * If enabled, build and send an intent to a Debug Service for logging. * * This method sends the {@link TelephonyManager#ACTION_ANOMALY_REPORTED} broadcast, which is * system protected. Invoking this method unless you are the system will result in an error. * * @param eventId a fixed event ID that will be sent for each instance of the same event. This * ID should be generated randomly. * @param description an optional description, that if included will be used as the subject for * identification and discussion of this event. This description should ideally be * static and must not contain any sensitive information (especially PII). * @param carrierId the carrier of the id associated with this event. */ public static void reportAnomaly(@NonNull UUID eventId, String description, int carrierId) { if (sContext == null) { Rlog.w(TAG, "AnomalyReporter not yet initialized, dropping event=" + eventId); return; Loading @@ -88,7 +108,7 @@ public final class AnomalyReporter { TelephonyStatsLog.write( TELEPHONY_ANOMALY_DETECTED, 0, // TODO: carrier id needs to be populated carrierId, eventId.getLeastSignificantBits(), eventId.getMostSignificantBits()); Loading Loading
telephony/java/android/telephony/AnomalyReporter.java +21 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.telephony; import static android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID; import static com.android.internal.telephony.TelephonyStatsLog.TELEPHONY_ANOMALY_DETECTED; import android.annotation.NonNull; Loading Loading @@ -73,6 +75,7 @@ public final class AnomalyReporter { * * This method sends the {@link TelephonyManager#ACTION_ANOMALY_REPORTED} broadcast, which is * system protected. Invoking this method unless you are the system will result in an error. * Carrier Id will be set as UNKNOWN_CARRIER_ID. * * @param eventId a fixed event ID that will be sent for each instance of the same event. This * ID should be generated randomly. Loading @@ -81,6 +84,23 @@ public final class AnomalyReporter { * static and must not contain any sensitive information (especially PII). */ public static void reportAnomaly(@NonNull UUID eventId, String description) { reportAnomaly(eventId, description, UNKNOWN_CARRIER_ID); } /** * If enabled, build and send an intent to a Debug Service for logging. * * This method sends the {@link TelephonyManager#ACTION_ANOMALY_REPORTED} broadcast, which is * system protected. Invoking this method unless you are the system will result in an error. * * @param eventId a fixed event ID that will be sent for each instance of the same event. This * ID should be generated randomly. * @param description an optional description, that if included will be used as the subject for * identification and discussion of this event. This description should ideally be * static and must not contain any sensitive information (especially PII). * @param carrierId the carrier of the id associated with this event. */ public static void reportAnomaly(@NonNull UUID eventId, String description, int carrierId) { if (sContext == null) { Rlog.w(TAG, "AnomalyReporter not yet initialized, dropping event=" + eventId); return; Loading @@ -88,7 +108,7 @@ public final class AnomalyReporter { TelephonyStatsLog.write( TELEPHONY_ANOMALY_DETECTED, 0, // TODO: carrier id needs to be populated carrierId, eventId.getLeastSignificantBits(), eventId.getMostSignificantBits()); Loading