1#!/usr/bin/env python3 2# 3# Copyright 2016 - Google 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17############################################### 18# TIMERS 19############################################### 20# Max time to wait for phone data/network connection state update 21MAX_WAIT_TIME_CONNECTION_STATE_UPDATE = 60 22 23# Max time to wait for network reselection 24MAX_WAIT_TIME_NW_SELECTION = 180 25 26# Max time to wait for call drop 27MAX_WAIT_TIME_CALL_DROP = 60 28 29# Wait time between state check retry 30WAIT_TIME_BETWEEN_STATE_CHECK = 5 31 32# Max wait time for state change 33MAX_WAIT_TIME_FOR_STATE_CHANGE = 60 34 35# Max time to wait after caller make a call and before 36# callee start ringing 37MAX_WAIT_TIME_CALLEE_RINGING = 90 38 39# country code list 40COUNTRY_CODE_LIST = [ 41 "+1", "+44", "+39", "+61", "+49", "+34", "+33", "+47", "+246", "+86", 42 "+850", "+81" 43] 44 45# default pin/password 46DEFAULT_DEVICE_PASSWORD = "1111" 47 48# Wait time after enterring puk code 49WAIT_TIME_SUPPLY_PUK_CODE = 30 50 51# Max time to wait after caller make a call and before 52# callee start ringing 53MAX_WAIT_TIME_ACCEPT_CALL_TO_OFFHOOK_EVENT = 30 54 55# Max time to wait for "onCallStatehangedIdle" event after reject or ignore 56# incoming call 57MAX_WAIT_TIME_CALL_IDLE_EVENT = 60 58 59# Max time to wait after initiating a call for telecom to report in-call 60MAX_WAIT_TIME_CALL_INITIATION = 90 61 62# Time to wait after change Mode Pref for Stress Test 63WAIT_TIME_AFTER_MODE_CHANGE = 60 64 65# Max time to wait for Carrier Config Version to Update in mins 66WAIT_TIME_FOR_CARRIERCONFIG_CHANGE = 20 67 68# Max time to wait after toggle airplane mode and before 69# get expected event 70MAX_WAIT_TIME_AIRPLANEMODE_EVENT = 90 71 72# Max time to wait after device sent an SMS and before 73# get "onSmsSentSuccess" event 74MAX_WAIT_TIME_SMS_SENT_SUCCESS = 60 75 76# Max time to wait after MT SMS was sent and before device 77# actually receive this MT SMS. 78MAX_WAIT_TIME_SMS_RECEIVE = 120 79 80# Max time to wait for IMS registration 81MAX_WAIT_TIME_IMS_REGISTRATION = 120 82 83# TODO: b/26338156 MAX_WAIT_TIME_VOLTE_ENABLED and MAX_WAIT_TIME_WFC_ENABLED should only 84# be used for wait after IMS registration. 85 86# Max time to wait for VoLTE enabled flag to be True 87MAX_WAIT_TIME_VOLTE_ENABLED = MAX_WAIT_TIME_IMS_REGISTRATION + 60 88 89# Max time to wait for WFC enabled flag to be True 90MAX_WAIT_TIME_WFC_ENABLED = MAX_WAIT_TIME_IMS_REGISTRATION + 120 91 92# Max time to wait for WFC enabled flag to be False 93MAX_WAIT_TIME_WFC_DISABLED = 60 94 95# Max time to wait for WiFi Manager to Connect to an AP 96MAX_WAIT_TIME_WIFI_CONNECTION = 30 97 98# Max time to wait for Video Session Modify Messaging 99MAX_WAIT_TIME_VIDEO_SESSION_EVENT = 10 100 101# Max time to wait after a network connection for ConnectivityManager to 102# report a working user plane data connection 103MAX_WAIT_TIME_USER_PLANE_DATA = 20 104 105# Max time to wait for tethering entitlement check 106MAX_WAIT_TIME_TETHERING_ENTITLEMENT_CHECK = 60 107 108# Max time to wait for voice mail count report correct result. 109MAX_WAIT_TIME_VOICE_MAIL_COUNT = 90 110 111# Max time to wait for data SIM change 112MAX_WAIT_TIME_DATA_SUB_CHANGE = 150 113 114# Max time to wait for telecom Ringing status after receive ringing event 115MAX_WAIT_TIME_TELECOM_RINGING = 5 116 117# Max time to wait for phone get provisioned. 118MAX_WAIT_TIME_PROVISIONING = 300 119 120# Time to wait after call setup before declaring 121# that the call is actually successful 122WAIT_TIME_IN_CALL = 30 123 124# (For IMS, e.g. VoLTE-VoLTE, WFC-WFC, VoLTE-WFC test only) 125# Time to wait after call setup before declaring 126# that the call is actually successful 127WAIT_TIME_IN_CALL_FOR_IMS = 30 128 129# Time to wait after phone receive incoming call before phone reject this call. 130WAIT_TIME_REJECT_CALL = 2 131 132# Time to leave a voice message after callee reject the incoming call 133WAIT_TIME_LEAVE_VOICE_MAIL = 30 134 135# Time to wait after accept video call and before checking state 136WAIT_TIME_ACCEPT_VIDEO_CALL_TO_CHECK_STATE = 2 137 138# Time delay to ensure user actions are performed in 139# 'human' time rather than at the speed of the script 140WAIT_TIME_ANDROID_STATE_SETTLING = 1 141 142# Time to wait after registration to ensure the phone 143# has sufficient time to reconfigure based on new network 144WAIT_TIME_BETWEEN_REG_AND_CALL = 5 145 146# Time to wait for 1xrtt voice attach check 147# After DUT voice network type report 1xrtt (from unknown), it need to wait for 148# several seconds before the DUT can receive incoming call. 149WAIT_TIME_1XRTT_VOICE_ATTACH = 30 150 151# Time to wait for data status change during wifi tethering,. 152WAIT_TIME_DATA_STATUS_CHANGE_DURING_WIFI_TETHERING = 30 153 154# Time to wait for rssi calibration. 155# This is the delay between <WiFi Connected> and <Turn on Screen to get RSSI>. 156WAIT_TIME_WIFI_RSSI_CALIBRATION_WIFI_CONNECTED = 10 157# This is the delay between <Turn on Screen> and <Call API to get WiFi RSSI>. 158WAIT_TIME_WIFI_RSSI_CALIBRATION_SCREEN_ON = 2 159 160# Time to wait for each operation on voice mail box. 161WAIT_TIME_VOICE_MAIL_SERVER_RESPONSE = 10 162 163# Time to wait for radio to up and running after reboot 164WAIT_TIME_AFTER_REBOOT = 10 165 166# Time to wait for radio to up and running after force crash 167WAIT_TIME_AFTER_CRASH = 60 168 169# Time to wait for boot complete after reboot 170WAIT_TIME_FOR_BOOT_COMPLETE = 75 171 172# Time to wait for tethering test after reboot 173WAIT_TIME_TETHERING_AFTER_REBOOT = 10 174 175# Time to wait after changing data sub id 176WAIT_TIME_CHANGE_DATA_SUB_ID = 30 177 178# Time to wait after changing voice sub id 179WAIT_TIME_CHANGE_VOICE_SUB_ID = 5 180 181# Time to wait after changing message sub id 182WAIT_TIME_CHANGE_MESSAGE_SUB_ID = 5 183 184# Wait time for Data Stall to detect 185WAIT_TIME_FOR_DATA_STALL = 300 186 187# Wait time for Network Validation Failed detection 188WAIT_TIME_FOR_NW_VALID_FAIL = 300 189 190# Wait time for Data Stall to recover 191WAIT_TIME_FOR_DATA_STALL_RECOVERY = 360 192 193# Callbox Power level which will cause no service on device 194POWER_LEVEL_OUT_OF_SERVICE = -100 195 196# Callbox Power level which will ensure full service on device 197POWER_LEVEL_FULL_SERVICE = -20 198 199# These are used in phone_number_formatter 200PHONE_NUMBER_STRING_FORMAT_7_DIGIT = 7 201PHONE_NUMBER_STRING_FORMAT_10_DIGIT = 10 202PHONE_NUMBER_STRING_FORMAT_11_DIGIT = 11 203PHONE_NUMBER_STRING_FORMAT_12_DIGIT = 12 204 205# MAX screen-on time during test (in unit of second) 206MAX_SCREEN_ON_TIME = 1800 207 208# In Voice Mail box, press this digit to delete one message. 209VOICEMAIL_DELETE_DIGIT = '7' 210 211# MAX number of saved voice mail in voice mail box. 212MAX_SAVED_VOICE_MAIL = 25 213 214# SIM1 slot index 215SIM1_SLOT_INDEX = 0 216 217# SIM2 slot index 218SIM2_SLOT_INDEX = 1 219 220# invalid Subscription ID 221INVALID_SUB_ID = -1 222 223# invalid SIM slot index 224INVALID_SIM_SLOT_INDEX = -1 225 226# WiFI RSSI is -127 if WiFi is not connected 227INVALID_WIFI_RSSI = -127 228 229# MAX and MIN value for attenuator settings 230ATTEN_MAX_VALUE = 95 231ATTEN_MIN_VALUE = 0 232 233MAX_RSSI_RESERVED_VALUE = 100 234MIN_RSSI_RESERVED_VALUE = -200 235 236# cellular weak RSSI value 237CELL_WEAK_RSSI_VALUE = -105 238# cellular strong RSSI value 239CELL_STRONG_RSSI_VALUE = -70 240# WiFi weak RSSI value 241WIFI_WEAK_RSSI_VALUE = -63 242 243# Emergency call number 244DEFAULT_EMERGENCY_CALL_NUMBER = "911" 245 246EMERGENCY_CALL_NUMBERS = [ 247 "08", "000", "110", "112", "118", "119", "911", "999", "*911", "#911" 248] 249 250AOSP_PREFIX = "aosp_" 251 252INCALL_UI_DISPLAY_FOREGROUND = "foreground" 253INCALL_UI_DISPLAY_BACKGROUND = "background" 254INCALL_UI_DISPLAY_DEFAULT = "default" 255 256NETWORK_CONNECTION_TYPE_WIFI = 'wifi' 257NETWORK_CONNECTION_TYPE_CELL = 'cell' 258NETWORK_CONNECTION_TYPE_MMS = 'mms' 259NETWORK_CONNECTION_TYPE_HIPRI = 'hipri' 260NETWORK_CONNECTION_TYPE_UNKNOWN = 'unknown' 261 262TETHERING_MODE_WIFI = 'wifi' 263 264# Tether interface types defined in ConnectivityManager 265TETHERING_INVALID = -1 266TETHERING_WIFI = 0 267TETHERING_USB = 1 268TETHERING_BLUETOOTH = 2 269 270NETWORK_SERVICE_VOICE = 'voice' 271NETWORK_SERVICE_DATA = 'data' 272 273CARRIER_VZW = 'vzw' 274CARRIER_ATT = 'att' 275CARRIER_TMO = 'tmo' 276CARRIER_SPT = 'spt' 277CARRIER_EEUK = 'eeuk' 278CARRIER_VFUK = 'vfuk' 279CARRIER_UNKNOWN = 'unknown' 280CARRIER_GMBH = 'gmbh' 281CARRIER_ITA = 'ita' 282CARRIER_ESP = 'esp' 283CARRIER_ORG = 'org' 284CARRIER_TEL = 'tel' 285CARRIER_TSA = 'tsa' 286CARRIER_USCC = 'uscc' 287CARRIER_ROGERS = 'ROGERS' 288CARRIER_TELUS = 'tls' 289CARRIER_KOODO = 'kdo' 290CARRIER_VIDEOTRON = 'vtrn' 291CARRIER_BELL = 'bell' 292CARRIER_FRE = 'fre' 293CARRIER_FI = 'fi' 294 295RAT_FAMILY_CDMA = 'cdma' 296RAT_FAMILY_CDMA2000 = 'cdma2000' 297RAT_FAMILY_IDEN = 'iden' 298RAT_FAMILY_GSM = 'gsm' 299RAT_FAMILY_WCDMA = 'wcdma' 300RAT_FAMILY_UMTS = RAT_FAMILY_WCDMA 301RAT_FAMILY_WLAN = 'wlan' 302RAT_FAMILY_LTE = 'lte' 303RAT_FAMILY_TDSCDMA = 'tdscdma' 304RAT_FAMILY_UNKNOWN = 'unknown' 305 306CAPABILITY_PHONE = 'phone' 307CAPABILITY_VOLTE = 'volte' 308CAPABILITY_VT = 'vt' 309CAPABILITY_WFC = 'wfc' 310CAPABILITY_MSIM = 'msim' 311CAPABILITY_OMADM = 'omadm' 312CAPABILITY_WFC_MODE_CHANGE = 'wfc_mode_change' 313CAPABILITY_CONFERENCE = 'conference' 314CAPABILITY_VOLTE_PROVISIONING = 'volte_provisioning' 315CAPABILITY_VOLTE_OVERRIDE_WFC_PROVISIONING = 'volte_override_wfc_provisioning' 316 317# Carrier Config Versions 318VZW_CARRIER_CONFIG_VERSION = "29999999999.1" 319ATT_CARRIER_CONFIG_VERSION = "28888888888.1" 320 321# Constant for operation direction 322DIRECTION_MOBILE_ORIGINATED = "MO" 323DIRECTION_MOBILE_TERMINATED = "MT" 324 325# Constant for call teardown side 326CALL_TEARDOWN_PHONE = "PHONE" 327CALL_TEARDOWN_REMOTE = "REMOTE" 328 329WIFI_VERBOSE_LOGGING_ENABLED = 1 330WIFI_VERBOSE_LOGGING_DISABLED = 0 331""" 332Begin shared constant define for both Python and Java 333""" 334 335# Constant for WiFi Calling WFC mode 336WFC_MODE_WIFI_ONLY = "WIFI_ONLY" 337WFC_MODE_CELLULAR_PREFERRED = "CELLULAR_PREFERRED" 338WFC_MODE_WIFI_PREFERRED = "WIFI_PREFERRED" 339WFC_MODE_DISABLED = "DISABLED" 340WFC_MODE_UNKNOWN = "UNKNOWN" 341 342# Constant for Video Telephony VT state 343VT_STATE_AUDIO_ONLY = "AUDIO_ONLY" 344VT_STATE_TX_ENABLED = "TX_ENABLED" 345VT_STATE_RX_ENABLED = "RX_ENABLED" 346VT_STATE_BIDIRECTIONAL = "BIDIRECTIONAL" 347VT_STATE_TX_PAUSED = "TX_PAUSED" 348VT_STATE_RX_PAUSED = "RX_PAUSED" 349VT_STATE_BIDIRECTIONAL_PAUSED = "BIDIRECTIONAL_PAUSED" 350VT_STATE_STATE_INVALID = "INVALID" 351 352# Constant for Video Telephony Video quality 353VT_VIDEO_QUALITY_DEFAULT = "DEFAULT" 354VT_VIDEO_QUALITY_UNKNOWN = "UNKNOWN" 355VT_VIDEO_QUALITY_HIGH = "HIGH" 356VT_VIDEO_QUALITY_MEDIUM = "MEDIUM" 357VT_VIDEO_QUALITY_LOW = "LOW" 358VT_VIDEO_QUALITY_INVALID = "INVALID" 359 360# Constant for Call State (for call object) 361CALL_STATE_ACTIVE = "ACTIVE" 362CALL_STATE_NEW = "NEW" 363CALL_STATE_DIALING = "DIALING" 364CALL_STATE_RINGING = "RINGING" 365CALL_STATE_HOLDING = "HOLDING" 366CALL_STATE_DISCONNECTED = "DISCONNECTED" 367CALL_STATE_PRE_DIAL_WAIT = "PRE_DIAL_WAIT" 368CALL_STATE_CONNECTING = "CONNECTING" 369CALL_STATE_DISCONNECTING = "DISCONNECTING" 370CALL_STATE_UNKNOWN = "UNKNOWN" 371CALL_STATE_INVALID = "INVALID" 372 373# Constant for PRECISE Call State (for call object) 374PRECISE_CALL_STATE_ACTIVE = "ACTIVE" 375PRECISE_CALL_STATE_ALERTING = "ALERTING" 376PRECISE_CALL_STATE_DIALING = "DIALING" 377PRECISE_CALL_STATE_INCOMING = "INCOMING" 378PRECISE_CALL_STATE_HOLDING = "HOLDING" 379PRECISE_CALL_STATE_DISCONNECTED = "DISCONNECTED" 380PRECISE_CALL_STATE_WAITING = "WAITING" 381PRECISE_CALL_STATE_DISCONNECTING = "DISCONNECTING" 382PRECISE_CALL_STATE_IDLE = "IDLE" 383PRECISE_CALL_STATE_UNKNOWN = "UNKNOWN" 384PRECISE_CALL_STATE_INVALID = "INVALID" 385 386# Constant for DC POWER STATE 387DC_POWER_STATE_LOW = "LOW" 388DC_POWER_STATE_HIGH = "HIGH" 389DC_POWER_STATE_MEDIUM = "MEDIUM" 390DC_POWER_STATE_UNKNOWN = "UNKNOWN" 391 392# Constant for Audio Route 393AUDIO_ROUTE_EARPIECE = "EARPIECE" 394AUDIO_ROUTE_BLUETOOTH = "BLUETOOTH" 395AUDIO_ROUTE_SPEAKER = "SPEAKER" 396AUDIO_ROUTE_WIRED_HEADSET = "WIRED_HEADSET" 397AUDIO_ROUTE_WIRED_OR_EARPIECE = "WIRED_OR_EARPIECE" 398 399# Constant for Call Capability 400CALL_CAPABILITY_HOLD = "HOLD" 401CALL_CAPABILITY_SUPPORT_HOLD = "SUPPORT_HOLD" 402CALL_CAPABILITY_MERGE_CONFERENCE = "MERGE_CONFERENCE" 403CALL_CAPABILITY_SWAP_CONFERENCE = "SWAP_CONFERENCE" 404CALL_CAPABILITY_UNUSED_1 = "UNUSED_1" 405CALL_CAPABILITY_RESPOND_VIA_TEXT = "RESPOND_VIA_TEXT" 406CALL_CAPABILITY_MUTE = "MUTE" 407CALL_CAPABILITY_MANAGE_CONFERENCE = "MANAGE_CONFERENCE" 408CALL_CAPABILITY_SUPPORTS_VT_LOCAL_RX = "SUPPORTS_VT_LOCAL_RX" 409CALL_CAPABILITY_SUPPORTS_VT_LOCAL_TX = "SUPPORTS_VT_LOCAL_TX" 410CALL_CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = "SUPPORTS_VT_LOCAL_BIDIRECTIONAL" 411CALL_CAPABILITY_SUPPORTS_VT_REMOTE_RX = "SUPPORTS_VT_REMOTE_RX" 412CALL_CAPABILITY_SUPPORTS_VT_REMOTE_TX = "SUPPORTS_VT_REMOTE_TX" 413CALL_CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL = "SUPPORTS_VT_REMOTE_BIDIRECTIONAL" 414CALL_CAPABILITY_SEPARATE_FROM_CONFERENCE = "SEPARATE_FROM_CONFERENCE" 415CALL_CAPABILITY_DISCONNECT_FROM_CONFERENCE = "DISCONNECT_FROM_CONFERENCE" 416CALL_CAPABILITY_SPEED_UP_MT_AUDIO = "SPEED_UP_MT_AUDIO" 417CALL_CAPABILITY_CAN_UPGRADE_TO_VIDEO = "CAN_UPGRADE_TO_VIDEO" 418CALL_CAPABILITY_CAN_PAUSE_VIDEO = "CAN_PAUSE_VIDEO" 419CALL_CAPABILITY_UNKOWN = "UNKOWN" 420 421# Constant for Call Property 422CALL_PROPERTY_HIGH_DEF_AUDIO = "HIGH_DEF_AUDIO" 423CALL_PROPERTY_CONFERENCE = "CONFERENCE" 424CALL_PROPERTY_GENERIC_CONFERENCE = "GENERIC_CONFERENCE" 425CALL_PROPERTY_WIFI = "WIFI" 426CALL_PROPERTY_EMERGENCY_CALLBACK_MODE = "EMERGENCY_CALLBACK_MODE" 427CALL_PROPERTY_UNKNOWN = "UNKNOWN" 428 429# Constant for Call Presentation 430CALL_PRESENTATION_ALLOWED = "ALLOWED" 431CALL_PRESENTATION_RESTRICTED = "RESTRICTED" 432CALL_PRESENTATION_PAYPHONE = "PAYPHONE" 433CALL_PRESENTATION_UNKNOWN = "UNKNOWN" 434 435# Constant for Network Generation 436GEN_2G = "2G" 437GEN_3G = "3G" 438GEN_4G = "4G" 439GEN_UNKNOWN = "UNKNOWN" 440 441# Constant for Network RAT 442RAT_IWLAN = "IWLAN" 443RAT_LTE = "LTE" 444RAT_4G = "4G" 445RAT_3G = "3G" 446RAT_2G = "2G" 447RAT_WCDMA = "WCDMA" 448RAT_UMTS = "UMTS" 449RAT_1XRTT = "1XRTT" 450RAT_EDGE = "EDGE" 451RAT_GPRS = "GPRS" 452RAT_HSDPA = "HSDPA" 453RAT_HSUPA = "HSUPA" 454RAT_CDMA = "CDMA" 455RAT_EVDO = "EVDO" 456RAT_EVDO_0 = "EVDO_0" 457RAT_EVDO_A = "EVDO_A" 458RAT_EVDO_B = "EVDO_B" 459RAT_IDEN = "IDEN" 460RAT_EHRPD = "EHRPD" 461RAT_HSPA = "HSPA" 462RAT_HSPAP = "HSPAP" 463RAT_GSM = "GSM" 464RAT_TD_SCDMA = "TD_SCDMA" 465RAT_GLOBAL = "GLOBAL" 466RAT_LTE_CA = "LTE_CA" # LTE Carrier Aggregation 467RAT_UNKNOWN = "UNKNOWN" 468 469# Constant for Phone Type 470PHONE_TYPE_GSM = "GSM" 471PHONE_TYPE_NONE = "NONE" 472PHONE_TYPE_CDMA = "CDMA" 473PHONE_TYPE_SIP = "SIP" 474 475# Constant for SIM Power State 476CARD_POWER_DOWN = 0 477CARD_POWER_UP = 1 478CARD_POWER_UP_PASS_THROUGH = 2 479 480# Constant for SIM State 481SIM_STATE_READY = "READY" 482SIM_STATE_UNKNOWN = "UNKNOWN" 483SIM_STATE_ABSENT = "ABSENT" 484SIM_STATE_PUK_REQUIRED = "PUK_REQUIRED" 485SIM_STATE_PIN_REQUIRED = "PIN_REQUIRED" 486SIM_STATE_NETWORK_LOCKED = "NETWORK_LOCKED" 487SIM_STATE_NOT_READY = "NOT_READY" 488SIM_STATE_PERM_DISABLED = "PERM_DISABLED" 489SIM_STATE_CARD_IO_ERROR = "CARD_IO_ERROR" 490SIM_STATE_LOADED = "LOADED" 491 492SINGLE_SIM_CONFIG = "ssss" 493MULTI_SIM_CONFIG = "dsds" 494 495# Constant for Data Connection State 496DATA_STATE_CONNECTED = "CONNECTED" 497DATA_STATE_DISCONNECTED = "DISCONNECTED" 498DATA_STATE_CONNECTING = "CONNECTING" 499DATA_STATE_SUSPENDED = "SUSPENDED" 500DATA_STATE_UNKNOWN = "UNKNOWN" 501 502# Constant for Data Roaming State 503DATA_ROAMING_ENABLE = 1 504DATA_ROAMING_DISABLE = 0 505 506# Constant for ConnectivityManager Data Connection 507TYPE_MOBILE = 0 508TYPE_WIFI = 1 509 510# Constant for Telephony Manager Call State 511TELEPHONY_STATE_RINGING = "RINGING" 512TELEPHONY_STATE_IDLE = "IDLE" 513TELEPHONY_STATE_OFFHOOK = "OFFHOOK" 514TELEPHONY_STATE_UNKNOWN = "UNKNOWN" 515 516# Constant for TTY Mode 517TTY_MODE_FULL = "FULL" 518TTY_MODE_HCO = "HCO" 519TTY_MODE_OFF = "OFF" 520TTY_MODE_VCO = "VCO" 521 522# Constant for Service State 523SERVICE_STATE_EMERGENCY_ONLY = "EMERGENCY_ONLY" 524SERVICE_STATE_IN_SERVICE = "IN_SERVICE" 525SERVICE_STATE_OUT_OF_SERVICE = "OUT_OF_SERVICE" 526SERVICE_STATE_POWER_OFF = "POWER_OFF" 527SERVICE_STATE_UNKNOWN = "UNKNOWN" 528 529# Service State Mapping 530SERVICE_STATE_MAPPING = { 531 "-1": SERVICE_STATE_UNKNOWN, 532 "0": SERVICE_STATE_IN_SERVICE, 533 "1": SERVICE_STATE_OUT_OF_SERVICE, 534 "2": SERVICE_STATE_EMERGENCY_ONLY, 535 "3": SERVICE_STATE_POWER_OFF 536} 537 538# Constant for VoLTE Hand-over Service State 539VOLTE_SERVICE_STATE_HANDOVER_STARTED = "STARTED" 540VOLTE_SERVICE_STATE_HANDOVER_COMPLETED = "COMPLETED" 541VOLTE_SERVICE_STATE_HANDOVER_FAILED = "FAILED" 542VOLTE_SERVICE_STATE_HANDOVER_CANCELED = "CANCELED" 543VOLTE_SERVICE_STATE_HANDOVER_UNKNOWN = "UNKNOWN" 544 545# Constant for precise call state state listen level 546PRECISE_CALL_STATE_LISTEN_LEVEL_FOREGROUND = "FOREGROUND" 547PRECISE_CALL_STATE_LISTEN_LEVEL_RINGING = "RINGING" 548PRECISE_CALL_STATE_LISTEN_LEVEL_BACKGROUND = "BACKGROUND" 549 550# Constants used to register or de-register for call callback events 551EVENT_CALL_STATE_CHANGED = "EVENT_STATE_CHANGED" 552EVENT_CALL_CHILDREN_CHANGED = "EVENT_CHILDREN_CHANGED" 553 554# Constants used to register or de-register for video call callback events 555EVENT_VIDEO_SESSION_MODIFY_REQUEST_RECEIVED = "EVENT_VIDEO_SESSION_MODIFY_REQUEST_RECEIVED" 556EVENT_VIDEO_SESSION_MODIFY_RESPONSE_RECEIVED = "EVENT_VIDEO_SESSION_MODIFY_RESPONSE_RECEIVED" 557EVENT_VIDEO_SESSION_EVENT = "EVENT_VIDEO_SESSION_EVENT" 558EVENT_VIDEO_PEER_DIMENSIONS_CHANGED = "EVENT_VIDEO_PEER_DIMENSIONS_CHANGED" 559EVENT_VIDEO_QUALITY_CHANGED = "EVENT_VIDEO_QUALITY_CHANGED" 560EVENT_VIDEO_DATA_USAGE_CHANGED = "EVENT_VIDEO_DATA_USAGE_CHANGED" 561EVENT_VIDEO_CAMERA_CAPABILITIES_CHANGED = "EVENT_VIDEO_CAMERA_CAPABILITIES_CHANGED" 562EVENT_VIDEO_INVALID = "EVENT_VIDEO_INVALID" 563 564# Constant for Video Call Session Event Name 565SESSION_EVENT_RX_PAUSE = "SESSION_EVENT_RX_PAUSE" 566SESSION_EVENT_RX_RESUME = "SESSION_EVENT_RX_RESUME" 567SESSION_EVENT_TX_START = "SESSION_EVENT_TX_START" 568SESSION_EVENT_TX_STOP = "SESSION_EVENT_TX_STOP" 569SESSION_EVENT_CAMERA_FAILURE = "SESSION_EVENT_CAMERA_FAILURE" 570SESSION_EVENT_CAMERA_READY = "SESSION_EVENT_CAMERA_READY" 571SESSION_EVENT_UNKNOWN = "SESSION_EVENT_UNKNOWN" 572 573NETWORK_MODE_WCDMA_PREF = "NETWORK_MODE_WCDMA_PREF" 574NETWORK_MODE_GSM_ONLY = "NETWORK_MODE_GSM_ONLY" 575NETWORK_MODE_WCDMA_ONLY = "NETWORK_MODE_WCDMA_ONLY" 576NETWORK_MODE_GSM_UMTS = "NETWORK_MODE_GSM_UMTS" 577NETWORK_MODE_CDMA = "NETWORK_MODE_CDMA" 578NETWORK_MODE_CDMA_NO_EVDO = "NETWORK_MODE_CDMA_NO_EVDO" 579NETWORK_MODE_EVDO_NO_CDMA = "NETWORK_MODE_EVDO_NO_CDMA" 580NETWORK_MODE_GLOBAL = "NETWORK_MODE_GLOBAL" 581NETWORK_MODE_LTE_CDMA_EVDO = "NETWORK_MODE_LTE_CDMA_EVDO" 582NETWORK_MODE_LTE_GSM_WCDMA = "NETWORK_MODE_LTE_GSM_WCDMA" 583NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA = "NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA" 584NETWORK_MODE_LTE_ONLY = "NETWORK_MODE_LTE_ONLY" 585NETWORK_MODE_LTE_WCDMA = "NETWORK_MODE_LTE_WCDMA" 586NETWORK_MODE_TDSCDMA_ONLY = "NETWORK_MODE_TDSCDMA_ONLY" 587NETWORK_MODE_TDSCDMA_WCDMA = "NETWORK_MODE_TDSCDMA_WCDMA" 588NETWORK_MODE_LTE_TDSCDMA = "NETWORK_MODE_LTE_TDSCDMA" 589NETWORK_MODE_TDSCDMA_GSM = "NETWORK_MODE_TDSCDMA_GSM" 590NETWORK_MODE_LTE_TDSCDMA_GSM = "NETWORK_MODE_LTE_TDSCDMA_GSM" 591NETWORK_MODE_TDSCDMA_GSM_WCDMA = "NETWORK_MODE_TDSCDMA_GSM_WCDMA" 592NETWORK_MODE_LTE_TDSCDMA_WCDMA = "NETWORK_MODE_LTE_TDSCDMA_WCDMA" 593NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA = "NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA" 594NETWORK_MODE_TDSCDMA_CDMA_EVDO_WCDMA = "NETWORK_MODE_TDSCDMA_CDMA_EVDO_WCDMA" 595NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = "NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA" 596 597# Carrier Config Update 598CARRIER_ID_VERSION = "3" 599WAIT_TIME_FOR_CARRIERID_CHANGE = 6 600CARRIER_ID_METADATA_URL = "am broadcast -a com.google.android.gms." \ 601 "phenotype.FLAG_OVERRIDE --es package 'com.google.android.configupdater'" \ 602 " --es user '\*' --esa flags 'CarrierIdentification__metadata_url' " \ 603 "--esa values 'https://www.gstatic.com/android/config_update/110618-" \ 604 "carrier-id-metadata.txt' --esa types 'string' com.google.android.gms" 605 606CARRIER_ID_CONTENT_URL = "am broadcast -a com.google.android.gms." \ 607 "phenotype.FLAG_OVERRIDE --es package 'com.google.android.configupdater'" \ 608 " --es user '\*' --esa flags 'CarrierIdentification__content_url' " \ 609 "--esa values 'https://www.gstatic.com/android/config_update/110618-" \ 610 "carrier-id.pb' --esa types 'string' com.google.android.gms" 611 612# Constant for Messaging Event Name 613EventSmsDeliverSuccess = "SmsDeliverSuccess" 614EventSmsDeliverFailure = "SmsDeliverFailure" 615EventSmsSentSuccess = "SmsSentSuccess" 616EventSmsSentFailure = "SmsSentFailure" 617EventSmsReceived = "SmsReceived" 618EventMmsSentSuccess = "MmsSentSuccess" 619EventMmsSentFailure = "MmsSentFailure" 620EventMmsDownloaded = "MmsDownloaded" 621EventWapPushReceived = "WapPushReceived" 622EventDataSmsReceived = "DataSmsReceived" 623EventCmasReceived = "CmasReceived" 624EventEtwsReceived = "EtwsReceived" 625 626# Constants for Telecom Call Management Event Name (see InCallService.java). 627EventTelecomCallAdded = "TelecomCallAdded" 628EventTelecomCallRemoved = "TelecomCallRemoved" 629 630# Constant for Telecom Call Event Name (see Call.java) 631EventTelecomCallStateChanged = "TelecomCallStateChanged" 632EventTelecomCallParentChanged = "TelecomCallParentChanged" 633EventTelecomCallChildrenChanged = "TelecomCallChildrenChanged" 634EventTelecomCallDetailsChanged = "TelecomCallDetailsChanged" 635EventTelecomCallCannedTextResponsesLoaded = "TelecomCallCannedTextResponsesLoaded" 636EventTelecomCallPostDialWait = "TelecomCallPostDialWait" 637EventTelecomCallVideoCallChanged = "TelecomCallVideoCallChanged" 638EventTelecomCallDestroyed = "TelecomCallDestroyed" 639EventTelecomCallConferenceableCallsChanged = "TelecomCallConferenceableCallsChanged" 640 641# Constant for Video Call Event Name 642EventTelecomVideoCallSessionModifyRequestReceived = "TelecomVideoCallSessionModifyRequestReceived" 643EventTelecomVideoCallSessionModifyResponseReceived = "TelecomVideoCallSessionModifyResponseReceived" 644EventTelecomVideoCallSessionEvent = "TelecomVideoCallSessionEvent" 645EventTelecomVideoCallPeerDimensionsChanged = "TelecomVideoCallPeerDimensionsChanged" 646EventTelecomVideoCallVideoQualityChanged = "TelecomVideoCallVideoQualityChanged" 647EventTelecomVideoCallDataUsageChanged = "TelecomVideoCallDataUsageChanged" 648EventTelecomVideoCallCameraCapabilities = "TelecomVideoCallCameraCapabilities" 649 650# Constant for Other Event Name 651EventCallStateChanged = "CallStateChanged" 652EventPreciseStateChanged = "PreciseStateChanged" 653EventDataConnectionRealTimeInfoChanged = "DataConnectionRealTimeInfoChanged" 654EventDataConnectionStateChanged = "DataConnectionStateChanged" 655EventServiceStateChanged = "ServiceStateChanged" 656EventSignalStrengthChanged = "SignalStrengthChanged" 657EventVolteServiceStateChanged = "VolteServiceStateChanged" 658EventMessageWaitingIndicatorChanged = "MessageWaitingIndicatorChanged" 659EventConnectivityChanged = "ConnectivityChanged" 660 661# Constant for Packet Keep Alive Call Back 662EventPacketKeepaliveCallback = "PacketKeepaliveCallback" 663PacketKeepaliveCallbackStarted = "Started" 664PacketKeepaliveCallbackStopped = "Stopped" 665PacketKeepaliveCallbackError = "Error" 666PacketKeepaliveCallbackInvalid = "Invalid" 667 668# Constant for Network Call Back 669EventNetworkCallback = "NetworkCallback" 670NetworkCallbackPreCheck = "PreCheck" 671NetworkCallbackAvailable = "Available" 672NetworkCallbackLosing = "Losing" 673NetworkCallbackLost = "Lost" 674NetworkCallbackUnavailable = "Unavailable" 675NetworkCallbackCapabilitiesChanged = "CapabilitiesChanged" 676NetworkCallbackSuspended = "Suspended" 677NetworkCallbackResumed = "Resumed" 678NetworkCallbackLinkPropertiesChanged = "LinkPropertiesChanged" 679NetworkCallbackInvalid = "Invalid" 680 681class SignalStrengthContainer: 682 SIGNAL_STRENGTH_GSM = "gsmSignalStrength" 683 SIGNAL_STRENGTH_GSM_DBM = "gsmDbm" 684 SIGNAL_STRENGTH_GSM_LEVEL = "gsmLevel" 685 SIGNAL_STRENGTH_GSM_ASU_LEVEL = "gsmAsuLevel" 686 SIGNAL_STRENGTH_GSM_BIT_ERROR_RATE = "gsmBitErrorRate" 687 SIGNAL_STRENGTH_CDMA_DBM = "cdmaDbm" 688 SIGNAL_STRENGTH_CDMA_LEVEL = "cdmaLevel" 689 SIGNAL_STRENGTH_CDMA_ASU_LEVEL = "cdmaAsuLevel" 690 SIGNAL_STRENGTH_CDMA_ECIO = "cdmaEcio" 691 SIGNAL_STRENGTH_EVDO_DBM = "evdoDbm" 692 SIGNAL_STRENGTH_EVDO_ECIO = "evdoEcio" 693 SIGNAL_STRENGTH_LTE = "lteSignalStrength" 694 SIGNAL_STRENGTH_LTE_DBM = "lteDbm" 695 SIGNAL_STRENGTH_LTE_LEVEL = "lteLevel" 696 SIGNAL_STRENGTH_LTE_ASU_LEVEL = "lteAsuLevel" 697 SIGNAL_STRENGTH_DBM = "dbm" 698 SIGNAL_STRENGTH_LEVEL = "level" 699 SIGNAL_STRENGTH_ASU_LEVEL = "asuLevel" 700 701 702class MessageWaitingIndicatorContainer: 703 IS_MESSAGE_WAITING = "isMessageWaiting" 704 705 706class CallStateContainer: 707 INCOMING_NUMBER = "incomingNumber" 708 SUBSCRIPTION_ID = "subscriptionId" 709 CALL_STATE = "callState" 710 711 712class PreciseCallStateContainer: 713 TYPE = "type" 714 CAUSE = "cause" 715 SUBSCRIPTION_ID = "subscriptionId" 716 PRECISE_CALL_STATE = "preciseCallState" 717 718 719class DataConnectionRealTimeInfoContainer: 720 TYPE = "type" 721 TIME = "time" 722 SUBSCRIPTION_ID = "subscriptionId" 723 DATA_CONNECTION_POWER_STATE = "dataConnectionPowerState" 724 725 726class DataConnectionStateContainer: 727 TYPE = "type" 728 DATA_NETWORK_TYPE = "dataNetworkType" 729 STATE_CODE = "stateCode" 730 SUBSCRIPTION_ID = "subscriptionId" 731 DATA_CONNECTION_STATE = "dataConnectionState" 732 733 734class ServiceStateContainer: 735 VOICE_REG_STATE = "voiceRegState" 736 VOICE_NETWORK_TYPE = "voiceNetworkType" 737 DATA_REG_STATE = "dataRegState" 738 DATA_NETWORK_TYPE = "dataNetworkType" 739 OPERATOR_NAME = "operatorName" 740 OPERATOR_ID = "operatorId" 741 IS_MANUAL_NW_SELECTION = "isManualNwSelection" 742 ROAMING = "roaming" 743 IS_EMERGENCY_ONLY = "isEmergencyOnly" 744 NETWORK_ID = "networkId" 745 SYSTEM_ID = "systemId" 746 SUBSCRIPTION_ID = "subscriptionId" 747 SERVICE_STATE = "serviceState" 748 749 750class PacketKeepaliveContainer: 751 ID = "id" 752 PACKET_KEEPALIVE_EVENT = "packetKeepaliveEvent" 753 754 755class NetworkCallbackContainer: 756 ID = "id" 757 NETWORK_CALLBACK_EVENT = "networkCallbackEvent" 758 MAX_MS_TO_LIVE = "maxMsToLive" 759 RSSI = "rssi" 760 761 762class CarrierConfigs: 763 NAME_STRING = "carrier_name_string" 764 SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool" 765 VOLTE_AVAILABLE_BOOL = "carrier_volte_available_bool" 766 VOLTE_PROVISIONED_BOOL = "carrier_volte_provisioned_bool" 767 VOLTE_PROVISIONING_REQUIRED_BOOL = "carrier_volte_provisioning_required_bool" 768 VOLTE_OVERRIDE_WFC_BOOL = "carrier_volte_override_wfc_provisioning_bool" 769 VT_AVAILABLE_BOOL = "carrier_vt_available_bool" 770 ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL = "enhanced_4g_lte_on_by_default_bool" 771 WFC_IMS_AVAILABLE_BOOL = "carrier_wfc_ims_available_bool" 772 WFC_SUPPORTS_WIFI_ONLY_BOOL = "carrier_wfc_supports_wifi_only_bool" 773 EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool" 774 EDITABLE_WFC_MODE_BOOL = "editable_wfc_mode_bool" 775 EDITABLE_WFC_ROAMING_MODE_BOOL = "editable_wfc_roaming_mode_bool" 776 DEFAULT_DATA_ROAMING_ENABLED_BOOL = "carrier_default_data_roaming_enabled_bool" 777 DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL = "carrier_default_wfc_ims_roaming_enabled_bool" 778 DEFAULT_WFC_IMS_ENABLED_BOOL = "carrier_default_wfc_ims_enabled_bool" 779 DEFAULT_WFC_IMS_MODE_INT = "carrier_default_wfc_ims_mode_int" 780 DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL = "carrier_default_wfc_ims_roaming_enabled_bool" 781 DEFAULT_WFC_IMS_ROAMING_MODE_INT = "carrier_default_wfc_ims_roaming_mode_int" 782 783 784""" 785End shared constant define for both Python and Java 786""" 787