Add support for Data calls metrics

Bug: 167453031
Test: manual testing
Change-Id: Id9e4f1e3e71bc7bdc298323403f9b03a6285be84
This commit is contained in:
Nazanin
2020-09-29 09:04:41 -07:00
parent 37c1335741
commit b8a04f6bd4
2 changed files with 141 additions and 1 deletions

View File

@@ -497,13 +497,14 @@ message Atom {
ModemRestart modem_restart = 312 [(module) = "telephony"];
CarrierIdMismatchEvent carrier_id_mismatch_event = 313 [(module) = "telephony"];
CarrierIdMatchingTable carrier_id_table_update = 314 [(module) = "telephony"];
DataStallRecoveryReported data_stall_recovery_reported = 315 [(module) = "telephony"];
// StatsdStats tracks platform atoms with ids upto 500.
// Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
}
// Pulled events will start at field 10000.
// Next: 10089
// Next: 10090
oneof pulled {
WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"];
WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"];
@@ -605,6 +606,7 @@ message Atom {
IncomingSms incoming_sms = 10086 [(module) = "telephony"];
OutgoingSms outgoing_sms = 10087 [(module) = "telephony"];
CarrierIdMatchingTable carrier_id_table_version = 10088 [(module) = "telephony"];
DataCallSession data_call_session = 10089 [(module) = "telephony"];
}
// DO NOT USE field numbers above 100,000 in AOSP.
@@ -10671,6 +10673,104 @@ message CarrierIdMatchingTable {
optional int32 table_version = 1;
}
/**
* Pulls information for a single data call session
*
* Each pull creates multiple atoms, one for each data call session.
* The sequence is randomized when pulled.
*
* Pulled from:
* frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
*/
message DataCallSession {
// A random number to be used as dimension to capture multiple atoms
optional int32 dimension = 1;
// Whether the device was in multi-SIM mode (with multiple active SIM profiles).
optional bool is_multi_sim = 2;
// Whether the call was made with an eSIM profile.
optional bool is_esim = 3;
// Data profile of this call (for what purpose this call was made)
optional android.telephony.DataProfileEnum profile = 4;
// APN type bitmask of the APN used:
// @ApnType in frameworks/base/telephony/java/android/telephony/Annotation.java.
optional int32 apn_type_bitmask = 5;
// Carrier ID of the SIM
// See https://source.android.com/devices/tech/config/carrierid.
optional int32 carrier_id = 6;
// Whether the subscription is roaming
optional bool is_roaming = 7;
// Data RAT when the call ended, can be IWLAN for IMS/MMS, otherwise should be WWAN PS RAT.
// In the case that the connection hasn't ended yet, this field holds the current RAT.
// In the case the call ended due to Out Of Service (OOS),
// this field should be the last known RAT.
optional android.telephony.NetworkTypeEnum rat_at_end = 8;
// Was the data call ended due to OOS
optional bool oos_at_end = 9;
// Number of RAT switches during the data call
optional int64 rat_switch_count = 10;
// Whether the call is on an opportunistic subscription
optional bool is_opportunistic = 11;
// Packet data protocol used
optional android.telephony.ApnProtocolEnum ip_type = 12;
// Whether the data call terminated before being established
optional bool setup_failed = 13;
// Reason why the data call terminated, as in RIL_DataCallFailCause from ril.h
optional int32 failure_cause = 14;
// Suggested retry back-off timer value from RIL
optional int32 suggested_retry_millis = 15;
// Why the data call was deactivated
// Set by telephony for MO deactivations (unrelated to failure_cause)
optional android.telephony.DataDeactivateReasonEnum deactivate_reason = 16;
// Duration of the data call, rounded into the closest 5 minutes.
optional int64 duration_minutes = 17;
// Whether the data call is still connected when the atom is collected.
optional bool ongoing = 18;
}
/**
* Logs data stall recovery event
*
* Logged from:
* frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
*/
message DataStallRecoveryReported {
// Carrier ID of the SIM
// See https://source.android.com/devices/tech/config/carrierid.
optional int32 carrier_id = 1;
// Data RAT when the stall happened
optional android.telephony.NetworkTypeEnum rat = 2;
// Signal strength when stall happened
optional android.telephony.SignalStrengthEnum signal_strength = 3;
// Action taken to recover
optional android.telephony.DataStallRecoveryActionEnum action = 4;
// Whether the subscription is opportunistic
optional bool is_opportunistic = 5;
// Whether the device is in multi-SIM mode
optional bool is_multi_sim = 6;
}
/**
* Logs gnss stats from location service provider
*