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 // Demo mode is a service that allows users to practise in a safe environment, 98 // considering that the first use of the satellite service is likely to be in 99 // an emergency. 100 optional int32 count_of_demo_mode_satellite_service_enablements_success = 18; 101 // Count of failed satellite service enablement in demo mode 102 optional int32 count_of_demo_mode_satellite_service_enablements_fail = 19; 103 // Total count of successful outgoing datagrams in demo mode. 104 optional int32 count_of_demo_mode_outgoing_datagram_success = 20; 105 // Total count of failed attempts for outgoing datagrams in demo mode. 106 optional int32 count_of_demo_mode_outgoing_datagram_fail = 21; 107 // Total count of successful incoming datagrams in demo mode. 108 optional int32 count_of_demo_mode_incoming_datagram_success = 22; 109 // Total count of failed attempts for incoming datagrams in demo mode. 110 optional int32 count_of_demo_mode_incoming_datagram_fail = 23; 111 // Total count of successful DATAGRAM_TYPE_KEEP_ALIVE request. 112 optional int32 count_of_datagram_type_keep_alive_success = 24; 113 // Total count of failed DATAGRAM_TYPE_KEEP_ALIVE request. 114 optional int32 count_of_datagram_type_keep_alive_fail = 25; 115 // Total count of allowed satellite access. 116 optional int32 count_of_allowed_satellite_access = 26; 117 // Total count of disallowed satellite access. 118 optional int32 count_of_disallowed_satellite_access = 27; 119 // Total count of failed checking event for satellite access. 120 optional int32 count_of_satellite_access_check_fail = 28; 121 // Whether this device is provisioned or not. 122 optional bool is_provisioned = 29; 123 // Carrier id of the subscription connected to non-terrestrial network 124 optional int32 carrier_id = 30; 125 // Count of satellite allowed state changed events 126 optional int32 count_of_satellite_allowed_state_changed_events = 31; 127 // Count of successful location queries 128 optional int32 count_of_successful_location_queries = 32; 129 // Count of failed location queries 130 optional int32 count_of_failed_location_queries = 33; 131 // Number of times the notification indicating P2P SMS availability was shown. 132 optional int32 count_of_p2p_sms_available_notification_shown = 34; 133 // Number of times the notification indicating P2P SMS availability was removed. 134 optional int32 count_of_p2p_sms_available_notification_removed = 35; 135 // Whether this satellite service is from NTN only carrier. 136 optional bool is_ntn_only_carrier = 36; 137 // Version of satellite access config data. 138 optional int32 version_of_satellite_access_config = 37; 139 // Total count of successful attempts for receiving SOS SMS. 140 optional int32 count_of_incoming_datagram_type_sos_sms_success = 38; 141 // Total count of failed attempts for receiving SOS SMS. 142 optional int32 count_of_incoming_datagram_type_sos_sms_fail = 39; 143 // Total count of successful attempts for transferring P2P SMS. 144 optional int32 count_of_outgoing_datagram_type_sms_success = 40; 145 // Total count of failed attempts for transferring P2P SMS. 146 optional int32 count_of_outgoing_datagram_type_sms_fail = 41; 147 // Total count of successful attempts for receiving P2P SMS. 148 optional int32 count_of_incoming_datagram_type_sms_success = 42; 149 // Total count of failed attempts for receiving P2P SMS. 150 optional int32 count_of_incoming_datagram_type_sms_fail = 43; 151} 152 153/** 154 * One data point of this metric is logged per satellite enablement 155 */ 156message SatelliteSession { 157 // The result for satellite modem initialization. 158 optional android.telephony.SatelliteError satellite_service_initialization_result = 1; 159 // Satellite technology to datagram transfer. 160 optional android.telephony.NTRadioTechnology satellite_technology = 2; 161 // Total count of times this event has occurred. 162 optional int32 count = 3; 163 // The result for satellite service disablement 164 // set as dimension 165 optional android.telephony.SatelliteError satellite_service_termination_result = 4; 166 // the processing time to enable satellite session 167 optional int64 initialization_processing_time_millis = 5; 168 // the processing time to disable satellite session 169 optional int64 termination_processing_time_millis = 6; 170 // the duration from the satellite service is enabled to satellite is disabled 171 optional int32 session_duration_seconds = 7; 172 // the number of successful outgoing datagram transmission while the session is enabled 173 optional int32 count_of_outgoing_datagram_success = 8; 174 // the number of failed outgoing datagram transmission while the session is enabled 175 optional int32 count_of_outgoing_datagram_failed = 9; 176 // the number of successful incoming datagram transmission while the session is enabled 177 optional int32 count_of_incoming_datagram_success = 10; 178 // the number of failed incoming datagram transmission while the session is enabled 179 optional int32 count_of_incoming_datagram_failed = 11; 180 // Whether this session is enabled for demo mode, code {true} if it is demo mode 181 // Demo mode is a service that allows users to practise in a safe environment, 182 // considering that the first use of the satellite service is likely to be in 183 // an emergency. 184 optional bool is_demo_mode = 12; 185 // Max Ntn signal strength while the satellite session is enabled 186 optional int32 max_ntn_signal_strength_level = 13; 187 // Carrier id of the subscription connected to non-terrestrial network 188 optional int32 carrier_id = 14; 189 // Total number of times the user is notified that the device is eligible for satellite service 190 optional int32 count_of_satellite_notification_displayed = 15; 191 // Total number of times exit P2P message service automatically due to screen is off and timer is expired 192 optional int32 count_of_auto_exit_due_to_screen_off = 16; 193 // Total number of times exit P2P message service automatically when a TN network is detected during idle scanning mode 194 optional int32 count_of_auto_exit_due_to_tn_network = 17; 195 // Whether this session is enabled for emergency. 196 optional bool is_emergency = 18; 197 // Whether this satellite service is from NTN only carrier. 198 optional bool is_ntn_only_carrier = 19; 199 // Max user inactivity duration in seconds 200 optional int32 max_inactivity_duration_sec = 20; 201} 202 203/** 204 * Snapshot of satellite incoming datagram 205 */ 206message SatelliteIncomingDatagram { 207 // Return code in receiving the datagram. 208 optional android.telephony.SatelliteError result_code = 1; 209 // The size of the datagram in bytes. 210 optional int32 datagram_size_bytes = 2; 211 // The amount of time took to receive the datagram. 212 optional int64 datagram_transfer_time_millis = 3; 213 // Whether it is transferred in demo mode or not. if true, transferred in demo mode. 214 // Demo mode is a service that allows users to practise in a safe environment, 215 // considering that the first use of the satellite service is likely to be in 216 // an emergency. 217 optional bool is_demo_mode = 4; 218 // Carrier id of the subscription connected to non-terrestrial network 219 optional int32 carrier_id = 5; 220 // Whether this satellite service is from NTN only carrier. 221 optional bool is_ntn_only_carrier = 6; 222} 223 224/** 225 * Snapshot of satellite outgoing datagram 226 */ 227message SatelliteOutgoingDatagram { 228 // Feature type of datagram. 229 optional android.telephony.DatagramType satellite_datagram_type = 1; 230 // Return code in sending the datagram. 231 optional android.telephony.SatelliteError result_code = 2; 232 // The size of the datagram in bytes. 233 optional int32 datagram_size_bytes = 3; 234 // The amount of time took to send the datagram. 235 optional int64 datagram_transfer_time_millis = 4; 236 // Whether it is transferred in demo mode or not. if true, transferred in demo mode. 237 // Demo mode is a service that allows users to practise in a safe environment, 238 // considering that the first use of the satellite service is likely to be in 239 // an emergency. 240 optional bool is_demo_mode = 5; 241 // Carrier id of the subscription connected to non-terrestrial network 242 optional int32 carrier_id = 6; 243 // Whether this satellite service is from NTN only carrier. 244 optional bool is_ntn_only_carrier = 7; 245} 246 247/** 248 * Stats about the provision/deprovision result for satellite service 249 */ 250message SatelliteProvision { 251 // The result of satellite service provision/deprovision. 252 optional android.telephony.SatelliteError result_code = 1; 253 // The amount of time in seconds from start to complete provision/deprovision. 254 optional int32 processing_time_sec = 2; 255 // Indicator whether this is for provision/deprovision. 256 // true means a provision request, and false means a deprovision request. 257 optional bool is_provision_request = 3; 258 // Whether the provisioning request was canceled. 259 optional bool is_canceled = 4; 260 // Carrier id of the subscription connected to non-terrestrial network 261 optional int32 carrier_id = 5; 262 // Whether this satellite service is from NTN only carrier. 263 optional bool is_ntn_only_carrier = 6; 264} 265 266/** 267 * Snapshot of satellite SOS message recommender 268 */ 269message SatelliteSosMessageRecommender { 270 // Whether the Dialer is notified with the event DISPLAY_SOS_MESSAGE. 271 optional bool is_display_sos_message_sent = 1; 272 // Number of times the timer is started. 273 optional int32 count_of_timer_started = 2; 274 // Whether IMS is registered. 275 optional bool is_ims_registered = 3; 276 // The cellular service state. 277 optional android.telephony.ServiceStateEnum cellular_service_state = 4; 278 // Total count of times this event has occurred. 279 optional int32 count = 5; 280 // Whether the device supports multiple SIMs. 281 optional bool is_multi_sim = 6; 282 // Handover type from emergency call to satellite messaging 283 optional android.telephony.RecommendingHandoverType recommending_handover_type = 7; 284 // Whether satellite communication is allowed in current location. 285 optional bool is_satellite_allowed_in_current_location = 8; 286 // Whether Wi-Fi is available when the emergency call attempted. 287 optional bool is_wifi_connected = 9; 288 // Carrier id of the subscription connected to non-terrestrial network 289 optional int32 carrier_id = 10; 290 // Whether this satellite service is from NTN only carrier. 291 optional bool is_ntn_only_carrier = 11; 292} 293 294/** 295 * Stats about carrier roaming satellite session 296 */ 297message CarrierRoamingSatelliteSession { 298 // Carrier id of the subscription connected to non-terrestrial network 299 optional int32 carrier_id = 1; 300 // Whether device is connected to roaming non-terrestrial network 301 optional bool is_ntn_roaming_in_home_country = 2; 302 // Total time of satellite session 303 optional int32 total_satellite_mode_time_sec = 3; 304 // Number of times satellite signal is lost and gained within a session 305 optional int32 number_of_satellite_connections = 4; 306 // Average duration of a satellite connection 307 optional int32 avg_duration_of_satellite_connection_sec = 5; 308 // Minimum time gap between satellite connections in a satellite session 309 optional int32 satellite_connection_gap_min_sec = 6; 310 // Average time gap between satellite connections in a satellite session 311 optional int32 satellite_connection_gap_avg_sec = 7; 312 // Maximum time gap between satellite connections in a satellite session 313 optional int32 satellite_connection_gap_max_sec = 8; 314 // Average RSRP of non-terrestrial network 315 optional int32 rsrp_avg = 9; 316 // Median RSRP of non-terrestrial network 317 optional int32 rsrp_median = 10; 318 // Average RSSNR of non-terrestrial network 319 optional int32 rssnr_avg = 11; 320 // Median RSSNR of non-terrestrial network 321 optional int32 rssnr_median = 12; 322 // Total number of incoming sms received during the session 323 optional int32 count_of_incoming_sms = 13; 324 // Total number of outgoing sms sent during the session 325 optional int32 count_of_outgoing_sms = 14; 326 // Total number of incoming mms received during the session 327 optional int32 count_of_incoming_mms = 15; 328 // Total number of outgoing mms sent during the session 329 optional int32 count_of_outgoing_mms = 16; 330 // satellite supported services 331 repeated int32 supported_satellite_services = 17; 332 // Data Supported mode at satellite session 333 optional int32 service_data_policy = 18; 334 // Total data consumed per satellite session 335 optional int64 satellite_data_consumed_bytes = 19; 336 // Whether device is in DSDS mode 337 optional bool is_multi_sim = 20; 338 // Whether the service is Carrier Roaming NB-Iot NTN network or not. 339 optional bool is_nb_iot_ntn = 21; 340} 341 342/** 343 * Stats about usage of carrier roaming satellite network 344 */ 345message CarrierRoamingSatelliteControllerStats { 346 // Data source of carrier roaming satellite network 347 optional android.telephony.ConfigDataSource config_data_source = 1; 348 // Total number of times entitlement status query request is sent to server 349 optional int32 count_of_entitlement_status_query_request = 2; 350 // Total number of times satellite config is updated 351 optional int32 count_of_satellite_config_update_request = 3; 352 // Total number of times auto-connected to satellite notification is displayed 353 optional int32 count_of_satellite_notification_displayed = 4; 354 // Minimum gap between satellite sessions 355 optional int32 satellite_session_gap_min_sec = 5; 356 // Average gap between satellite sessions 357 optional int32 satellite_session_gap_avg_sec = 6; 358 // Maximum gap between satellite sessions 359 optional int32 satellite_session_gap_max_sec = 7; 360 // Carrier id of the subscription connected to non-terrestrial network 361 optional int32 carrier_id = 8; 362 // Whether this device is entitled or not. 363 optional bool is_device_entitled = 9; 364 // Whether device is in DSDS mode 365 optional bool is_multi_sim = 10; 366 // Count of how many satellite sessions have been opened 367 optional int32 count_of_satellite_sessions = 11; 368 // Whether the service is Carrier Roaming NB-Iot NTN network or not. 369 optional bool is_nb_iot_ntn = 12; 370} 371 372/** 373 * Stats about apps using carrier-roaming satellite services such as SMS, MMS and DATA 374 */ 375message ControllerStatsPerPackage { 376 optional int32 uid = 1 [(is_uid) = true]; 377 // Carrier id of the subscription connected to non-terrestrial network 378 optional int32 carrier_id = 2; 379} 380 381/** 382 * Stats about satellite entitlement query request 383 */ 384message SatelliteEntitlement { 385 // Carrier id of the subscription connected to non-terrestrial network 386 optional int32 carrier_id = 1; 387 // Result of entitlement query request 388 optional int32 result = 2; 389 // Entitlement status of the subscription 390 optional android.telephony.SatelliteEntitlementStatus entitlement_status = 3; 391 // Retry request for entitlement query 392 optional bool is_retry = 4; 393 // Total number of times this event has occurred 394 optional int32 count = 5; 395 // allowed service entitlement status 396 optional bool is_allowed_service_entitlement = 6; 397 // service type entitlement 398 repeated int32 entitlement_service_type = 7; 399 // data policy entitlement 400 optional android.telephony.SatelliteEntitlementServicePolicy entitlement_data_policy = 8; 401} 402 403/** 404 * Stats about satellite config update 405 */ 406message SatelliteConfigUpdater { 407 // satellite config version used by the device 408 optional int32 config_version = 1; 409 // Result of OEM config update 410 optional android.telephony.ConfigUpdateResult oem_config_result = 2; 411 // Result of carrier config update 412 optional android.telephony.ConfigUpdateResult carrier_config_result = 3; 413 // Total number of times this event has occurred 414 optional int32 count = 4; 415} 416 417message SatelliteAccessController { 418 // Satellite access control type. 419 optional android.telephony.AccessControlType access_control_type = 1; 420 // The amount of time took to query current location. 421 optional int64 location_query_time_millis = 2; 422 // The amount of time took to search for the current location in the on-device data. 423 optional int64 on_device_lookup_time_millis = 3; 424 // The total amount of time took to serve a request for checking if satellite communication is 425 // allowed at the current location. 426 optional int64 total_checking_time_millis = 4; 427 // Whether satellite service is allowed at the current location. 428 optional bool is_allowed = 5; 429 // Whether request is received in emergency mode. 430 optional bool is_emergency = 6; 431 // Result code of the request for checking if satellite communication is allowed at the current 432 // location. 433 optional android.telephony.SatelliteError result_code = 7; 434 // ISO 3166-1 alpha-2 uppercase country codes representing the device's 435 // location. 436 // Country codes are determined based on the device's current location 437 // information, obtained from the cellular network. 438 // Country code can be obtained only when there is available cellular network, 439 // or empty list will be given. 440 // Cellular networks may provide multiple codes at locations near country 441 // borders. 442 repeated string country_codes = 8; 443 // Source of geofencing config data 444 optional android.telephony.ConfigDataSource config_data_source = 9; 445 // Carrier id of the subscription connected to non-terrestrial network 446 optional int32 carrier_id = 10; 447 // From which reason the Satellite Access Controller operation was triggered. 448 optional android.telephony.TriggeringEvent triggering_event = 11; 449 // Whether this satellite service is from NTN only carrier. 450 optional bool is_ntn_only_carrier = 12; 451} 452