1#!/usr/bin/env python3 2# 3# Copyright 2020 - 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 re 18import time 19 20from acts import asserts 21from acts import signals 22from acts.test_decorators import test_tracker_info 23from acts_contrib.test_utils.tel.loggers.protos.telephony_metric_pb2 import \ 24 TelephonyVoiceTestResult 25from acts_contrib.test_utils.tel.loggers.telephony_metric_logger import \ 26 TelephonyMetricLogger 27from acts_contrib.test_utils.tel.TelephonyBaseTest import TelephonyBaseTest 28from acts_contrib.test_utils.tel.tel_defines import CALL_CAPABILITY_MANAGE_CONFERENCE 29from acts_contrib.test_utils.tel.tel_defines import CALL_PROPERTY_CONFERENCE 30from acts_contrib.test_utils.tel.tel_defines import CALL_STATE_ACTIVE 31from acts_contrib.test_utils.tel.tel_defines import CAPABILITY_CONFERENCE 32from acts_contrib.test_utils.tel.tel_defines import WAIT_TIME_IN_CALL 33from acts_contrib.test_utils.tel.tel_defines import INVALID_SUB_ID 34from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_CELLULAR_PREFERRED 35from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_WIFI_PREFERRED 36from acts_contrib.test_utils.tel.tel_subscription_utils import \ 37 get_incoming_voice_sub_id 38from acts_contrib.test_utils.tel.tel_subscription_utils import \ 39 get_outgoing_voice_sub_id 40from acts_contrib.test_utils.tel.tel_subscription_utils import get_subid_from_slot_index 41from acts_contrib.test_utils.tel.tel_subscription_utils import set_voice_sub_id 42from acts_contrib.test_utils.tel.tel_subscription_utils import set_dds_on_slot_0 43from acts_contrib.test_utils.tel.tel_subscription_utils import set_dds_on_slot_1 44from acts_contrib.test_utils.tel.tel_subscription_utils import \ 45 get_subid_on_same_network_of_host_ad 46from acts_contrib.test_utils.tel.tel_test_utils import call_setup_teardown 47from acts_contrib.test_utils.tel.tel_test_utils import hangup_call 48from acts_contrib.test_utils.tel.tel_test_utils import ensure_wifi_connected 49from acts_contrib.test_utils.tel.tel_test_utils import multithread_func 50from acts_contrib.test_utils.tel.tel_test_utils import num_active_calls 51from acts_contrib.test_utils.tel.tel_test_utils import verify_incall_state 52from acts_contrib.test_utils.tel.tel_test_utils import toggle_volte_for_subscription 53from acts_contrib.test_utils.tel.tel_test_utils import toggle_wfc_for_subscription 54from acts_contrib.test_utils.tel.tel_test_utils import set_wfc_mode_for_subscription 55from acts_contrib.test_utils.tel.tel_test_utils import get_capability_for_subscription 56from acts_contrib.test_utils.tel.tel_test_utils import verify_http_connection 57from acts_contrib.test_utils.tel.tel_test_utils import ensure_phones_idle 58from acts_contrib.test_utils.tel.tel_test_utils import set_call_forwarding_by_mmi 59from acts_contrib.test_utils.tel.tel_test_utils import erase_call_forwarding_by_mmi 60from acts_contrib.test_utils.tel.tel_test_utils import toggle_airplane_mode 61from acts_contrib.test_utils.tel.tel_test_utils import set_call_waiting 62from acts_contrib.test_utils.tel.tel_test_utils import initiate_call 63from acts_contrib.test_utils.tel.tel_test_utils import \ 64 wait_and_reject_call_for_subscription 65from acts_contrib.test_utils.tel.tel_test_utils import get_operator_name 66from acts_contrib.test_utils.tel.tel_voice_utils import get_cep_conference_call_id 67from acts_contrib.test_utils.tel.tel_voice_utils import is_phone_in_call_3g 68from acts_contrib.test_utils.tel.tel_voice_utils import is_phone_in_call_csfb 69from acts_contrib.test_utils.tel.tel_voice_utils import is_phone_in_call_volte 70from acts_contrib.test_utils.tel.tel_voice_utils import is_phone_in_call_iwlan 71from acts_contrib.test_utils.tel.tel_voice_utils import phone_setup_iwlan_for_subscription 72from acts_contrib.test_utils.tel.tel_voice_utils import phone_setup_csfb 73from acts_contrib.test_utils.tel.tel_voice_utils import \ 74 phone_setup_csfb_for_subscription 75from acts_contrib.test_utils.tel.tel_voice_utils import phone_setup_voice_3g 76from acts_contrib.test_utils.tel.tel_voice_utils import \ 77 phone_setup_voice_3g_for_subscription 78from acts_contrib.test_utils.tel.tel_voice_utils import phone_setup_voice_general 79from acts_contrib.test_utils.tel.tel_voice_utils import \ 80 phone_setup_voice_general_for_subscription 81from acts_contrib.test_utils.tel.tel_voice_utils import phone_setup_volte 82from acts_contrib.test_utils.tel.tel_voice_utils import \ 83 phone_setup_volte_for_subscription 84from acts_contrib.test_utils.tel.tel_voice_utils import \ 85 three_phone_call_forwarding_short_seq 86from acts_contrib.test_utils.tel.tel_voice_utils import \ 87 three_phone_call_waiting_short_seq 88from acts_contrib.test_utils.tel.tel_voice_utils import swap_calls 89from acts_contrib.test_utils.tel.tel_voice_utils import phone_setup_on_rat 90from acts_contrib.test_utils.tel.tel_voice_utils import is_phone_in_call_on_rat 91 92CallResult = TelephonyVoiceTestResult.CallResult.Value 93 94class TelLiveGFTDSDSWfcSupplementaryServiceTest(TelephonyBaseTest): 95 def setup_class(self): 96 TelephonyBaseTest.setup_class(self) 97 self.message_lengths = (50, 160, 180) 98 self.tel_logger = TelephonyMetricLogger.for_test_case() 99 toggle_airplane_mode(self.log, self.android_devices[0], False) 100 self.erase_call_forwarding(self.log, self.android_devices[0]) 101 if not get_capability_for_subscription( 102 self.android_devices[0], 103 CAPABILITY_CONFERENCE, 104 get_outgoing_voice_sub_id(self.android_devices[0])): 105 self.android_devices[0].log.error( 106 "Conference call is not supported, abort test.") 107 raise signals.TestAbortClass( 108 "Conference call is not supported, abort test.") 109 110 def teardown_test(self): 111 toggle_airplane_mode(self.log, self.android_devices[0], False) 112 ensure_phones_idle(self.log, self.android_devices) 113 self.erase_call_forwarding(self.log, self.android_devices[0]) 114 115 116 def _hangup_call(self, ad, device_description='Device'): 117 if not hangup_call(self.log, ad): 118 ad.log.error("Failed to hang up on %s", device_description) 119 return False 120 return True 121 122 def erase_call_forwarding(self, log, ad): 123 slot0_sub_id = get_subid_from_slot_index(log, ad, 0) 124 slot1_sub_id = get_subid_from_slot_index(log, ad, 1) 125 current_voice_sub_id = get_incoming_voice_sub_id(ad) 126 for sub_id in (slot0_sub_id, slot1_sub_id): 127 set_voice_sub_id(ad, sub_id) 128 get_operator_name(log, ad, sub_id) 129 erase_call_forwarding_by_mmi(log, ad) 130 set_voice_sub_id(ad, current_voice_sub_id) 131 132 def _three_phone_call_mo_add_mt( 133 self, 134 ads, 135 phone_setups, 136 verify_funcs, 137 reject_once=False): 138 """Use 3 phones to make MO call and MT call. 139 140 Call from PhoneA to PhoneB, accept on PhoneB. 141 Call from PhoneC to PhoneA, accept on PhoneA. 142 143 Args: 144 ads: list of ad object. 145 The list should have three objects. 146 phone_setups: list of phone setup functions. 147 The list should have three objects. 148 verify_funcs: list of phone call verify functions. 149 The list should have three objects. 150 151 Returns: 152 If success, return 'call_AB' id in PhoneA. 153 if fail, return None. 154 """ 155 156 class _CallException(Exception): 157 pass 158 159 try: 160 verify_func_a, verify_func_b, verify_func_c = verify_funcs 161 tasks = [] 162 for ad, setup_func in zip(ads, phone_setups): 163 if setup_func is not None: 164 tasks.append((setup_func, (self.log, ad))) 165 if tasks != [] and not multithread_func(self.log, tasks): 166 self.log.error("Phone Failed to Set Up Properly.") 167 raise _CallException("Setup failed.") 168 for ad in ads: 169 ad.droid.telecomCallClearCallList() 170 if num_active_calls(self.log, ad) != 0: 171 ad.log.error("Phone Call List is not empty.") 172 raise _CallException("Clear call list failed.") 173 174 self.log.info("Step1: Call From PhoneA to PhoneB.") 175 if not call_setup_teardown( 176 self.log, 177 ads[0], 178 ads[1], 179 ad_hangup=None, 180 verify_caller_func=verify_func_a, 181 verify_callee_func=verify_func_b): 182 raise _CallException("PhoneA call PhoneB failed.") 183 184 calls = ads[0].droid.telecomCallGetCallIds() 185 ads[0].log.info("Calls in PhoneA %s", calls) 186 if num_active_calls(self.log, ads[0]) != 1: 187 raise _CallException("Call list verify failed.") 188 call_ab_id = calls[0] 189 190 self.log.info("Step2: Call From PhoneC to PhoneA.") 191 if reject_once: 192 self.log.info("Step2-1: Reject incoming call once.") 193 if not initiate_call( 194 self.log, 195 ads[2], 196 ads[0].telephony['subscription'][get_incoming_voice_sub_id( 197 ads[0])]['phone_num']): 198 ads[2].log.error("Initiate call failed.") 199 raise _CallException("Failed to initiate call.") 200 201 if not wait_and_reject_call_for_subscription( 202 self.log, 203 ads[0], 204 get_incoming_voice_sub_id(ads[0]), 205 incoming_number= \ 206 ads[2].telephony['subscription'][ 207 get_incoming_voice_sub_id( 208 ads[2])]['phone_num']): 209 ads[0].log.error("Reject call fail.") 210 raise _CallException("Failed to reject call.") 211 212 self._hangup_call(ads[2], "PhoneC") 213 time.sleep(15) 214 215 if not call_setup_teardown( 216 self.log, 217 ads[2], 218 ads[0], 219 ad_hangup=None, 220 verify_caller_func=verify_func_c, 221 verify_callee_func=verify_func_a): 222 raise _CallException("PhoneA call PhoneC failed.") 223 if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], 224 True): 225 raise _CallException("Not All phones are in-call.") 226 227 except Exception as e: 228 self.log.error(e) 229 setattr(ads[0], "exception", e) 230 return None 231 232 return call_ab_id 233 234 def _test_ims_conference_merge_drop_second_call_from_participant( 235 self, call_ab_id, call_ac_id): 236 """Test conference merge and drop in IMS (VoLTE or WiFi Calling) call. 237 (supporting both cases of CEP enabled and disabled). 238 239 PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneB. 240 PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneC. 241 Merge calls to conference on PhoneA. 242 Hangup on PhoneC, check call continues between AB. 243 Hangup on PhoneB, check A ends. 244 245 Args: 246 call_ab_id: call id for call_AB on PhoneA. 247 call_ac_id: call id for call_AC on PhoneA. 248 249 Returns: 250 True if succeed; 251 False if failed. 252 """ 253 ads = self.android_devices 254 255 call_conf_id = self._merge_ims_conference_call(call_ab_id, call_ac_id) 256 if call_conf_id is None: 257 return False 258 259 self.log.info("Step5: End call on PhoneC and verify call continues.") 260 if not self._hangup_call(ads[2], "PhoneC"): 261 return False 262 time.sleep(WAIT_TIME_IN_CALL) 263 calls = ads[0].droid.telecomCallGetCallIds() 264 ads[0].log.info("Calls in PhoneA %s", calls) 265 if not verify_incall_state(self.log, [ads[0], ads[1]], True): 266 return False 267 if not verify_incall_state(self.log, [ads[2]], False): 268 return False 269 270 self.log.info("Step6: End call on PhoneB and verify PhoneA end.") 271 if not self._hangup_call(ads[1], "PhoneB"): 272 return False 273 time.sleep(WAIT_TIME_IN_CALL) 274 if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False): 275 return False 276 return True 277 278 279 def _merge_ims_conference_call(self, call_ab_id, call_ac_id): 280 """Merge IMS conference call for both cases of CEP enabled and disabled. 281 282 PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneB. 283 PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneC. 284 Merge calls to conference on PhoneA. 285 286 Args: 287 call_ab_id: call id for call_AB on PhoneA. 288 call_ac_id: call id for call_AC on PhoneA. 289 290 Returns: 291 call_id for conference 292 """ 293 ads = self.android_devices 294 self.log.info("Step4: Merge to Conf Call and verify Conf Call.") 295 ads[0].droid.telecomCallJoinCallsInConf(call_ab_id, call_ac_id) 296 time.sleep(WAIT_TIME_IN_CALL) 297 calls = ads[0].droid.telecomCallGetCallIds() 298 ads[0].log.info("Calls in PhoneA %s", calls) 299 300 call_conf_id = None 301 if num_active_calls(self.log, ads[0]) != 1: 302 ads[0].log.info("Total number of call ids is not 1.") 303 call_conf_id = get_cep_conference_call_id(ads[0]) 304 if call_conf_id is not None: 305 self.log.info("New conference call id is found. CEP enabled.") 306 calls.remove(call_conf_id) 307 if (set(ads[0].droid.telecomCallGetCallChildren( 308 call_conf_id)) != set(calls)): 309 ads[0].log.error( 310 "Children list %s for conference call is not correct.", 311 ads[0].droid.telecomCallGetCallChildren(call_conf_id)) 312 return None 313 314 if (CALL_PROPERTY_CONFERENCE not in ads[0] 315 .droid.telecomCallGetProperties(call_conf_id)): 316 ads[0].log.error( 317 "Conf call id % properties wrong: %s", call_conf_id, 318 ads[0].droid.telecomCallGetProperties(call_conf_id)) 319 return None 320 321 if (CALL_CAPABILITY_MANAGE_CONFERENCE not in ads[0] 322 .droid.telecomCallGetCapabilities(call_conf_id)): 323 ads[0].log.error( 324 "Conf call id %s capabilities wrong: %s", call_conf_id, 325 ads[0].droid.telecomCallGetCapabilities(call_conf_id)) 326 return None 327 328 if (call_ab_id in calls) or (call_ac_id in calls): 329 self.log.error("Previous call ids should not in new call" 330 " list after merge.") 331 return None 332 else: 333 for call_id in calls: 334 if call_id != call_ab_id and call_id != call_ac_id: 335 call_conf_id = call_id 336 self.log.info("CEP not enabled.") 337 338 if not call_conf_id: 339 self.log.error("Merge call fail, no new conference call id.") 340 raise signals.TestFailure( 341 "Calls were not merged. Failed to merge calls.", 342 extras={"fail_reason": "Calls were not merged." 343 " Failed to merge calls."}) 344 if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True): 345 return False 346 347 # Check if Conf Call is currently active 348 if ads[0].droid.telecomCallGetCallState( 349 call_conf_id) != CALL_STATE_ACTIVE: 350 ads[0].log.error( 351 "Call_ID: %s, state: %s, expected: STATE_ACTIVE", call_conf_id, 352 ads[0].droid.telecomCallGetCallState(call_conf_id)) 353 return None 354 355 return call_conf_id 356 357 358 def _test_wcdma_conference_merge_drop(self, call_ab_id, call_ac_id): 359 """Test conference merge and drop in WCDMA/CSFB_WCDMA call. 360 361 PhoneA in WCDMA (or CSFB_WCDMA) call with PhoneB. 362 PhoneA in WCDMA (or CSFB_WCDMA) call with PhoneC. 363 Merge calls to conference on PhoneA. 364 Hangup on PhoneC, check call continues between AB. 365 Hangup on PhoneB, check A ends. 366 367 Args: 368 call_ab_id: call id for call_AB on PhoneA. 369 call_ac_id: call id for call_AC on PhoneA. 370 371 Returns: 372 True if succeed; 373 False if failed. 374 """ 375 ads = self.android_devices 376 377 self.log.info("Step4: Merge to Conf Call and verify Conf Call.") 378 ads[0].droid.telecomCallJoinCallsInConf(call_ab_id, call_ac_id) 379 time.sleep(WAIT_TIME_IN_CALL) 380 calls = ads[0].droid.telecomCallGetCallIds() 381 ads[0].log.info("Calls in PhoneA %s", calls) 382 num_calls = num_active_calls(self.log, ads[0]) 383 if num_calls != 3: 384 ads[0].log.error("Total number of call ids is not 3.") 385 if num_calls == 2: 386 if call_ab_id in calls and call_ac_id in calls: 387 ads[0].log.error("Calls were not merged." 388 " Failed to merge calls.") 389 raise signals.TestFailure( 390 "Calls were not merged. Failed to merge calls.", 391 extras={"fail_reason": "Calls were not merged." 392 " Failed to merge calls."}) 393 return False 394 call_conf_id = None 395 for call_id in calls: 396 if call_id != call_ab_id and call_id != call_ac_id: 397 call_conf_id = call_id 398 if not call_conf_id: 399 self.log.error("Merge call fail, no new conference call id.") 400 return False 401 if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True): 402 return False 403 404 # Check if Conf Call is currently active 405 if ads[0].droid.telecomCallGetCallState( 406 call_conf_id) != CALL_STATE_ACTIVE: 407 ads[0].log.error( 408 "Call_id: %s, state: %s, expected: STATE_ACTIVE", call_conf_id, 409 ads[0].droid.telecomCallGetCallState(call_conf_id)) 410 return False 411 412 self.log.info("Step5: End call on PhoneC and verify call continues.") 413 if not self._hangup_call(ads[2], "PhoneC"): 414 return False 415 time.sleep(WAIT_TIME_IN_CALL) 416 calls = ads[0].droid.telecomCallGetCallIds() 417 ads[0].log.info("Calls in PhoneA %s", calls) 418 if num_active_calls(self.log, ads[0]) != 1: 419 return False 420 if not verify_incall_state(self.log, [ads[0], ads[1]], True): 421 return False 422 if not verify_incall_state(self.log, [ads[2]], False): 423 return False 424 425 self.log.info("Step6: End call on PhoneB and verify PhoneA end.") 426 if not self._hangup_call(ads[1], "PhoneB"): 427 return False 428 time.sleep(WAIT_TIME_IN_CALL) 429 if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False): 430 return False 431 return True 432 433 434 def _test_msim_volte_wfc_call_forwarding( 435 self, 436 callee_slot, 437 dds_slot, 438 callee_rat=["wfc", "wfc"], 439 call_forwarding_type="unconditional", 440 enable_volte=[True, True], 441 enable_wfc=[True, True], 442 is_airplane_mode=False, 443 is_wifi_connected=False, 444 wfc_mode=[ 445 WFC_MODE_CELLULAR_PREFERRED, 446 WFC_MODE_CELLULAR_PREFERRED]): 447 """Make VoLTE/WFC call to the primary device at specific slot with DDS 448 at specific slot, and then forwarded to 3rd device with specific call 449 forwarding type. 450 451 Test step: 452 1. Get sub IDs of specific slots of both MO and MT devices. 453 2. Set up phones in desired RAT. 454 3. Enable VoLTE/WFC. 455 4. Switch DDS to specific slot. 456 5. Check HTTP connection after DDS switch. 457 6. Register and enable call forwarding with specifc type. 458 7. Make VoLTE/WFC call to the primary device and wait for being 459 forwarded to 3rd device. 460 461 Args: 462 callee_slot: Slot of primary device receiving and forwarding MT call 463 (0 or 1) 464 dds_slot: Preferred data slot 465 callee_rat: RAT for both slots of the primary device 466 call_forwarding_type: 467 "unconditional" 468 "busy" 469 "not_answered" 470 "not_reachable" 471 enable_volte: True for enabling and False for disabling VoLTE for 472 each slot on the primary device 473 enable_wfc: True for enabling and False for disabling WFC for 474 each slot on the primary device 475 is_airplane_mode: True of False for WFC setup 476 wfc_mode: Cellular preferred or Wi-Fi preferred. 477 478 Returns: 479 True or False 480 """ 481 ads = self.android_devices 482 ad_caller = ads[1] 483 ad_callee = ads[0] 484 ad_forwarded_callee = ads[2] 485 slot_0_subid = get_subid_from_slot_index(self.log, ad_callee, 0) 486 slot_1_subid = get_subid_from_slot_index(self.log, ad_callee, 1) 487 488 if not toggle_airplane_mode(self.log, ad_callee, False): 489 ad_callee.log.error("Failed to disable airplane mode.") 490 return False 491 492 # Set up callee (primary device) 493 callee_sub_id = get_subid_from_slot_index( 494 self.log, ad_callee, callee_slot) 495 if callee_sub_id == INVALID_SUB_ID: 496 self.log.warning( 497 "Failed to get sub ID at slot %s.", callee_slot) 498 return 499 callee_other_sub_id = get_subid_from_slot_index( 500 self.log, ad_callee, 1-callee_slot) 501 set_voice_sub_id(ad_callee, callee_sub_id) 502 ad_callee.log.info( 503 "Sub ID for incoming call at slot %s: %s", 504 callee_slot, get_incoming_voice_sub_id(ad_callee)) 505 506 # Set up caller 507 _, caller_sub_id, _ = get_subid_on_same_network_of_host_ad(ads) 508 if caller_sub_id == INVALID_SUB_ID: 509 ad_caller.log.warning("Failed to get proper sub ID of the caller") 510 return 511 set_voice_sub_id(ad_caller, caller_sub_id) 512 ad_caller.log.info( 513 "Sub ID for outgoing call of the caller: %s", 514 get_outgoing_voice_sub_id(ad_caller)) 515 516 # Set up forwarded callee 517 _, _, forwarded_callee_sub_id = get_subid_on_same_network_of_host_ad( 518 ads) 519 if forwarded_callee_sub_id == INVALID_SUB_ID: 520 ad_forwarded_callee.log.warning( 521 "Failed to get proper sub ID of the forwarded callee.") 522 return 523 set_voice_sub_id(ad_forwarded_callee, forwarded_callee_sub_id) 524 ad_forwarded_callee.log.info( 525 "Sub ID for incoming call of the forwarded callee: %s", 526 get_incoming_voice_sub_id(ad_forwarded_callee)) 527 528 set_call_forwarding_by_mmi(self.log, ad_callee, ad_forwarded_callee) 529 530 ad_callee.log.info("Step 0: Set up phones in desired RAT.") 531 532 if callee_slot == 1: 533 phone_setup_on_rat( 534 self.log, 535 ad_callee, 536 callee_rat[0], 537 callee_other_sub_id, 538 is_airplane_mode, 539 wfc_mode[0], 540 self.wifi_network_ssid, 541 self.wifi_network_pass) 542 543 elif callee_slot == 0: 544 phone_setup_on_rat( 545 self.log, 546 ad_callee, 547 callee_rat[1], 548 callee_other_sub_id, 549 is_airplane_mode, 550 wfc_mode[1], 551 self.wifi_network_ssid, 552 self.wifi_network_pass) 553 554 callee_phone_setup_func = phone_setup_on_rat( 555 self.log, ad_callee, callee_rat[callee_slot], only_return_fn=True) 556 557 if callee_rat[callee_slot] == 'wfc': 558 argv = ( 559 self.log, 560 ad_callee, 561 callee_sub_id, 562 is_airplane_mode, 563 wfc_mode[callee_slot], 564 self.wifi_network_ssid, 565 self.wifi_network_pass) 566 else: 567 argv = (self.log, ad_callee, callee_sub_id) 568 569 tasks = [(phone_setup_voice_general, (self.log, ad_caller)), 570 (callee_phone_setup_func, argv), 571 (phone_setup_voice_general, (self.log, ad_forwarded_callee))] 572 573 if not multithread_func(self.log, tasks): 574 self.log.error("Phone Failed to Set Up Properly.") 575 self.tel_logger.set_result(CallResult("CALL_SETUP_FAILURE")) 576 raise signals.TestFailure("Failed", 577 extras={"fail_reason": "Phone Failed to Set Up Properly."}) 578 579 if is_wifi_connected: 580 if not ensure_wifi_connected( 581 self.log, 582 ad_callee, 583 self.wifi_network_ssid, 584 self.wifi_network_pass, 585 apm=is_airplane_mode): 586 return False 587 time.sleep(5) 588 589 ad_callee.log.info("Step 1: Enable/disable VoLTE and WFC.") 590 for sub_id, volte in zip([slot_0_subid, slot_1_subid], enable_volte): 591 if not toggle_volte_for_subscription( 592 self.log, 593 ad_callee, 594 new_state=volte, 595 sub_id=sub_id): 596 return False 597 598 for sub_id, wfc, mode in \ 599 zip([slot_0_subid, slot_1_subid], enable_wfc, wfc_mode): 600 if not toggle_wfc_for_subscription( 601 self.log, 602 ad_callee, 603 new_state=wfc, 604 sub_id=sub_id): 605 return False 606 if not set_wfc_mode_for_subscription(ad_callee, mode, sub_id=sub_id): 607 return False 608 609 ad_callee.log.info("Step 2: Switch DDS.") 610 if dds_slot: 611 if not set_dds_on_slot_1(ad_callee): 612 ad_callee.log.warning( 613 "Failed to set DDS at eSIM on %s", ad_callee.serial) 614 return 615 else: 616 if not set_dds_on_slot_0(ad_callee): 617 ad_callee.log.warning( 618 "Failed to set DDS at pSIM on %s", ad_callee.serial) 619 return 620 621 ad_callee.log.info("Step 3: Check HTTP connection after DDS switch.") 622 if not verify_http_connection(self.log, ad_callee): 623 ad_callee.log.error("Failed to verify http connection.") 624 return False 625 else: 626 ad_callee.log.info("Verify http connection successfully.") 627 628 is_callee_in_call = is_phone_in_call_on_rat( 629 self.log, ad_callee, callee_rat[callee_slot], only_return_fn=True) 630 631 is_call_waiting = re.search( 632 "call_waiting (True (\d)|False)", call_forwarding_type, re.I) 633 if is_call_waiting: 634 if is_call_waiting.group(1) == "False": 635 call_waiting = False 636 scenario = None 637 else: 638 call_waiting = True 639 scenario = int(is_call_waiting.group(2)) 640 641 self.log.info( 642 "Step 4: Make voice call with call waiting enabled = %s.", 643 call_waiting) 644 645 result = three_phone_call_waiting_short_seq( 646 self.log, 647 ad_callee, 648 None, 649 is_callee_in_call, 650 ad_caller, 651 ad_forwarded_callee, 652 call_waiting=call_waiting, 653 scenario=scenario) 654 else: 655 self.log.info( 656 "Step 4: Make voice call with call forwarding %s.", 657 call_forwarding_type) 658 result = three_phone_call_forwarding_short_seq( 659 self.log, 660 ad_callee, 661 None, 662 is_callee_in_call, 663 ad_caller, 664 ad_forwarded_callee, 665 call_forwarding_type=call_forwarding_type) 666 667 if not result: 668 if is_call_waiting: 669 pass 670 else: 671 self.log.error( 672 "Failed to make MO call from %s to %s slot %s and forward" 673 " to %s.", 674 ad_caller.serial, 675 ad_callee.serial, 676 callee_slot, 677 ad_forwarded_callee.serial) 678 return result 679 680 681 def _test_msim_volte_wfc_call_voice_conf( 682 self, 683 host_slot, 684 dds_slot, 685 host_rat=["wfc", "wfc"], 686 merge=True, 687 disable_cw=False, 688 enable_volte=[True, True], 689 enable_wfc=[True, True], 690 is_airplane_mode=False, 691 is_wifi_connected=False, 692 wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED], 693 reject_once=False): 694 """Make a VoLTE/WFC conference call at specific slot with DDS at 695 specific slot. 696 697 Test step: 698 1. Get sub IDs of specific slots of both MO and MT devices. 699 2. Set up phones in desired RAT 700 3. Enable VoLTE/WFC. 701 4. Switch DDS to specific slot. 702 5. Check HTTP connection after DDS switch. 703 6. Make 3-way VoLTE/WFC call. 704 7. Swap calls. 705 8. Merge calls. 706 707 Args: 708 host_slot: Slot on the primary device to host the comference call. 709 0 or 1 (0 for pSIM or 1 for eSIM)call 710 dds_slot: Preferred data slot 711 host_rat: RAT for both slots of the primary devicevice 712 merge: True for merging 2 calls into the conference call. False for 713 not merging 2 separated call. 714 disable_cw: True for disabling call waiting and False on the 715 contrary. 716 enable_volte: True for enabling and False for disabling VoLTE for 717 each slot on the primary device 718 enable_wfc: True for enabling and False for disabling WFC for 719 each slot on the primary device 720 is_airplane_mode: True of False for WFC setup 721 wfc_mode: Cellular preferred or Wi-Fi preferred. 722 reject_once: True for rejecting the 2nd call once from the 3rd 723 device (Phone C) to the primary device (Phone A). 724 725 Returns: 726 True of False 727 """ 728 729 ads = self.android_devices 730 ad_host = ads[0] 731 ad_p1 = ads[1] 732 ad_p2 = ads[2] 733 slot_0_subid = get_subid_from_slot_index(ad_host.log, ad_host, 0) 734 slot_1_subid = get_subid_from_slot_index(ad_host.log, ad_host, 1) 735 736 host_sub_id = get_subid_from_slot_index(self.log, ad_host, host_slot) 737 if host_sub_id == INVALID_SUB_ID: 738 ad_host.log.warning("Failed to get sub ID at slot.", host_slot) 739 return 740 host_other_sub_id = get_subid_from_slot_index( 741 self.log, ad_host, 1-host_slot) 742 set_voice_sub_id(ad_host, host_sub_id) 743 ad_host.log.info( 744 "Sub ID for outgoing call at slot %s: %s", 745 host_slot, get_outgoing_voice_sub_id(ad_host)) 746 747 _, p1_sub_id, p2_sub_id = get_subid_on_same_network_of_host_ad(ads) 748 749 if p1_sub_id == INVALID_SUB_ID: 750 ad_p1.log.warning("Failed to get proper sub ID.") 751 return 752 set_voice_sub_id(ad_p1, p1_sub_id) 753 ad_p1.log.info( 754 "Sub ID for incoming call: %s", 755 get_incoming_voice_sub_id(ad_p1)) 756 757 if p2_sub_id == INVALID_SUB_ID: 758 ad_p2.log.warning("Failed to get proper sub ID.") 759 return 760 set_voice_sub_id(ad_p2, p2_sub_id) 761 ad_p2.log.info( 762 "Sub ID for incoming call: %s", get_incoming_voice_sub_id(ad_p2)) 763 764 ad_host.log.info("Step 0: Set up phones in desired RAT.") 765 766 if disable_cw: 767 if not set_call_waiting(self.log, ad_host, enable=0): 768 return False 769 770 if host_slot == 1: 771 phone_setup_on_rat( 772 self.log, 773 ad_host, 774 host_rat[0], 775 host_other_sub_id, 776 is_airplane_mode, 777 wfc_mode[0], 778 self.wifi_network_ssid, 779 self.wifi_network_pass) 780 781 elif host_slot == 0: 782 phone_setup_on_rat( 783 self.log, 784 ad_host, 785 host_rat[1], 786 host_other_sub_id, 787 is_airplane_mode, 788 wfc_mode[1], 789 self.wifi_network_ssid, 790 self.wifi_network_pass) 791 792 host_phone_setup_func = phone_setup_on_rat( 793 self.log, ad_host, host_rat[host_slot], only_return_fn=True) 794 795 if host_rat[host_slot].lower() == 'wfc': 796 argv = ( 797 self.log, 798 ad_host, 799 host_sub_id, 800 is_airplane_mode, 801 wfc_mode[host_slot], 802 self.wifi_network_ssid, 803 self.wifi_network_pass) 804 else: 805 argv = (self.log, ad_host, host_sub_id) 806 807 tasks = [(phone_setup_voice_general, (self.log, ad_p1)), 808 (host_phone_setup_func, argv), 809 (phone_setup_voice_general, (self.log, ad_p2))] 810 811 if not multithread_func(self.log, tasks): 812 self.log.error("Phone Failed to Set Up Properly.") 813 self.tel_logger.set_result(CallResult("CALL_SETUP_FAILURE")) 814 raise signals.TestFailure("Failed", 815 extras={"fail_reason": "Phone Failed to Set Up Properly."}) 816 817 if is_wifi_connected: 818 if not ensure_wifi_connected( 819 self.log, 820 ad_host, 821 self.wifi_network_ssid, 822 self.wifi_network_pass, 823 apm=is_airplane_mode): 824 return False 825 time.sleep(5) 826 827 ad_host.log.info("Step 1: Enable/disable VoLTE and WFC.") 828 for sub_id, volte in zip([slot_0_subid, slot_1_subid], enable_volte): 829 if not toggle_volte_for_subscription( 830 self.log, 831 ad_host, 832 new_state=volte, 833 sub_id=sub_id): 834 return False 835 836 for sub_id, wfc, mode in \ 837 zip([slot_0_subid, slot_1_subid], enable_wfc, wfc_mode): 838 if not toggle_wfc_for_subscription( 839 self.log, 840 ad_host, 841 new_state=wfc, 842 sub_id=sub_id): 843 return False 844 if not set_wfc_mode_for_subscription(ad_host, mode, sub_id=sub_id): 845 return False 846 847 ad_host.log.info("Step 2: Switch DDS.") 848 if dds_slot: 849 if not set_dds_on_slot_1(ad_host): 850 ad_host.log.warning( 851 "Failed to set DDS at eSIM on %s", ad_host.serial) 852 return 853 else: 854 if not set_dds_on_slot_0(ad_host): 855 ad_host.log.warning( 856 "Failed to set DDS at pSIM on %s", ad_host.serial) 857 return 858 859 ad_host.log.info("Step 3: Check HTTP connection after DDS switch.") 860 if not verify_http_connection(self.log, ads[0]): 861 ad_host.log.error("Failed to verify http connection.") 862 return False 863 else: 864 ad_host.log.info("Verify http connection successfully.") 865 866 self.log.info("Step 4: Make 3-way voice call.") 867 is_host_in_call = is_phone_in_call_on_rat( 868 self.log, ad_host, host_rat[host_slot], only_return_fn=True) 869 call_ab_id = self._three_phone_call_mo_add_mt( 870 [ad_host, ad_p1, ad_p2], 871 [None, None, None], 872 [is_host_in_call, None, None], 873 reject_once=reject_once) 874 875 if call_ab_id is None: 876 if disable_cw: 877 set_call_waiting(self.log, ad_host, enable=1) 878 if str(getattr(ad_host, "exception", None)) == \ 879 "PhoneA call PhoneC failed.": 880 ads[0].log.info("PhoneA failed to call PhoneC due to call" 881 " waiting being disabled.") 882 delattr(ad_host, "exception") 883 return True 884 self.log.error("Failed to get call_ab_id") 885 return False 886 else: 887 if disable_cw: 888 set_call_waiting(self.log, ad_host, enable=0) 889 return False 890 891 calls = ads[0].droid.telecomCallGetCallIds() 892 ads[0].log.info("Calls in PhoneA %s", calls) 893 if num_active_calls(self.log, ads[0]) != 2: 894 return False 895 if calls[0] == call_ab_id: 896 call_ac_id = calls[1] 897 else: 898 call_ac_id = calls[0] 899 900 if call_ac_id is None: 901 self.log.error("Failed to get call_ac_id") 902 return False 903 904 num_swaps = 2 905 ad_host.log.info("Step 5: Begin Swap x%s test.", num_swaps) 906 if not swap_calls(self.log, ads, call_ab_id, call_ac_id, 907 num_swaps): 908 ad_host.log.error("Swap test failed.") 909 return False 910 911 if not merge: 912 result = True 913 if not self._hangup_call(ads[1], "PhoneB"): 914 result = False 915 if not self._hangup_call(ads[2], "PhoneC"): 916 result = False 917 return result 918 else: 919 ad_host.log.info("Step 6: Merge calls.") 920 if host_rat[host_slot] == "volte" or host_rat[host_slot] == "wfc": 921 return self._test_ims_conference_merge_drop_second_call_from_participant( 922 call_ab_id, call_ac_id) 923 else: 924 return self._test_wcdma_conference_merge_drop( 925 call_ab_id, call_ac_id) 926 927 @test_tracker_info(uuid="3d328dd0-acb6-48be-9cb2-ffffb15bf2cd") 928 @TelephonyBaseTest.tel_test_wrap 929 def test_msim_call_forwarding_unconditional_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self): 930 return self._test_msim_volte_wfc_call_forwarding( 931 0, 932 0, 933 callee_rat=['wfc', 'general'], 934 is_airplane_mode=True) 935 936 @test_tracker_info(uuid="aac41970-4fdb-4f22-bf33-2092ce14db6e") 937 @TelephonyBaseTest.tel_test_wrap 938 def test_msim_call_forwarding_unconditional_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self): 939 return self._test_msim_volte_wfc_call_forwarding( 940 0, 941 0, 942 callee_rat=['wfc', 'general'], 943 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED]) 944 945 @test_tracker_info(uuid="716a795a-529f-450a-800d-80c1dd7c0e3f") 946 @TelephonyBaseTest.tel_test_wrap 947 def test_msim_call_forwarding_unconditional_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self): 948 return self._test_msim_volte_wfc_call_forwarding( 949 0, 950 1, 951 callee_rat=['wfc', 'general'], 952 is_airplane_mode=True) 953 954 @test_tracker_info(uuid="0743331b-78a4-4721-91e7-4c6b894b4b61") 955 @TelephonyBaseTest.tel_test_wrap 956 def test_msim_call_forwarding_unconditional_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self): 957 return self._test_msim_volte_wfc_call_forwarding( 958 0, 959 1, 960 callee_rat=['wfc', 'general'], 961 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED]) 962 963 @test_tracker_info(uuid="65e8192f-c8af-454e-a142-0ba95f801fb4") 964 @TelephonyBaseTest.tel_test_wrap 965 def test_msim_call_forwarding_unconditional_volte_psim_cellular_preferred_wifi_on_dds_slot_0(self): 966 return self._test_msim_volte_wfc_call_forwarding( 967 0, 968 0, 969 callee_rat=["volte", "general"], 970 is_wifi_connected=True) 971 972 @test_tracker_info(uuid="29175f3c-0f7b-4baf-8399-a37cc92acce0") 973 @TelephonyBaseTest.tel_test_wrap 974 def test_msim_call_forwarding_unconditional_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self): 975 return self._test_msim_volte_wfc_call_forwarding( 976 1, 977 0, 978 callee_rat=['general', 'wfc'], 979 is_airplane_mode=True) 980 981 @test_tracker_info(uuid="a652a973-7445-4b3d-83cf-7b3ff2e1b47d") 982 @TelephonyBaseTest.tel_test_wrap 983 def test_msim_call_forwarding_unconditional_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self): 984 return self._test_msim_volte_wfc_call_forwarding( 985 1, 986 0, 987 callee_rat=['general', 'wfc'], 988 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED]) 989 990 @test_tracker_info(uuid="8ff9bc8f-8740-4198-b437-19994f07758b") 991 @TelephonyBaseTest.tel_test_wrap 992 def test_msim_call_forwarding_unconditional_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self): 993 return self._test_msim_volte_wfc_call_forwarding( 994 1, 995 1, 996 callee_rat=['general', 'wfc'], 997 is_airplane_mode=True) 998 999 @test_tracker_info(uuid="3341cfec-4720-4c20-97c2-29409c727fab") 1000 @TelephonyBaseTest.tel_test_wrap 1001 def test_msim_call_forwarding_unconditional_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self): 1002 return self._test_msim_volte_wfc_call_forwarding( 1003 1, 1004 1, 1005 callee_rat=['general', 'wfc'], 1006 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED]) 1007 1008 @test_tracker_info(uuid="7cfea32a-6de2-4285-99b1-1219efaf542b") 1009 @TelephonyBaseTest.tel_test_wrap 1010 def test_msim_call_forwarding_unconditional_volte_esim_cellular_preferred_wifi_on_dds_slot_0(self): 1011 return self._test_msim_volte_wfc_call_forwarding( 1012 1, 1013 0, 1014 callee_rat=["general", "volte"], 1015 is_wifi_connected=True) 1016 1017 @test_tracker_info(uuid="27422851-620c-4009-8e2a-730a97d88cb0") 1018 @TelephonyBaseTest.tel_test_wrap 1019 def test_msim_call_waiting_hold_swap_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self): 1020 return self._test_msim_volte_wfc_call_voice_conf( 1021 0, 1022 0, 1023 host_rat=['wfc', 'general'], 1024 merge=False, 1025 is_airplane_mode=True, 1026 reject_once=True) 1027 1028 @test_tracker_info(uuid="f741f336-7eee-473e-b68f-c3505dbab935") 1029 @TelephonyBaseTest.tel_test_wrap 1030 def test_msim_call_waiting_hold_swap_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self): 1031 return self._test_msim_volte_wfc_call_voice_conf( 1032 0, 1033 0, 1034 host_rat=['wfc', 'general'], 1035 merge=False, 1036 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED], 1037 reject_once=True) 1038 1039 @test_tracker_info(uuid="4c2c9896-1cfd-4d4c-9594-97c600ac3f50") 1040 @TelephonyBaseTest.tel_test_wrap 1041 def test_msim_call_waiting_hold_swap_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self): 1042 return self._test_msim_volte_wfc_call_voice_conf( 1043 0, 1044 1, 1045 host_rat=['wfc', 'general'], 1046 merge=False, 1047 is_airplane_mode=True, 1048 reject_once=True) 1049 1050 @test_tracker_info(uuid="74491391-8ea5-4bad-868b-332218a8b015") 1051 @TelephonyBaseTest.tel_test_wrap 1052 def test_msim_call_waiting_hold_swap_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self): 1053 return self._test_msim_volte_wfc_call_voice_conf( 1054 0, 1055 1, 1056 host_rat=['wfc', 'general'], 1057 merge=False, 1058 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED], 1059 reject_once=True) 1060 1061 @test_tracker_info(uuid="40185d6d-e127-4696-9ed8-53dbe355b1c3") 1062 @TelephonyBaseTest.tel_test_wrap 1063 def test_msim_call_waiting_hold_swap_volte_psim_cellular_preferred_wifi_on_dds_slot_0(self): 1064 return self._test_msim_volte_wfc_call_voice_conf( 1065 0, 1066 0, 1067 host_rat=["volte", "general"], 1068 merge=False, 1069 is_airplane_mode=False, 1070 is_wifi_connected=True, 1071 reject_once=True) 1072 1073 @test_tracker_info(uuid="b07a6693-3d1c-496a-b2fc-90711b2bf4f6") 1074 @TelephonyBaseTest.tel_test_wrap 1075 def test_msim_call_waiting_hold_swap_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self): 1076 return self._test_msim_volte_wfc_call_voice_conf( 1077 1, 1078 0, 1079 host_rat=['general', 'wfc'], 1080 merge=False, 1081 is_airplane_mode=True, 1082 reject_once=True) 1083 1084 @test_tracker_info(uuid="c4461963-5d99-4c6a-b2f6-92de2437e0e7") 1085 @TelephonyBaseTest.tel_test_wrap 1086 def test_msim_call_waiting_hold_swap_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self): 1087 return self._test_msim_volte_wfc_call_voice_conf( 1088 1, 1089 0, 1090 host_rat=['general', 'wfc'], 1091 merge=False, 1092 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED], 1093 reject_once=True) 1094 1095 @test_tracker_info(uuid="cece707d-fa13-4748-a777-873eaaa27bca") 1096 @TelephonyBaseTest.tel_test_wrap 1097 def test_msim_call_waiting_hold_swap_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self): 1098 return self._test_msim_volte_wfc_call_voice_conf( 1099 1, 1100 1, 1101 host_rat=['general', 'wfc'], 1102 merge=False, 1103 is_airplane_mode=True, 1104 reject_once=True) 1105 1106 @test_tracker_info(uuid="bae04c51-99eb-43a5-9f30-f16ac369bb71") 1107 @TelephonyBaseTest.tel_test_wrap 1108 def test_msim_call_waiting_hold_swap_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self): 1109 return self._test_msim_volte_wfc_call_voice_conf( 1110 1, 1111 1, 1112 host_rat=['general', 'wfc'], 1113 merge=False, 1114 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED], 1115 reject_once=True) 1116 1117 @test_tracker_info(uuid="c1d2c088-8782-45cd-b320-effecf6838b4") 1118 @TelephonyBaseTest.tel_test_wrap 1119 def test_msim_call_waiting_hold_swap_volte_esim_cellular_preferred_wifi_on_dds_slot_0(self): 1120 return self._test_msim_volte_wfc_call_voice_conf( 1121 1, 1122 0, 1123 host_rat=["general", "volte"], 1124 merge=False, 1125 is_airplane_mode=False, 1126 is_wifi_connected=True, 1127 reject_once=True) 1128 1129 @test_tracker_info(uuid="bb4119c9-f5bc-4ef1-acbd-e8f4099f2ba9") 1130 @TelephonyBaseTest.tel_test_wrap 1131 def test_msim_voice_conf_call_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self): 1132 return self._test_msim_volte_wfc_call_voice_conf( 1133 0, 1134 0, 1135 host_rat=['wfc', 'general'], 1136 is_airplane_mode=True) 1137 1138 @test_tracker_info(uuid="2e48ad65-bfa9-43d3-aa3a-62f412d931cc") 1139 @TelephonyBaseTest.tel_test_wrap 1140 def test_msim_voice_conf_call_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self): 1141 return self._test_msim_volte_wfc_call_voice_conf( 1142 0, 1143 0, 1144 host_rat=['wfc', 'general'], 1145 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED]) 1146 1147 @test_tracker_info(uuid="39a9c791-16d0-4476-94e9-fc04e9f5f65a") 1148 @TelephonyBaseTest.tel_test_wrap 1149 def test_msim_voice_conf_call_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self): 1150 return self._test_msim_volte_wfc_call_voice_conf( 1151 0, 1152 1, 1153 host_rat=['wfc', 'general'], 1154 is_airplane_mode=True) 1155 1156 @test_tracker_info(uuid="daba5874-0aaa-4f47-9548-e484dd72a8c6") 1157 @TelephonyBaseTest.tel_test_wrap 1158 def test_msim_voice_conf_call_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self): 1159 return self._test_msim_volte_wfc_call_voice_conf( 1160 0, 1161 1, 1162 host_rat=['wfc', 'general'], 1163 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED]) 1164 1165 @test_tracker_info(uuid="ef96a46b-8898-4d5e-a494-31b8047fc986") 1166 @TelephonyBaseTest.tel_test_wrap 1167 def test_msim_voice_conf_call_volte_psim_cellular_preferred_wifi_on_dds_slot_0(self): 1168 return self._test_msim_volte_wfc_call_voice_conf( 1169 0, 1170 0, 1171 host_rat=["volte", "general"], 1172 is_wifi_connected=True) 1173 1174 @test_tracker_info(uuid="c565b2af-512c-4097-a4f7-7d920ea78373") 1175 @TelephonyBaseTest.tel_test_wrap 1176 def test_msim_voice_conf_call_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self): 1177 return self._test_msim_volte_wfc_call_voice_conf( 1178 1, 1179 0, 1180 host_rat=['general', 'wfc'], is_airplane_mode=True) 1181 1182 @test_tracker_info(uuid="078db8f5-eaf9-409c-878b-70c13be18802") 1183 @TelephonyBaseTest.tel_test_wrap 1184 def test_msim_voice_conf_call_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self): 1185 return self._test_msim_volte_wfc_call_voice_conf( 1186 1, 1187 0, 1188 host_rat=['general', 'wfc'], 1189 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED]) 1190 1191 @test_tracker_info(uuid="77c70690-6206-43a5-9789-e9ff39235d42") 1192 @TelephonyBaseTest.tel_test_wrap 1193 def test_msim_voice_conf_call_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self): 1194 return self._test_msim_volte_wfc_call_voice_conf( 1195 1, 1196 1, 1197 host_rat=['general', 'wfc'], is_airplane_mode=True) 1198 1199 @test_tracker_info(uuid="b48138dd-5c03-4592-a96d-f63833456197") 1200 @TelephonyBaseTest.tel_test_wrap 1201 def test_msim_voice_conf_call_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self): 1202 return self._test_msim_volte_wfc_call_voice_conf( 1203 1, 1204 1, 1205 host_rat=['general', 'wfc'], 1206 wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED]) 1207 1208 @test_tracker_info(uuid="c2e3ff0e-6112-4b79-92e2-2fabeaf87b1f") 1209 @TelephonyBaseTest.tel_test_wrap 1210 def test_msim_voice_conf_call_volte_esim_cellular_preferred_wifi_on_dds_slot_0(self): 1211 return self._test_msim_volte_wfc_call_voice_conf( 1212 1, 1213 0, 1214 host_rat=["general", "volte"], 1215 is_wifi_connected=True)