• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17import enum
18
19###############################################
20# TIMERS
21###############################################
22# Max time to wait for phone data/network connection state update
23MAX_WAIT_TIME_CONNECTION_STATE_UPDATE = 60
24
25# Max time to wait for network reselection
26MAX_WAIT_TIME_NW_SELECTION = 180
27
28# Max time to wait for call drop
29MAX_WAIT_TIME_CALL_DROP = 60
30
31# Wait time between state check retry
32WAIT_TIME_BETWEEN_STATE_CHECK = 5
33
34# Max wait time for state change
35MAX_WAIT_TIME_FOR_STATE_CHANGE = 60
36
37# Max time to wait after caller make a call and before
38# callee start ringing
39MAX_WAIT_TIME_CALLEE_RINGING = 90
40
41# country code list
42COUNTRY_CODE_LIST = [
43    "+1", "+44", "+39", "+61", "+49", "+34", "+33", "+47", "+246", "+86",
44    "+850", "+81", "+886"
45]
46
47# For carriers with specific MMI to set up call forwarding mCallForwarding in
48# TelephonyRegistry cannot reflect current network configuration.
49NOT_CHECK_MCALLFORWARDING_OPERATOR_LIST = [
50    "Far EasTone",
51]
52
53# default pin/password
54DEFAULT_DEVICE_PASSWORD = "1111"
55
56# Wait time after enterring puk code
57WAIT_TIME_SUPPLY_PUK_CODE = 30
58
59# Max time to wait after caller make a call and before
60# callee start ringing
61MAX_WAIT_TIME_ACCEPT_CALL_TO_OFFHOOK_EVENT = 30
62
63# Max time to wait for "onCallStatehangedIdle" event after reject or ignore
64# incoming call
65MAX_WAIT_TIME_CALL_IDLE_EVENT = 60
66
67# Max time to wait after initiating a call for telecom to report in-call
68MAX_WAIT_TIME_CALL_INITIATION = 90
69
70# Time to wait after change Mode Pref for Stress Test
71WAIT_TIME_AFTER_MODE_CHANGE = 60
72
73# Max time to wait for Carrier Config Version to Update in mins
74WAIT_TIME_FOR_CARRIERCONFIG_CHANGE = 20
75
76# Max time to wait for Emergency DB Version to Update in mins
77WAIT_TIME_FOR_ER_DB_CHANGE = 10
78
79# Max time to wait after toggle airplane mode and before
80# get expected event
81MAX_WAIT_TIME_AIRPLANEMODE_EVENT = 90
82
83# Max time to wait after device sent an SMS and before
84# get "onSmsSentSuccess" event
85MAX_WAIT_TIME_SMS_SENT_SUCCESS = 60
86
87# Max time to wait after device sent an SMS and before
88# get "onSmsSentSuccess" event in case of collision.
89MAX_WAIT_TIME_SMS_SENT_SUCCESS_IN_COLLISION = 60
90
91# Max time to wait after MT SMS was sent and before device
92# actually receive this MT SMS.
93MAX_WAIT_TIME_SMS_RECEIVE = 120
94
95# Max time to wait after MT MMS was sent and before device
96# actually receive this MT SMS.
97MAX_WAIT_TIME_MMS_RECEIVE = 300
98
99# Max time to wait after MT SMS was sent and before device
100# actually receive this MT SMS in case of collision.
101MAX_WAIT_TIME_SMS_RECEIVE_IN_COLLISION = 1200
102
103# Max time to wait for IMS registration
104MAX_WAIT_TIME_IMS_REGISTRATION = 120
105
106# TODO: b/26338156 MAX_WAIT_TIME_VOLTE_ENABLED and MAX_WAIT_TIME_WFC_ENABLED should only
107# be used for wait after IMS registration.
108
109# Max time to wait for VoLTE enabled flag to be True
110MAX_WAIT_TIME_VOLTE_ENABLED = MAX_WAIT_TIME_IMS_REGISTRATION + 60
111
112# Max time to wait for WFC enabled flag to be True
113MAX_WAIT_TIME_WFC_ENABLED = MAX_WAIT_TIME_IMS_REGISTRATION + 120
114
115# Max time to wait for WFC enabled flag to be False
116MAX_WAIT_TIME_WFC_DISABLED = 60
117
118# Max time to wait for WiFi Manager to Connect to an AP
119MAX_WAIT_TIME_WIFI_CONNECTION = 30
120
121# Max time to wait for Video Session Modify Messaging
122MAX_WAIT_TIME_VIDEO_SESSION_EVENT = 10
123
124# Max time to wait after a network connection for ConnectivityManager to
125# report a working user plane data connection
126MAX_WAIT_TIME_USER_PLANE_DATA = 20
127
128# Max time to wait for tethering entitlement check
129MAX_WAIT_TIME_TETHERING_ENTITLEMENT_CHECK = 60
130
131# Max time to wait for voice mail count report correct result.
132MAX_WAIT_TIME_VOICE_MAIL_COUNT = 90
133
134# Max time to wait for data SIM change
135MAX_WAIT_TIME_DATA_SUB_CHANGE = 150
136
137# Max time to wait for telecom Ringing status after receive ringing event
138MAX_WAIT_TIME_TELECOM_RINGING = 5
139
140# Max time to wait for phone get provisioned.
141MAX_WAIT_TIME_PROVISIONING = 300
142
143# Time to wait after call setup before declaring
144# that the call is actually successful
145WAIT_TIME_IN_CALL = 30
146
147# Time to wait after call setup before declaring
148# that the call is actually successful
149WAIT_TIME_IN_CALL_LONG = 60
150
151# (For IMS, e.g. VoLTE-VoLTE, WFC-WFC, VoLTE-WFC test only)
152# Time to wait after call setup before declaring
153# that the call is actually successful
154WAIT_TIME_IN_CALL_FOR_IMS = 30
155
156# Default total duration for a long call is 1 hour
157TOTAL_LONG_CALL_DURATION = 1 * 60 * 60
158
159# Time to wait after phone receive incoming call before phone reject this call.
160WAIT_TIME_REJECT_CALL = 2
161
162# Time to leave a voice message after callee reject the incoming call
163WAIT_TIME_LEAVE_VOICE_MAIL = 30
164
165# Time to wait after accept video call and before checking state
166WAIT_TIME_ACCEPT_VIDEO_CALL_TO_CHECK_STATE = 2
167
168# Time delay to ensure user actions are performed in
169# 'human' time rather than at the speed of the script
170WAIT_TIME_ANDROID_STATE_SETTLING = 1
171
172# Time to wait after registration to ensure the phone
173# has sufficient time to reconfigure based on new network
174WAIT_TIME_BETWEEN_REG_AND_CALL = 5
175
176# Wait time for data pdn to be up on CBRS
177WAIT_TIME_FOR_CBRS_DATA_SWITCH = 60
178
179# Time to wait for 1xrtt voice attach check
180# After DUT voice network type report 1xrtt (from unknown), it need to wait for
181# several seconds before the DUT can receive incoming call.
182WAIT_TIME_1XRTT_VOICE_ATTACH = 30
183
184# Time to wait for data status change during wifi tethering,.
185WAIT_TIME_DATA_STATUS_CHANGE_DURING_WIFI_TETHERING = 30
186
187# Time to wait for rssi calibration.
188# This is the delay between <WiFi Connected> and <Turn on Screen to get RSSI>.
189WAIT_TIME_WIFI_RSSI_CALIBRATION_WIFI_CONNECTED = 10
190# This is the delay between <Turn on Screen> and <Call API to get WiFi RSSI>.
191WAIT_TIME_WIFI_RSSI_CALIBRATION_SCREEN_ON = 2
192
193# Time to wait for each operation on voice mail box.
194WAIT_TIME_VOICE_MAIL_SERVER_RESPONSE = 10
195
196# Time to wait for radio to up and running after reboot
197WAIT_TIME_AFTER_REBOOT = 10
198
199# Time to wait for radio to up and running after force crash
200WAIT_TIME_AFTER_CRASH = 60
201
202# Time to wait for factory data reset
203WAIT_TIME_AFTER_FDR = 60
204
205# Time to wait for boot complete after reboot
206WAIT_TIME_FOR_BOOT_COMPLETE = 75
207
208# Time to wait for tethering test after reboot
209WAIT_TIME_TETHERING_AFTER_REBOOT = 10
210
211# Time to wait after changing data sub id
212WAIT_TIME_CHANGE_DATA_SUB_ID = 30
213
214# Time to wait after changing voice sub id
215WAIT_TIME_CHANGE_VOICE_SUB_ID = 5
216
217# Time to wait after changing message sub id
218WAIT_TIME_CHANGE_MESSAGE_SUB_ID = 5
219
220# Wait time for Data Stall to detect
221WAIT_TIME_FOR_DATA_STALL = 300
222
223# Wait time for Network Validation Failed detection
224WAIT_TIME_FOR_NW_VALID_FAIL = 300
225
226# Wait time for Data Stall to recover
227WAIT_TIME_FOR_DATA_STALL_RECOVERY = 360
228
229# Callbox Power level which will cause no service on device
230POWER_LEVEL_OUT_OF_SERVICE = -100
231
232# Callbox Power level which will ensure full service on device
233POWER_LEVEL_FULL_SERVICE = -20
234
235# set a fake time to test time recovering from network
236FAKE_DATE_TIME = "010203042019.05"
237FAKE_YEAR = "2019"
238WAIT_TIME_SYNC_DATE_TIME_FROM_NETWORK = 2
239
240# These are used in phone_number_formatter
241PHONE_NUMBER_STRING_FORMAT_7_DIGIT = 7
242PHONE_NUMBER_STRING_FORMAT_10_DIGIT = 10
243PHONE_NUMBER_STRING_FORMAT_11_DIGIT = 11
244PHONE_NUMBER_STRING_FORMAT_12_DIGIT = 12
245
246# MAX screen-on time during test (in unit of second)
247MAX_SCREEN_ON_TIME = 1800
248
249# In Voice Mail box, press this digit to delete one message.
250VOICEMAIL_DELETE_DIGIT = '7'
251
252# MAX number of saved voice mail in voice mail box.
253MAX_SAVED_VOICE_MAIL = 25
254
255# SIM1 slot index
256SIM1_SLOT_INDEX = 0
257
258# SIM2 slot index
259SIM2_SLOT_INDEX = 1
260
261# invalid Subscription ID
262INVALID_SUB_ID = -1
263
264# invalid port index
265INVALID_PORT_INDEX = -1
266
267# invalid SIM slot index
268INVALID_SIM_SLOT_INDEX = -1
269
270# WiFI RSSI is -127 if WiFi is not connected
271INVALID_WIFI_RSSI = -127
272
273# MAX and MIN value for attenuator settings
274ATTEN_MAX_VALUE = 95
275ATTEN_MIN_VALUE = 0
276
277MAX_RSSI_RESERVED_VALUE = 100
278MIN_RSSI_RESERVED_VALUE = -200
279
280# cellular weak RSSI value
281CELL_WEAK_RSSI_VALUE = -105
282# cellular strong RSSI value
283CELL_STRONG_RSSI_VALUE = -70
284# WiFi weak RSSI value
285WIFI_WEAK_RSSI_VALUE = -63
286
287# Emergency call number
288DEFAULT_EMERGENCY_CALL_NUMBER = "911"
289
290EMERGENCY_CALL_NUMBERS = [
291    "08", "000", "110", "112", "118", "119", "911", "999", "*911", "#911"
292]
293
294AOSP_PREFIX = "aosp_"
295
296INCALL_UI_DISPLAY_FOREGROUND = "foreground"
297INCALL_UI_DISPLAY_BACKGROUND = "background"
298INCALL_UI_DISPLAY_DEFAULT = "default"
299
300NETWORK_CONNECTION_TYPE_WIFI = 'wifi'
301NETWORK_CONNECTION_TYPE_CELL = 'cell'
302NETWORK_CONNECTION_TYPE_MMS = 'mms'
303NETWORK_CONNECTION_TYPE_HIPRI = 'hipri'
304NETWORK_CONNECTION_TYPE_UNKNOWN = 'unknown'
305
306TETHERING_MODE_WIFI = 'wifi'
307
308# Tether interface types defined in ConnectivityManager
309TETHERING_INVALID = -1
310TETHERING_WIFI = 0
311TETHERING_USB = 1
312TETHERING_BLUETOOTH = 2
313
314# Constant for tethering test
315TETHERING_PASSWORD_HAS_ESCAPE = '"DQ=/{Yqq;M=(^_3HzRvhOiL8S%`]w&l<Qp8qH)bs<4E9v_q=HLr^)}w$blA0Kg'
316TETHERING_SPECIAL_SSID_LIST = [
317                " !\"#$%&'()*+,-./0123456789:;<=>?",
318                "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_",
319                "`abcdefghijklmnopqrstuvwxyz{|}~", " a ", "!b!", "#c#", "$d$",
320                "%e%", "&f&", "'g'", "(h(", ")i)", "*j*", "+k+", "-l-", ".m.",
321                "/n/", "_", " !\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}",
322                "\u0644\u062c\u0648\u062c", "\u8c37\u6b4c", "\uad6c\uae00"
323                                                            "\u30b0\u30fc\u30eb",
324                "\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0443\u0439"
325        ]
326TETHERING_SPECIAL_PASSWORD_LIST = [
327                " !\"#$%&'()*+,-./0123456789:;<=>?",
328                "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_",
329                "`abcdefghijklmnopqrstuvwxyz{|}~",
330                " !\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}", "abcdefgh",
331                "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!",
332                " a12345 ", "!b12345!", "#c12345#", "$d12345$", "%e12345%",
333                "&f12345&", "'g12345'", "(h12345(", ")i12345)", "*j12345*",
334                "+k12345+", "-l12345-", ".m12345.", "/n12345/"
335        ]
336
337NETWORK_SERVICE_VOICE = 'voice'
338NETWORK_SERVICE_DATA = 'data'
339
340CARRIER_VZW = 'vzw'
341CARRIER_ATT = 'att'
342CARRIER_TMO = 'tmo'
343CARRIER_SPT = 'spt'
344CARRIER_EEUK = 'eeuk'
345CARRIER_VFUK = 'vfuk'
346CARRIER_UNKNOWN = 'unknown'
347CARRIER_GMBH = 'gmbh'
348CARRIER_ITA = 'ita'
349CARRIER_ESP = 'esp'
350CARRIER_ORG = 'org'
351CARRIER_TEL = 'tel'
352CARRIER_TSA = 'tsa'
353CARRIER_SING = 'singtel'
354CARRIER_USCC = 'uscc'
355CARRIER_ROGERS = 'ROGERS'
356CARRIER_TELUS = 'tls'
357CARRIER_KOODO = 'kdo'
358CARRIER_VIDEOTRON = 'vtrn'
359CARRIER_BELL = 'bell'
360CARRIER_FRE = 'fre'
361CARRIER_FI = 'fi'
362CARRIER_NTT_DOCOMO = 'ntt_docomo'
363CARRIER_KDDI = 'kddi'
364CARRIER_RAKUTEN = 'rakuten'
365CARRIER_SBM = 'sbm'
366CARRIER_SKT = 'skt'
367CARRIER_KT = 'kt'
368CARRIER_LG_UPLUS = 'lg_uplus'
369
370RAT_FAMILY_CDMA = 'cdma'
371RAT_FAMILY_CDMA2000 = 'cdma2000'
372RAT_FAMILY_IDEN = 'iden'
373RAT_FAMILY_GSM = 'gsm'
374RAT_FAMILY_WCDMA = 'wcdma'
375RAT_FAMILY_UMTS = RAT_FAMILY_WCDMA
376RAT_FAMILY_WLAN = 'wlan'
377RAT_FAMILY_LTE = 'lte'
378RAT_FAMILY_NR = 'nr'
379RAT_FAMILY_TDSCDMA = 'tdscdma'
380RAT_FAMILY_UNKNOWN = 'unknown'
381
382CAPABILITY_PHONE = 'phone'
383CAPABILITY_VOLTE = 'volte'
384CAPABILITY_VT = 'vt'
385CAPABILITY_WFC = 'wfc'
386CAPABILITY_MSIM = 'msim'
387CAPABILITY_OMADM = 'omadm'
388CAPABILITY_WFC_MODE_CHANGE = 'wfc_mode_change'
389CAPABILITY_CONFERENCE = 'conference'
390CAPABILITY_VOLTE_PROVISIONING = 'volte_provisioning'
391CAPABILITY_VOLTE_OVERRIDE_WFC_PROVISIONING = 'volte_override_wfc_provisioning'
392CAPABILITY_HIDE_ENHANCED_4G_LTE_BOOL = 'hide_enhanced_4g_lte'
393
394# Carrier Config Versions
395VZW_CARRIER_CONFIG_VERSION = "29999999999.1"
396ATT_CARRIER_CONFIG_VERSION = "28888888888.1"
397
398# Constant for operation direction
399DIRECTION_MOBILE_ORIGINATED = "MO"
400DIRECTION_MOBILE_TERMINATED = "MT"
401
402# Constant for call teardown side
403CALL_TEARDOWN_PHONE = "PHONE"
404CALL_TEARDOWN_REMOTE = "REMOTE"
405
406WIFI_VERBOSE_LOGGING_ENABLED = 1
407WIFI_VERBOSE_LOGGING_DISABLED = 0
408
409# Constant Carrier ID
410GOOGLE_CBRS_CARRIER_ID = 2340
411GOOGLE_FI_CARRIER_ID = 1989
412
413# List of Chipset models
414CHIPSET_MODELS_LIST = ["sdm", "msm", "kon", "lit", "laha", "taro"]
415# SMS over wifi providers
416SMS_OVER_WIFI_PROVIDERS = ("vzw", "tmo", "fi", "rogers", "rjio", "eeuk",
417                           "dtag")
418"""
419Begin shared constant define for both Python and Java
420"""
421
422# Constant for WiFi Calling WFC mode
423WFC_MODE_WIFI_ONLY = "WIFI_ONLY"
424WFC_MODE_CELLULAR_PREFERRED = "CELLULAR_PREFERRED"
425WFC_MODE_WIFI_PREFERRED = "WIFI_PREFERRED"
426WFC_MODE_DISABLED = "DISABLED"
427WFC_MODE_UNKNOWN = "UNKNOWN"
428
429# Constant for Video Telephony VT state
430VT_STATE_AUDIO_ONLY = "AUDIO_ONLY"
431VT_STATE_TX_ENABLED = "TX_ENABLED"
432VT_STATE_RX_ENABLED = "RX_ENABLED"
433VT_STATE_BIDIRECTIONAL = "BIDIRECTIONAL"
434VT_STATE_TX_PAUSED = "TX_PAUSED"
435VT_STATE_RX_PAUSED = "RX_PAUSED"
436VT_STATE_BIDIRECTIONAL_PAUSED = "BIDIRECTIONAL_PAUSED"
437VT_STATE_STATE_INVALID = "INVALID"
438
439# Constant for Video Telephony Video quality
440VT_VIDEO_QUALITY_DEFAULT = "DEFAULT"
441VT_VIDEO_QUALITY_UNKNOWN = "UNKNOWN"
442VT_VIDEO_QUALITY_HIGH = "HIGH"
443VT_VIDEO_QUALITY_MEDIUM = "MEDIUM"
444VT_VIDEO_QUALITY_LOW = "LOW"
445VT_VIDEO_QUALITY_INVALID = "INVALID"
446
447# Constant for Call State (for call object)
448CALL_STATE_ACTIVE = "ACTIVE"
449CALL_STATE_NEW = "NEW"
450CALL_STATE_DIALING = "DIALING"
451CALL_STATE_RINGING = "RINGING"
452CALL_STATE_HOLDING = "HOLDING"
453CALL_STATE_DISCONNECTED = "DISCONNECTED"
454CALL_STATE_PRE_DIAL_WAIT = "PRE_DIAL_WAIT"
455CALL_STATE_CONNECTING = "CONNECTING"
456CALL_STATE_DISCONNECTING = "DISCONNECTING"
457CALL_STATE_UNKNOWN = "UNKNOWN"
458CALL_STATE_INVALID = "INVALID"
459
460# Constant for PRECISE Call State (for call object)
461PRECISE_CALL_STATE_ACTIVE = "ACTIVE"
462PRECISE_CALL_STATE_ALERTING = "ALERTING"
463PRECISE_CALL_STATE_DIALING = "DIALING"
464PRECISE_CALL_STATE_INCOMING = "INCOMING"
465PRECISE_CALL_STATE_HOLDING = "HOLDING"
466PRECISE_CALL_STATE_DISCONNECTED = "DISCONNECTED"
467PRECISE_CALL_STATE_WAITING = "WAITING"
468PRECISE_CALL_STATE_DISCONNECTING = "DISCONNECTING"
469PRECISE_CALL_STATE_IDLE = "IDLE"
470PRECISE_CALL_STATE_UNKNOWN = "UNKNOWN"
471PRECISE_CALL_STATE_INVALID = "INVALID"
472
473# Constant for DC POWER STATE
474DC_POWER_STATE_LOW = "LOW"
475DC_POWER_STATE_HIGH = "HIGH"
476DC_POWER_STATE_MEDIUM = "MEDIUM"
477DC_POWER_STATE_UNKNOWN = "UNKNOWN"
478
479# Constant for Audio Route
480AUDIO_ROUTE_EARPIECE = "EARPIECE"
481AUDIO_ROUTE_BLUETOOTH = "BLUETOOTH"
482AUDIO_ROUTE_SPEAKER = "SPEAKER"
483AUDIO_ROUTE_WIRED_HEADSET = "WIRED_HEADSET"
484AUDIO_ROUTE_WIRED_OR_EARPIECE = "WIRED_OR_EARPIECE"
485
486# Constant for Call Capability
487CALL_CAPABILITY_HOLD = "HOLD"
488CALL_CAPABILITY_SUPPORT_HOLD = "SUPPORT_HOLD"
489CALL_CAPABILITY_MERGE_CONFERENCE = "MERGE_CONFERENCE"
490CALL_CAPABILITY_SWAP_CONFERENCE = "SWAP_CONFERENCE"
491CALL_CAPABILITY_UNUSED_1 = "UNUSED_1"
492CALL_CAPABILITY_RESPOND_VIA_TEXT = "RESPOND_VIA_TEXT"
493CALL_CAPABILITY_MUTE = "MUTE"
494CALL_CAPABILITY_MANAGE_CONFERENCE = "MANAGE_CONFERENCE"
495CALL_CAPABILITY_SUPPORTS_VT_LOCAL_RX = "SUPPORTS_VT_LOCAL_RX"
496CALL_CAPABILITY_SUPPORTS_VT_LOCAL_TX = "SUPPORTS_VT_LOCAL_TX"
497CALL_CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = "SUPPORTS_VT_LOCAL_BIDIRECTIONAL"
498CALL_CAPABILITY_SUPPORTS_VT_REMOTE_RX = "SUPPORTS_VT_REMOTE_RX"
499CALL_CAPABILITY_SUPPORTS_VT_REMOTE_TX = "SUPPORTS_VT_REMOTE_TX"
500CALL_CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL = "SUPPORTS_VT_REMOTE_BIDIRECTIONAL"
501CALL_CAPABILITY_SEPARATE_FROM_CONFERENCE = "SEPARATE_FROM_CONFERENCE"
502CALL_CAPABILITY_DISCONNECT_FROM_CONFERENCE = "DISCONNECT_FROM_CONFERENCE"
503CALL_CAPABILITY_SPEED_UP_MT_AUDIO = "SPEED_UP_MT_AUDIO"
504CALL_CAPABILITY_CAN_UPGRADE_TO_VIDEO = "CAN_UPGRADE_TO_VIDEO"
505CALL_CAPABILITY_CAN_PAUSE_VIDEO = "CAN_PAUSE_VIDEO"
506CALL_CAPABILITY_UNKOWN = "UNKOWN"
507
508# Constant for Call Property
509CALL_PROPERTY_HIGH_DEF_AUDIO = "HIGH_DEF_AUDIO"
510CALL_PROPERTY_CONFERENCE = "CONFERENCE"
511CALL_PROPERTY_GENERIC_CONFERENCE = "GENERIC_CONFERENCE"
512CALL_PROPERTY_WIFI = "WIFI"
513CALL_PROPERTY_EMERGENCY_CALLBACK_MODE = "EMERGENCY_CALLBACK_MODE"
514CALL_PROPERTY_UNKNOWN = "UNKNOWN"
515
516# Constant for Call Presentation
517CALL_PRESENTATION_ALLOWED = "ALLOWED"
518CALL_PRESENTATION_RESTRICTED = "RESTRICTED"
519CALL_PRESENTATION_PAYPHONE = "PAYPHONE"
520CALL_PRESENTATION_UNKNOWN = "UNKNOWN"
521
522# Constant for Network Generation
523GEN_2G = "2G"
524GEN_3G = "3G"
525GEN_4G = "4G"
526GEN_5G = "5G"
527GEN_UNKNOWN = "UNKNOWN"
528
529# Constant for Network RAT
530RAT_IWLAN = "IWLAN"
531RAT_NR = "NR"
532RAT_NR_SA = "NR_SA"
533RAT_LTE = "LTE"
534RAT_5G = "5G"
535RAT_4G = "4G"
536RAT_3G = "3G"
537RAT_2G = "2G"
538RAT_WCDMA = "WCDMA"
539RAT_UMTS = "UMTS"
540RAT_1XRTT = "1XRTT"
541RAT_EDGE = "EDGE"
542RAT_GPRS = "GPRS"
543RAT_HSDPA = "HSDPA"
544RAT_HSUPA = "HSUPA"
545RAT_CDMA = "CDMA"
546RAT_EVDO = "EVDO"
547RAT_EVDO_0 = "EVDO_0"
548RAT_EVDO_A = "EVDO_A"
549RAT_EVDO_B = "EVDO_B"
550RAT_IDEN = "IDEN"
551RAT_EHRPD = "EHRPD"
552RAT_HSPA = "HSPA"
553RAT_HSPAP = "HSPAP"
554RAT_GSM = "GSM"
555RAT_TD_SCDMA = "TD_SCDMA"
556RAT_GLOBAL = "GLOBAL"
557RAT_LTE_CA = "LTE_CA"  # LTE Carrier Aggregation
558RAT_UNKNOWN = "UNKNOWN"
559
560# Constant for Phone Type
561PHONE_TYPE_GSM = "GSM"
562PHONE_TYPE_NONE = "NONE"
563PHONE_TYPE_CDMA = "CDMA"
564PHONE_TYPE_SIP = "SIP"
565
566# Constant for SIM Power State
567CARD_POWER_DOWN = 0
568CARD_POWER_UP = 1
569CARD_POWER_UP_PASS_THROUGH = 2
570
571# Constant for SIM State
572SIM_STATE_READY = "READY"
573SIM_STATE_UNKNOWN = "UNKNOWN"
574SIM_STATE_ABSENT = "ABSENT"
575SIM_STATE_PUK_REQUIRED = "PUK_REQUIRED"
576SIM_STATE_PIN_REQUIRED = "PIN_REQUIRED"
577SIM_STATE_NETWORK_LOCKED = "NETWORK_LOCKED"
578SIM_STATE_NOT_READY = "NOT_READY"
579SIM_STATE_PERM_DISABLED = "PERM_DISABLED"
580SIM_STATE_CARD_IO_ERROR = "CARD_IO_ERROR"
581SIM_STATE_LOADED = "LOADED"
582
583SINGLE_SIM_CONFIG = "ssss"
584MULTI_SIM_CONFIG = "dsds"
585
586# Constant for Data Connection State
587DATA_STATE_CONNECTED = "CONNECTED"
588DATA_STATE_DISCONNECTED = "DISCONNECTED"
589DATA_STATE_CONNECTING = "CONNECTING"
590DATA_STATE_SUSPENDED = "SUSPENDED"
591DATA_STATE_UNKNOWN = "UNKNOWN"
592
593# Constant for Data Roaming State
594DATA_ROAMING_ENABLE = 1
595DATA_ROAMING_DISABLE = 0
596
597# Constant for ConnectivityManager Data Connection
598TYPE_MOBILE = 0
599TYPE_WIFI = 1
600
601# Constant for Telephony Manager Call State
602TELEPHONY_STATE_RINGING = "RINGING"
603TELEPHONY_STATE_IDLE = "IDLE"
604TELEPHONY_STATE_OFFHOOK = "OFFHOOK"
605TELEPHONY_STATE_UNKNOWN = "UNKNOWN"
606
607# Constant for TTY Mode
608TTY_MODE_FULL = "FULL"
609TTY_MODE_HCO = "HCO"
610TTY_MODE_OFF = "OFF"
611TTY_MODE_VCO = "VCO"
612
613# Constant for Service State
614SERVICE_STATE_EMERGENCY_ONLY = "EMERGENCY_ONLY"
615SERVICE_STATE_IN_SERVICE = "IN_SERVICE"
616SERVICE_STATE_OUT_OF_SERVICE = "OUT_OF_SERVICE"
617SERVICE_STATE_POWER_OFF = "POWER_OFF"
618SERVICE_STATE_UNKNOWN = "UNKNOWN"
619
620# Service State Mapping
621SERVICE_STATE_MAPPING = {
622    "-1": SERVICE_STATE_UNKNOWN,
623    "0": SERVICE_STATE_IN_SERVICE,
624    "1": SERVICE_STATE_OUT_OF_SERVICE,
625    "2": SERVICE_STATE_EMERGENCY_ONLY,
626    "3": SERVICE_STATE_POWER_OFF
627}
628
629# Constant for VoLTE Hand-over Service State
630VOLTE_SERVICE_STATE_HANDOVER_STARTED = "STARTED"
631VOLTE_SERVICE_STATE_HANDOVER_COMPLETED = "COMPLETED"
632VOLTE_SERVICE_STATE_HANDOVER_FAILED = "FAILED"
633VOLTE_SERVICE_STATE_HANDOVER_CANCELED = "CANCELED"
634VOLTE_SERVICE_STATE_HANDOVER_UNKNOWN = "UNKNOWN"
635
636# Constant for precise call state state listen level
637PRECISE_CALL_STATE_LISTEN_LEVEL_FOREGROUND = "FOREGROUND"
638PRECISE_CALL_STATE_LISTEN_LEVEL_RINGING = "RINGING"
639PRECISE_CALL_STATE_LISTEN_LEVEL_BACKGROUND = "BACKGROUND"
640
641# Constants used to register or de-register for call callback events
642EVENT_CALL_STATE_CHANGED = "EVENT_STATE_CHANGED"
643EVENT_CALL_CHILDREN_CHANGED = "EVENT_CHILDREN_CHANGED"
644
645# Constants used to register or de-register for video call callback events
646EVENT_VIDEO_SESSION_MODIFY_REQUEST_RECEIVED = "EVENT_VIDEO_SESSION_MODIFY_REQUEST_RECEIVED"
647EVENT_VIDEO_SESSION_MODIFY_RESPONSE_RECEIVED = "EVENT_VIDEO_SESSION_MODIFY_RESPONSE_RECEIVED"
648EVENT_VIDEO_SESSION_EVENT = "EVENT_VIDEO_SESSION_EVENT"
649EVENT_VIDEO_PEER_DIMENSIONS_CHANGED = "EVENT_VIDEO_PEER_DIMENSIONS_CHANGED"
650EVENT_VIDEO_QUALITY_CHANGED = "EVENT_VIDEO_QUALITY_CHANGED"
651EVENT_VIDEO_DATA_USAGE_CHANGED = "EVENT_VIDEO_DATA_USAGE_CHANGED"
652EVENT_VIDEO_CAMERA_CAPABILITIES_CHANGED = "EVENT_VIDEO_CAMERA_CAPABILITIES_CHANGED"
653EVENT_VIDEO_INVALID = "EVENT_VIDEO_INVALID"
654
655# Constant for Video Call Session Event Name
656SESSION_EVENT_RX_PAUSE = "SESSION_EVENT_RX_PAUSE"
657SESSION_EVENT_RX_RESUME = "SESSION_EVENT_RX_RESUME"
658SESSION_EVENT_TX_START = "SESSION_EVENT_TX_START"
659SESSION_EVENT_TX_STOP = "SESSION_EVENT_TX_STOP"
660SESSION_EVENT_CAMERA_FAILURE = "SESSION_EVENT_CAMERA_FAILURE"
661SESSION_EVENT_CAMERA_READY = "SESSION_EVENT_CAMERA_READY"
662SESSION_EVENT_UNKNOWN = "SESSION_EVENT_UNKNOWN"
663
664NETWORK_MODE_WCDMA_PREF = "NETWORK_MODE_WCDMA_PREF"
665NETWORK_MODE_GSM_ONLY = "NETWORK_MODE_GSM_ONLY"
666NETWORK_MODE_WCDMA_ONLY = "NETWORK_MODE_WCDMA_ONLY"
667NETWORK_MODE_GSM_UMTS = "NETWORK_MODE_GSM_UMTS"
668NETWORK_MODE_CDMA = "NETWORK_MODE_CDMA"
669NETWORK_MODE_CDMA_NO_EVDO = "NETWORK_MODE_CDMA_NO_EVDO"
670NETWORK_MODE_EVDO_NO_CDMA = "NETWORK_MODE_EVDO_NO_CDMA"
671NETWORK_MODE_GLOBAL = "NETWORK_MODE_GLOBAL"
672NETWORK_MODE_LTE_CDMA_EVDO = "NETWORK_MODE_LTE_CDMA_EVDO"
673NETWORK_MODE_LTE_GSM_WCDMA = "NETWORK_MODE_LTE_GSM_WCDMA"
674NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA = "NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA"
675NETWORK_MODE_LTE_ONLY = "NETWORK_MODE_LTE_ONLY"
676NETWORK_MODE_LTE_WCDMA = "NETWORK_MODE_LTE_WCDMA"
677NETWORK_MODE_TDSCDMA_ONLY = "NETWORK_MODE_TDSCDMA_ONLY"
678NETWORK_MODE_TDSCDMA_WCDMA = "NETWORK_MODE_TDSCDMA_WCDMA"
679NETWORK_MODE_LTE_TDSCDMA = "NETWORK_MODE_LTE_TDSCDMA"
680NETWORK_MODE_TDSCDMA_GSM = "NETWORK_MODE_TDSCDMA_GSM"
681NETWORK_MODE_LTE_TDSCDMA_GSM = "NETWORK_MODE_LTE_TDSCDMA_GSM"
682NETWORK_MODE_TDSCDMA_GSM_WCDMA = "NETWORK_MODE_TDSCDMA_GSM_WCDMA"
683NETWORK_MODE_LTE_TDSCDMA_WCDMA = "NETWORK_MODE_LTE_TDSCDMA_WCDMA"
684NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA = "NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA"
685NETWORK_MODE_TDSCDMA_CDMA_EVDO_WCDMA = "NETWORK_MODE_TDSCDMA_CDMA_EVDO_WCDMA"
686NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = "NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA"
687NETWORK_MODE_NR_LTE_GSM_WCDMA = "NETWORK_MODE_NR_LTE_GSM_WCDMA"
688NETWORK_MODE_NR_ONLY = "NETWORK_MODE_NR_ONLY"
689NETWORK_MODE_NR_LTE = "NETWORK_MODE_NR_LTE"
690NETWORK_MODE_NR_LTE_CDMA_EVDO = "NETWORK_MODE_NR_LTE_CDMA_EVDO"
691NETWORK_MODE_NR_LTE_CDMA_EVDO_GSM_WCDMA = "NETWORK_MODE_NR_LTE_CDMA_EVDO_GSM_WCDMA"
692NETWORK_MODE_NR_LTE_WCDMA = "NETWORK_MODE_NR_LTE_WCDMA"
693NETWORK_MODE_NR_LTE_TDSCDMA = "NETWORK_MODE_NR_LTE_TDSCDMA"
694NETWORK_MODE_NR_LTE_TDSCDMA_GSM = "NETWORK_MODE_NR_LTE_TDSCDMA_GSM"
695NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA = "NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA"
696NETWORK_MODE_NR_LTE_TDSCDMA_GSM_WCDMA = "NETWORK_MODE_NR_LTE_TDSCDMA_GSM_WCDMA"
697NETWORK_MODE_NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = "NETWORK_MODE_NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA"
698
699# Constants for APP Package Name
700DIALER_PACKAGE_NAME = "com.google.android.dialer"
701MESSAGE_PACKAGE_NAME = "com.google.android.apps.messaging"
702YOUTUBE_PACKAGE_NAME = "com.google.android.youtube"
703SL4A_PACKAGE_NAME = "com.googlecode.android_scripting"
704
705# Constants for CellBroadcast module test
706CARRIER_TEST_CONF_XML_PATH = "/data/user_de/0/com.android.phone/files/"
707MAIN_ACTIVITY = "android.intent.action.MAIN"
708CBR_PACKAGE = "com.google.android.cellbroadcastreceiver"
709CBR_APEX_PACKAGE = "com.google.android.cellbroadcast"
710SYSUI_PACKAGE = "com.android.systemui"
711CBR_ACTIVITY = "com.android.cellbroadcastreceiver.CellBroadcastSettings"
712CBR_TEST_APK = "com.android.cellbroadcastreceiver.tests"
713MCC_MNC = "mccmnc"
714IMSI = "imsi"
715PLMN_ADB_PROPERTY = "gsm.sim.operator.numeric"
716WAIT_TIME_FOR_ALERTS_TO_POPULATE = 60
717WAIT_TIME_FOR_UI = 5
718SCROLL_DOWN = "input swipe 300 900 300 300"
719SLOW_SCROLL_DOWN = "input swipe 300 900 300 100"
720SCROLL_UP = "input swipe 300 500 300 900"
721KEYEVENT_DEL = 'input keyevent KEYCODE_DEL'
722WAIT_TIME_FOR_ALERT_TO_RECEIVE = 15
723DEFAULT_SOUND_TIME = 16
724DEFAULT_VIBRATION_TIME = 10
725NO_VIBRATION_TIME = -1
726NO_SOUND_TIME = -1
727DEFAULT_OFFSET = 1
728EXIT_ALERT_LIST = ["Got it", "OK", "Hide", "TO CLOSE", "Yes"]
729CMD_DND_OFF = "cmd notification set_dnd off"
730CMD_DND_ON = "cmd notification set_dnd on"
731DUMPSYS_VIBRATION = "dumpsys vibrator_manager | grep -i  com.google.android.cellbroadcastreceiver | tail -1"
732DEFAULT_ALERT_TYPE = "popup"
733EXPAND_NOTIFICATION_BAR = "cmd statusbar expand-notifications"
734COLLAPSE_NOTIFICATION_BAR = "cmd statusbar collapse"
735CLEAR_NOTIFICATION_BAR = "service call notification 1"
736
737# Countries/Carriers for Compliance Testing
738AUSTRALIA = "australia"
739BRAZIL = "brazil"
740CANADA = "canada"
741CHILE_ENTEL = "chile_entel"
742CHILE_TELEFONICA = "chile_telefonica"
743COLUMBIA = "columbia"
744ECUADOR_TELEFONICA = "ecuador_telefonica"
745ECUADOR_CLARO = "ecuador_claro"
746ELSALVADOR_TELEFONICA = "elsalvador_telefonica"
747ESTONIA = "estonia"
748FRANCE = "france"
749GREECE = "greece"
750GERMANY_TELEKOM = "germany_telekom"
751QATAR_VODAFONE = "qatar_vodafone"
752HONGKONG = "hongkong"
753ISRAEL = "israel"
754ITALY = "italy"
755JAPAN_KDDI = "japan_kddi"
756JAPAN_SOFTBANK = "japan_softbank"
757KOREA = "korea"
758LATVIA = "latvia"
759LITHUANIA = "lithuania"
760MEXICO_TELEFONICA = "mexico_telefonica"
761NETHERLANDS = "netherlands"
762NEWZEALAND = "newzealand"
763OMAN = "oman"
764PERU_ENTEL = "peru_entel"
765PERU_TELEFONICA = "peru_telefonica"
766SPAIN_TELEFONICA = "spain_telefonica"
767PUERTORICO = "puertorico"
768ROMANIA = "romania"
769SAUDIARABIA = "saudiarabia"
770SOUTHAFRICA = "southafrica"
771TAIWAN = "taiwan"
772UAE = "uae"
773UK = "uk"
774US_ATT = "us_att"
775US_TMO = "us_tmo"
776US_VZW = "us_vzw"
777MEXICO = "mexico"
778BAHAMAS = "bahamas"
779UK_EE = "uk_ee"
780COLUMBIA_TELEFONICA = "columbia_telefonica"
781JAPAN_EMOBILE = "japan_emobile"
782JAPAN_WIRELESSCITYPLANNING ="japan_wirelesscityplanning"
783JAPAN_DOCOMO = "japan_docomo"
784JAPAN_RAKUTEN = "japan_rakuten"
785KOREA_SKT = "korea_skt"
786KOREA_LGU = "korea_lgu"
787VENEZUELA = "venezuela"
788RUSSIA = "russia"
789RUSSIA_MEGAFON = "russia_megafon"
790TURKEY = "turkey"
791US = "us"
792US_SPRINT = "us_sprint"
793US_USC = "us_usc"
794AZERBAIJAN = "azerbaijan"
795CHINA = "china"
796SOUTHAFRICA_TELKOM = 'southafrica_telkom'
797GUATEMALA_TELEFONICA = "guatemala_telefonica"
798INDIA = "india"
799HUNGARY_TELEKOM = "hungary_telekom"
800CROATIA_HRVATSKI = "croatia_hrvatski"
801CZECH_TMOBILE = "czech_tmobile"
802SLOVAKIA_TELEKOM = "slovakia_telekom"
803AUSTRIA_MAGENTA = "austria_magenta"
804POLAND_TMOBILE = "poland_tmobile"
805AUSTRIA_TMOBILE = "austria_tmobile"
806MACEDONIA_TELEKOM = "macedonia_telekom"
807MONTENEGRO_TELEKOM = "montenegro_telekom"
808UKRAINE = "ukraine"
809NORWAY = "norway"
810BULGARIA = "bulgaria"
811# Carrier Config Update
812CARRIER_ID_VERSION = "3"
813ER_DB_ID_VERSION = "99999"
814
815CARRIER_ID_VERSION_P = "5"
816WAIT_TIME_FOR_CARRIERID_CHANGE = 6
817CARRIER_ID_METADATA_URL = "am broadcast -a com.google.android.gms." \
818     "phenotype.FLAG_OVERRIDE --es package 'com.google.android.configupdater'" \
819     " --es user '\*' --esa flags 'CarrierIdentification__metadata_url' " \
820     "--esa values 'https://www.gstatic.com/android/config_update/110618-" \
821     "carrier-id-metadata.txt' --esa types 'string' com.google.android.gms"
822
823CARRIER_ID_METADATA_URL_P = "am broadcast -a com.google.android.gms." \
824     "phenotype.FLAG_OVERRIDE --es package 'com.google.android.configupdater'" \
825     " --es user '\*' --esa flags 'CarrierIdentification__metadata_url' " \
826     "--esa values 'https://www.gstatic.com/android/telephony/carrierid/" \
827     "030419-p-carrier-id-metadata.txt' --esa types 'string' com.google.android.gms"
828
829CARRIER_ID_CONTENT_URL = "am broadcast -a com.google.android.gms." \
830     "phenotype.FLAG_OVERRIDE --es package 'com.google.android.configupdater'" \
831     " --es user '\*' --esa flags 'CarrierIdentification__content_url' " \
832     "--esa values 'https://www.gstatic.com/android/config_update/110618-" \
833     "carrier-id.pb' --esa types 'string' com.google.android.gms"
834
835CARRIER_ID_CONTENT_URL_P = "am broadcast -a com.google.android.gms." \
836     "phenotype.FLAG_OVERRIDE --es package 'com.google.android.configupdater'" \
837     " --es user '\*' --esa flags 'CarrierIdentification__content_url' " \
838     "--esa values 'https://www.gstatic.com/android/telephony/carrierid/" \
839     "030419-p-carrier-id.pb' --esa types 'string' com.google.android.gms"
840
841# Constant for Messaging Event Name
842EventSmsDeliverSuccess = "SmsDeliverSuccess"
843EventSmsDeliverFailure = "SmsDeliverFailure"
844EventSmsSentSuccess = "SmsSentSuccess"
845EventSmsSentFailure = "SmsSentFailure"
846EventSmsReceived = "SmsReceived"
847EventMmsSentSuccess = "MmsSentSuccess"
848EventMmsSentFailure = "MmsSentFailure"
849EventMmsDownloaded = "MmsDownloaded"
850EventWapPushReceived = "WapPushReceived"
851EventDataSmsReceived = "DataSmsReceived"
852EventCmasReceived = "CmasReceived"
853EventEtwsReceived = "EtwsReceived"
854
855# Constants for Telecom Call Management Event Name (see InCallService.java).
856EventTelecomCallAdded = "TelecomCallAdded"
857EventTelecomCallRemoved = "TelecomCallRemoved"
858
859# Constant for Telecom Call Event Name (see Call.java)
860EventTelecomCallStateChanged = "TelecomCallStateChanged"
861EventTelecomCallParentChanged = "TelecomCallParentChanged"
862EventTelecomCallChildrenChanged = "TelecomCallChildrenChanged"
863EventTelecomCallDetailsChanged = "TelecomCallDetailsChanged"
864EventTelecomCallCannedTextResponsesLoaded = "TelecomCallCannedTextResponsesLoaded"
865EventTelecomCallPostDialWait = "TelecomCallPostDialWait"
866EventTelecomCallVideoCallChanged = "TelecomCallVideoCallChanged"
867EventTelecomCallDestroyed = "TelecomCallDestroyed"
868EventTelecomCallConferenceableCallsChanged = "TelecomCallConferenceableCallsChanged"
869
870# Constant for Video Call Event Name
871EventTelecomVideoCallSessionModifyRequestReceived = "TelecomVideoCallSessionModifyRequestReceived"
872EventTelecomVideoCallSessionModifyResponseReceived = "TelecomVideoCallSessionModifyResponseReceived"
873EventTelecomVideoCallSessionEvent = "TelecomVideoCallSessionEvent"
874EventTelecomVideoCallPeerDimensionsChanged = "TelecomVideoCallPeerDimensionsChanged"
875EventTelecomVideoCallVideoQualityChanged = "TelecomVideoCallVideoQualityChanged"
876EventTelecomVideoCallDataUsageChanged = "TelecomVideoCallDataUsageChanged"
877EventTelecomVideoCallCameraCapabilities = "TelecomVideoCallCameraCapabilities"
878
879# Constant for Other Event Name
880EventCallStateChanged = "CallStateChanged"
881EventPreciseStateChanged = "PreciseStateChanged"
882EventDataConnectionRealTimeInfoChanged = "DataConnectionRealTimeInfoChanged"
883EventDataConnectionStateChanged = "DataConnectionStateChanged"
884EventServiceStateChanged = "ServiceStateChanged"
885EventSignalStrengthChanged = "SignalStrengthChanged"
886EventVolteServiceStateChanged = "VolteServiceStateChanged"
887EventMessageWaitingIndicatorChanged = "MessageWaitingIndicatorChanged"
888EventConnectivityChanged = "ConnectivityChanged"
889EventActiveDataSubIdChanged = "ActiveDataSubIdChanged"
890EventDisplayInfoChanged = "DisplayInfoChanged"
891
892# Constant for Packet Keep Alive Call Back
893EventPacketKeepaliveCallback = "PacketKeepaliveCallback"
894PacketKeepaliveCallbackStarted = "Started"
895PacketKeepaliveCallbackStopped = "Stopped"
896PacketKeepaliveCallbackError = "Error"
897PacketKeepaliveCallbackInvalid = "Invalid"
898
899# Constant for Network Call Back
900EventNetworkCallback = "NetworkCallback"
901NetworkCallbackPreCheck = "PreCheck"
902NetworkCallbackAvailable = "Available"
903NetworkCallbackLosing = "Losing"
904NetworkCallbackLost = "Lost"
905NetworkCallbackUnavailable = "Unavailable"
906NetworkCallbackCapabilitiesChanged = "CapabilitiesChanged"
907NetworkCallbackSuspended = "Suspended"
908NetworkCallbackResumed = "Resumed"
909NetworkCallbackLinkPropertiesChanged = "LinkPropertiesChanged"
910NetworkCallbackInvalid = "Invalid"
911
912# Constant for Settings
913USE_SIM = 'Use SIM'
914MOBILE_DATA = 'Mobile data'
915
916class SignalStrengthContainer:
917    SIGNAL_STRENGTH_GSM = "gsmSignalStrength"
918    SIGNAL_STRENGTH_GSM_DBM = "gsmDbm"
919    SIGNAL_STRENGTH_GSM_LEVEL = "gsmLevel"
920    SIGNAL_STRENGTH_GSM_ASU_LEVEL = "gsmAsuLevel"
921    SIGNAL_STRENGTH_GSM_BIT_ERROR_RATE = "gsmBitErrorRate"
922    SIGNAL_STRENGTH_CDMA_DBM = "cdmaDbm"
923    SIGNAL_STRENGTH_CDMA_LEVEL = "cdmaLevel"
924    SIGNAL_STRENGTH_CDMA_ASU_LEVEL = "cdmaAsuLevel"
925    SIGNAL_STRENGTH_CDMA_ECIO = "cdmaEcio"
926    SIGNAL_STRENGTH_EVDO_DBM = "evdoDbm"
927    SIGNAL_STRENGTH_EVDO_ECIO = "evdoEcio"
928    SIGNAL_STRENGTH_LTE = "lteSignalStrength"
929    SIGNAL_STRENGTH_LTE_DBM = "lteDbm"
930    SIGNAL_STRENGTH_LTE_LEVEL = "lteLevel"
931    SIGNAL_STRENGTH_LTE_ASU_LEVEL = "lteAsuLevel"
932    SIGNAL_STRENGTH_DBM = "dbm"
933    SIGNAL_STRENGTH_LEVEL = "level"
934    SIGNAL_STRENGTH_ASU_LEVEL = "asuLevel"
935
936
937class MessageWaitingIndicatorContainer:
938    IS_MESSAGE_WAITING = "isMessageWaiting"
939
940
941class CallStateContainer:
942    INCOMING_NUMBER = "incomingNumber"
943    SUBSCRIPTION_ID = "subscriptionId"
944    CALL_STATE = "callState"
945
946class DisplayInfoContainer:
947    TIME = "time"
948    NETWORK = "network"
949    OVERRIDE = "override"
950    SUBSCRIPTION_ID = "subscriptionId"
951
952class OverrideNetworkContainer:
953    OVERRIDE_NETWORK_TYPE_NONE = "NONE"
954    OVERRIDE_NETWORK_TYPE_LTE_CA = "LTE_CA"
955    OVERRIDE_NETWORK_TYPE_LTE_ADVANCED_PRO = "LTE_ADVANCED_PRO"
956    OVERRIDE_NETWORK_TYPE_NR_NSA = "NR_NSA"
957    OVERRIDE_NETWORK_TYPE_NR_MMWAVE = "NR_MMWAVE"
958
959class PreciseCallStateContainer:
960    TYPE = "type"
961    CAUSE = "cause"
962    SUBSCRIPTION_ID = "subscriptionId"
963    PRECISE_CALL_STATE = "preciseCallState"
964
965
966class DataConnectionRealTimeInfoContainer:
967    TYPE = "type"
968    TIME = "time"
969    SUBSCRIPTION_ID = "subscriptionId"
970    DATA_CONNECTION_POWER_STATE = "dataConnectionPowerState"
971
972
973class DataConnectionStateContainer:
974    TYPE = "type"
975    DATA_NETWORK_TYPE = "dataNetworkType"
976    STATE_CODE = "stateCode"
977    SUBSCRIPTION_ID = "subscriptionId"
978    DATA_CONNECTION_STATE = "dataConnectionState"
979
980
981class ServiceStateContainer:
982    VOICE_REG_STATE = "voiceRegState"
983    VOICE_NETWORK_TYPE = "voiceNetworkType"
984    DATA_REG_STATE = "dataRegState"
985    DATA_NETWORK_TYPE = "dataNetworkType"
986    OPERATOR_NAME = "operatorName"
987    OPERATOR_ID = "operatorId"
988    IS_MANUAL_NW_SELECTION = "isManualNwSelection"
989    ROAMING = "roaming"
990    IS_EMERGENCY_ONLY = "isEmergencyOnly"
991    NETWORK_ID = "networkId"
992    SYSTEM_ID = "systemId"
993    SUBSCRIPTION_ID = "subscriptionId"
994    SERVICE_STATE = "serviceState"
995
996
997class PacketKeepaliveContainer:
998    ID = "id"
999    PACKET_KEEPALIVE_EVENT = "packetKeepaliveEvent"
1000
1001
1002class NetworkCallbackContainer:
1003    ID = "id"
1004    NETWORK_CALLBACK_EVENT = "networkCallbackEvent"
1005    MAX_MS_TO_LIVE = "maxMsToLive"
1006    RSSI = "rssi"
1007
1008
1009class CarrierConfigs:
1010    NAME_STRING = "carrier_name_string"
1011    SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool"
1012    VOLTE_AVAILABLE_BOOL = "carrier_volte_available_bool"
1013    VOLTE_PROVISIONED_BOOL = "carrier_volte_provisioned_bool"
1014    VOLTE_PROVISIONING_REQUIRED_BOOL = "carrier_volte_provisioning_required_bool"
1015    VOLTE_OVERRIDE_WFC_BOOL = "carrier_volte_override_wfc_provisioning_bool"
1016    VT_AVAILABLE_BOOL = "carrier_vt_available_bool"
1017    ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL = "enhanced_4g_lte_on_by_default_bool"
1018    HIDE_ENHANCED_4G_LTE_BOOL = "hide_enhanced_4g_lte_bool"
1019    WFC_IMS_AVAILABLE_BOOL = "carrier_wfc_ims_available_bool"
1020    WFC_SUPPORTS_WIFI_ONLY_BOOL = "carrier_wfc_supports_wifi_only_bool"
1021    EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool"
1022    EDITABLE_WFC_MODE_BOOL = "editable_wfc_mode_bool"
1023    EDITABLE_WFC_ROAMING_MODE_BOOL = "editable_wfc_roaming_mode_bool"
1024    DEFAULT_DATA_ROAMING_ENABLED_BOOL = "carrier_default_data_roaming_enabled_bool"
1025    DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL = "carrier_default_wfc_ims_roaming_enabled_bool"
1026    DEFAULT_WFC_IMS_ENABLED_BOOL = "carrier_default_wfc_ims_enabled_bool"
1027    DEFAULT_WFC_IMS_MODE_INT = "carrier_default_wfc_ims_mode_int"
1028    DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL = "carrier_default_wfc_ims_roaming_enabled_bool"
1029    DEFAULT_WFC_IMS_ROAMING_MODE_INT = "carrier_default_wfc_ims_roaming_mode_int"
1030
1031
1032class SimSlotInfo(enum.Enum):
1033    """Mapping table of SIM_SLOT.
1034
1035    [SIM_SLOT_ID, PORT_ID, PHYSICAL_SLOT_ID]
1036    """
1037    SLOT_0 = [0, 0, 1]
1038    SLOT_1 = [1, 0, 0]
1039    SLOT_2 = [2, 1, 0]
1040
1041
1042"""
1043End shared constant define for both Python and Java
1044"""
1045