1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package android.os.statsd.telephony; 20 21import "frameworks/proto_logging/stats/atom_field_options.proto"; 22import "frameworks/proto_logging/stats/atoms.proto"; 23import "frameworks/proto_logging/stats/enums/telephony/enums.proto"; 24import "frameworks/proto_logging/stats/enums/telephony/satellite/enums.proto"; 25 26option java_package = "com.android.os.telephony"; 27option java_multiple_files = true; 28 29extend Atom { 30 optional SatelliteController satellite_controller = 10182 31 [(module) = "telephony"]; 32 optional SatelliteSession satellite_session = 10183 33 [(module) = "telephony"]; 34 optional SatelliteIncomingDatagram satellite_incoming_datagram = 10184 35 [(module) = "telephony"]; 36 optional SatelliteOutgoingDatagram satellite_outgoing_datagram = 10185 37 [(module) = "telephony"]; 38 optional SatelliteProvision satellite_provision = 10186 39 [(module) = "telephony"]; 40 optional SatelliteSosMessageRecommender satellite_sos_message_recommender = 10187 41 [(module) = "telephony"]; 42 optional CarrierRoamingSatelliteSession carrier_roaming_satellite_session = 10211 43 [(module) = "telephony"]; 44 optional CarrierRoamingSatelliteControllerStats carrier_roaming_satellite_controller_stats = 10212 45 [(module) = "telephony"]; 46 optional ControllerStatsPerPackage controller_stats_per_package = 10213 47 [(module) = "telephony"]; 48 optional SatelliteEntitlement satellite_entitlement = 10214 49 [(module) = "telephony"]; 50 optional SatelliteConfigUpdater satellite_config_updater = 10215 51 [(module) = "telephony"]; 52 optional SatelliteAccessController satellite_access_controller = 10219 53 [(module) = "telephony"]; 54} 55 56/** 57 * One data point of this metric is logged per day if the satellite is enabled 58 * or provisioned/deprovisioned at least once 59 */ 60message SatelliteController { 61 // Total count of successful attempts for turning on satellite service. 62 optional int32 count_of_satellite_service_enablements_success = 1; 63 // Total count of failed attempts for turning on satellite service. 64 optional int32 count_of_satellite_service_enablements_fail = 2; 65 // Total count of successful attempt for outgoing datagrams. 66 optional int32 count_of_outgoing_datagram_success = 3; 67 // Total count of failed attempts for outgoing datagrams. 68 optional int32 count_of_outgoing_datagram_fail = 4; 69 // Total count of successful attempt for incoming datagrams. 70 optional int32 count_of_incoming_datagram_success = 5; 71 // Total count of failed attempts for incoming datagrams. 72 optional int32 count_of_incoming_datagram_fail = 6; 73 // Total count of successful attempts for transferring SOS SMS. 74 optional int32 count_of_datagram_type_sos_sms_success = 7; 75 // Total count of failed attempts for transferring SOS SMS. 76 optional int32 count_of_datagram_type_sos_sms_fail = 8; 77 // Total count of successful attempts for transferring location sharing. 78 optional int32 count_of_datagram_type_location_sharing_success = 9; 79 // Total count of failed attempts for transferring location sharing. 80 optional int32 count_of_datagram_type_location_sharing_fail = 10; 81 // Total count of successful attempt for provisioning. 82 optional int32 count_of_provision_success = 11; 83 // Total count of failed attempts for provisioning. 84 optional int32 count_of_provision_fail = 12; 85 // Total count of successful attempts for deprovisioning. 86 optional int32 count_of_deprovision_success = 13; 87 // Total count of failed attempts for deprovisioning. 88 optional int32 count_of_deprovision_fail = 14; 89 // The sum of all duration from the satellite is turned on until it is turned off in seconds. 90 optional int32 total_service_uptime_sec = 15; 91 // The amount of battery consumption, while the satellite state is on. 92 // excluded while in charging state rounded to percent. 93 optional int32 total_battery_consumption_percent = 16; 94 // The total duration of the battery being charged while satellite modem is on 95 optional int32 total_battery_charged_time_sec = 17; 96 // Count of successful satellite service enablement in demo mode 97 optional int32 count_of_demo_mode_satellite_service_enablements_success = 18; 98 // Count of failed satellite service enablement in demo mode 99 optional int32 count_of_demo_mode_satellite_service_enablements_fail = 19; 100 // Total count of successful outgoing datagrams in demo mode. 101 optional int32 count_of_demo_mode_outgoing_datagram_success = 20; 102 // Total count of failed attempts for outgoing datagrams in demo mode. 103 optional int32 count_of_demo_mode_outgoing_datagram_fail = 21; 104 // Total count of successful incoming datagrams in demo mode. 105 optional int32 count_of_demo_mode_incoming_datagram_success = 22; 106 // Total count of failed attempts for incoming datagrams in demo mode. 107 optional int32 count_of_demo_mode_incoming_datagram_fail = 23; 108 // Total count of successful DATAGRAM_TYPE_KEEP_ALIVE request. 109 optional int32 count_of_datagram_type_keep_alive_success = 24; 110 // Total count of failed DATAGRAM_TYPE_KEEP_ALIVE request. 111 optional int32 count_of_datagram_type_keep_alive_fail = 25; 112 // Total count of allowed satellite access. 113 optional int32 count_of_allowed_satellite_access = 26; 114 // Total count of disallowed satellite access. 115 optional int32 count_of_disallowed_satellite_access = 27; 116 // Total count of failed checking event for satellite access. 117 optional int32 count_of_satellite_access_check_fail = 28; 118} 119 120/** 121 * One data point of this metric is logged per satellite enablement 122 */ 123message SatelliteSession { 124 // The result for satellite modem initialization. 125 optional android.telephony.SatelliteError satellite_service_initialization_result = 1; 126 // Satellite technology to datagram transfer. 127 optional android.telephony.NTRadioTechnology satellite_technology = 2; 128 // Total count of times this event has occurred. 129 optional int32 count = 3; 130 // The result for satellite service disablement 131 // set as dimension 132 optional android.telephony.SatelliteError satellite_service_termination_result = 4; 133 // the processing time to enable satellite session 134 optional int64 initialization_processing_time_millis = 5; 135 // the processing time to disable satellite session 136 optional int64 termination_processing_time_millis = 6; 137 // the duration from the satellite service is enabled to satellite is disabled 138 optional int32 session_duration_seconds = 7; 139 // the number of successful outgoing datagram transmission while the session is enabled 140 optional int32 count_of_outgoing_datagram_success = 8; 141 // the number of failed outgoing datagram transmission while the session is enabled 142 optional int32 count_of_outgoing_datagram_failed = 9; 143 // the number of successful incoming datagram transmission while the session is enabled 144 optional int32 count_of_incoming_datagram_success = 10; 145 // the number of failed incoming datagram transmission while the session is enabled 146 optional int32 count_of_incoming_datagram_failed = 11; 147 // Whether this session is enabled for demo mode, code {true} if it is demo mode 148 optional bool is_demo_mode = 12; 149 // Max Ntn signal strength while the satellite session is enabled 150 optional int32 max_ntn_signal_strength_level = 13; 151} 152 153/** 154 * Snapshot of satellite incoming datagram 155 */ 156message SatelliteIncomingDatagram { 157 // Return code in receiving the datagram. 158 optional android.telephony.SatelliteError result_code = 1; 159 // The size of the datagram in bytes. 160 optional int32 datagram_size_bytes = 2; 161 // The amount of time took to receive the datagram. 162 optional int64 datagram_transfer_time_millis = 3; 163 // Whether it is transferred in demo mode or not. if true, transferred in demo mode. 164 optional bool is_demo_mode = 4; 165} 166 167/** 168 * Snapshot of satellite outgoing datagram 169 */ 170message SatelliteOutgoingDatagram { 171 // Feature type of datagram. 172 optional android.telephony.DatagramType satellite_datagram_type = 1; 173 // Return code in sending the datagram. 174 optional android.telephony.SatelliteError result_code = 2; 175 // The size of the datagram in bytes. 176 optional int32 datagram_size_bytes = 3; 177 // The amount of time took to send the datagram. 178 optional int64 datagram_transfer_time_millis = 4; 179 // Whether it is transferred in demo mode or not. if true, transferred in demo mode. 180 optional bool is_demo_mode = 5; 181} 182 183/** 184 * Stats about the provision/deprovision result for satellite service 185 */ 186message SatelliteProvision { 187 // The result of satellite service provision/deprovision. 188 optional android.telephony.SatelliteError result_code = 1; 189 // The amount of time in seconds from start to complete provision/deprovision. 190 optional int32 processing_time_sec = 2; 191 // Indicator whether this is for provision/deprovision. 192 // true means a provision request, and false means a deprovision request. 193 optional bool is_provision_request = 3; 194 // Whether the provisioning request was canceled. 195 optional bool is_canceled = 4; 196} 197 198/** 199 * Snapshot of satellite SOS message recommender 200 */ 201message SatelliteSosMessageRecommender { 202 // Whether the Dialer is notified with the event DISPLAY_SOS_MESSAGE. 203 optional bool is_display_sos_message_sent = 1; 204 // Number of times the timer is started. 205 optional int32 count_of_timer_started = 2; 206 // Whether IMS is registered. 207 optional bool is_ims_registered = 3; 208 // The cellular service state. 209 optional android.telephony.ServiceStateEnum cellular_service_state = 4; 210 // Total count of times this event has occurred. 211 optional int32 count = 5; 212 // Whether the device supports multiple SIMs. 213 optional bool is_multi_sim = 6; 214 // Handover type from emergency call to satellite messaging 215 optional android.telephony.RecommendingHandoverType recommending_handover_type = 7; 216 // Whether satellite communication is allowed in current location. 217 optional bool is_satellite_allowed_in_current_location = 8; 218} 219 220/** 221 * Stats about carrier roaming satellite session 222 */ 223message CarrierRoamingSatelliteSession { 224 // Carrier id of the subscription connected to non-terrestrial network 225 optional int32 carrier_id = 1; 226 // Whether device is connected to roaming non-terrestrial network 227 optional bool is_ntn_roaming_in_home_country = 2; 228 // Total time of satellite session 229 optional int32 total_satellite_mode_time_sec = 3; 230 // Number of times satellite signal is lost and gained within a session 231 optional int32 number_of_satellite_connections = 4; 232 // Average duration of a satellite connection 233 optional int32 avg_duration_of_satellite_connection_sec = 5; 234 // Minimum time gap between satellite connections in a satellite session 235 optional int32 satellite_connection_gap_min_sec = 6; 236 // Average time gap between satellite connections in a satellite session 237 optional int32 satellite_connection_gap_avg_sec = 7; 238 // Maximum time gap between satellite connections in a satellite session 239 optional int32 satellite_connection_gap_max_sec = 8; 240 // Average RSRP of non-terrestrial network 241 optional int32 rsrp_avg = 9; 242 // Median RSRP of non-terrestrial network 243 optional int32 rsrp_median = 10; 244 // Average RSSNR of non-terrestrial network 245 optional int32 rssnr_avg = 11; 246 // Median RSSNR of non-terrestrial network 247 optional int32 rssnr_median = 12; 248 // Total number of incoming sms received during the session 249 optional int32 count_of_incoming_sms = 13; 250 // Total number of outgoing sms sent during the session 251 optional int32 count_of_outgoing_sms = 14; 252 // Total number of incoming mms received during the session 253 optional int32 count_of_incoming_mms = 15; 254 // Total number of outgoing mms sent during the session 255 optional int32 count_of_outgoing_mms = 16; 256} 257 258/** 259 * Stats about usage of carrier roaming satellite network 260 */ 261message CarrierRoamingSatelliteControllerStats { 262 // Data source of carrier roaming satellite network 263 optional android.telephony.ConfigDataSource config_data_source = 1; 264 // Total number of times entitlement status query request is sent to server 265 optional int32 count_of_entitlement_status_query_request = 2; 266 // Total number of times satellite config is updated 267 optional int32 count_of_satellite_config_update_request = 3; 268 // Total number of times auto-connected to satellite notification is displayed 269 optional int32 count_of_satellite_notification_displayed = 4; 270 // Minimum gap between satellite sessions 271 optional int32 satellite_session_gap_min_sec = 5; 272 // Average gap between satellite sessions 273 optional int32 satellite_session_gap_avg_sec = 6; 274 // Maximum gap between satellite sessions 275 optional int32 satellite_session_gap_max_sec = 7; 276} 277 278/** 279 * Stats about apps using carrier-roaming satellite services such as SMS, MMS and DATA 280 */ 281message ControllerStatsPerPackage { 282 optional int32 uid = 1 [(is_uid) = true]; 283} 284 285/** 286 * Stats about satellite entitlement query request 287 */ 288message SatelliteEntitlement { 289 // Carrier id of the subscription connected to non-terrestrial network 290 optional int32 carrier_id = 1; 291 // Result of entitlement query request 292 optional int32 result = 2; 293 // Entitlement status of the subscription 294 optional android.telephony.SatelliteEntitlementStatus entitlement_status = 3; 295 // Retry request for entitlement query 296 optional bool is_retry = 4; 297 // Total number of times this event has occurred 298 optional int32 count = 5; 299} 300 301/** 302 * Stats about satellite config update 303 */ 304message SatelliteConfigUpdater { 305 // satellite config version used by the device 306 optional int32 config_version = 1; 307 // Result of OEM config update 308 optional android.telephony.ConfigUpdateResult oem_config_result = 2; 309 // Result of carrier config update 310 optional android.telephony.ConfigUpdateResult carrier_config_result = 3; 311 // Total number of times this event has occurred 312 optional int32 count = 4; 313} 314 315message SatelliteAccessController { 316 // Satellite access control type. 317 optional android.telephony.AccessControlType access_control_type = 1; 318 // The amount of time took to query current location. 319 optional int64 location_query_time_millis = 2; 320 // The amount of time took to search for the current location in the on-device data. 321 optional int64 on_device_lookup_time_millis = 3; 322 // The total amount of time took to serve a request for checking if satellite communication is 323 // allowed at the current location. 324 optional int64 total_checking_time_millis = 4; 325 // Whether satellite service is allowed at the current location. 326 optional bool is_allowed = 5; 327 // Whether request is received in emergency mode. 328 optional bool is_emergency = 6; 329 // Result code of the request for checking if satellite communication is allowed at the current 330 // location. 331 optional android.telephony.SatelliteError result_code = 7; 332 // Country codes where the device resides. 333 repeated string country_codes = 8; 334 // Source of geofencing config data 335 optional android.telephony.ConfigDataSource config_data_source = 9; 336} 337