• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 MAX_WAIT_TIME_SMS_RECEIVE
29from acts_contrib.test_utils.tel.tel_defines import WAIT_TIME_IN_CALL
30from acts_contrib.test_utils.tel.tel_defines import WAIT_TIME_ANDROID_STATE_SETTLING
31from acts_contrib.test_utils.tel.tel_defines import INVALID_SUB_ID
32from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_DISABLED
33from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_CELLULAR_PREFERRED
34from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_WIFI_ONLY
35from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_WIFI_PREFERRED
36from acts_contrib.test_utils.tel.tel_data_utils import reboot_test
37from acts_contrib.test_utils.tel.tel_subscription_utils import get_subid_from_slot_index
38from acts_contrib.test_utils.tel.tel_subscription_utils import get_default_data_sub_id
39from acts_contrib.test_utils.tel.tel_subscription_utils import set_message_subid
40from acts_contrib.test_utils.tel.tel_subscription_utils import set_subid_for_data
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 multithread_func
47from acts_contrib.test_utils.tel.tel_test_utils import start_youtube_video
48from acts_contrib.test_utils.tel.tel_test_utils import \
49    wait_for_cell_data_connection_for_subscription
50from acts_contrib.test_utils.tel.tel_test_utils import toggle_volte_for_subscription
51from acts_contrib.test_utils.tel.tel_test_utils import toggle_wfc_for_subscription
52from acts_contrib.test_utils.tel.tel_test_utils import set_wfc_mode_for_subscription
53from acts_contrib.test_utils.tel.tel_test_utils import \
54    sms_send_receive_verify_for_subscription
55from acts_contrib.test_utils.tel.tel_test_utils import mms_send_receive_verify
56from acts_contrib.test_utils.tel.tel_test_utils import verify_http_connection
57from acts_contrib.test_utils.tel.tel_test_utils import verify_internet_connection
58from acts_contrib.test_utils.tel.tel_test_utils import log_messaging_screen_shot
59from acts_contrib.test_utils.tel.tel_test_utils import ensure_phones_idle
60from acts_contrib.test_utils.tel.tel_test_utils import get_slot_index_from_subid
61from acts_contrib.test_utils.tel.tel_test_utils import toggle_airplane_mode
62from acts_contrib.test_utils.tel.tel_test_utils import is_volte_enabled
63from acts_contrib.test_utils.tel.tel_test_utils import check_is_wifi_connected
64from acts_contrib.test_utils.tel.tel_test_utils import ensure_wifi_connected
65from acts_contrib.test_utils.tel.tel_test_utils import wait_for_wfc_enabled
66from acts_contrib.test_utils.tel.tel_voice_utils import \
67    phone_setup_volte_for_subscription
68from acts_contrib.test_utils.tel.tel_voice_utils import phone_setup_on_rat
69from acts_contrib.test_utils.tel.tel_voice_utils import is_phone_in_call_on_rat
70from acts_contrib.test_utils.tel.tel_voice_utils import two_phone_call_msim_for_slot
71from acts.utils import rand_ascii_str
72
73CallResult = TelephonyVoiceTestResult.CallResult.Value
74
75class TelLiveGFTDSDSDDSSwitchTest(TelephonyBaseTest):
76    def setup_class(self):
77        TelephonyBaseTest.setup_class(self)
78        self.message_lengths = (50, 160, 180)
79        self.tel_logger = TelephonyMetricLogger.for_test_case()
80
81    def teardown_test(self):
82        ensure_phones_idle(self.log, self.android_devices)
83
84    def _msim_message_test(
85        self,
86        ad_mo,
87        ad_mt,
88        mo_sub_id,
89        mt_sub_id, msg="SMS",
90        max_wait_time=MAX_WAIT_TIME_SMS_RECEIVE,
91        expected_result=True):
92        """Make MO/MT SMS/MMS at specific slot.
93
94        Args:
95            ad_mo: Android object of the device sending SMS/MMS
96            ad_mt: Android object of the device receiving SMS/MMS
97            mo_sub_id: Sub ID of MO device
98            mt_sub_id: Sub ID of MT device
99            max_wait_time: Max wait time before SMS/MMS is received.
100            expected_result: True for successful sending/receiving and False on
101                             the contrary
102
103        Returns:
104            True if the result matches expected_result and False on the
105            contrary.
106        """
107
108        if msg == "SMS":
109            for length in self.message_lengths:
110                message_array = [rand_ascii_str(length)]
111                if not sms_send_receive_verify_for_subscription(
112                    self.log,
113                    ad_mo,
114                    ad_mt,
115                    mo_sub_id,
116                    mt_sub_id,
117                    message_array,
118                    max_wait_time):
119                    ad_mo.log.warning(
120                        "%s of length %s test failed", msg, length)
121                    return False
122                else:
123                    ad_mo.log.info(
124                        "%s of length %s test succeeded", msg, length)
125            self.log.info("%s test of length %s characters succeeded.",
126                msg, self.message_lengths)
127
128        elif msg == "MMS":
129            for length in self.message_lengths:
130                message_array = [("Test Message", rand_ascii_str(length), None)]
131
132                if not mms_send_receive_verify(
133                    self.log,
134                    ad_mo,
135                    ad_mt,
136                    message_array,
137                    max_wait_time,
138                    expected_result):
139                    self.log.warning("%s of body length %s test failed",
140                        msg, length)
141                    return False
142                else:
143                    self.log.info(
144                        "%s of body length %s test succeeded", msg, length)
145            self.log.info("%s test of body lengths %s succeeded",
146                          msg, self.message_lengths)
147        return True
148
149    def _test_dds_switch_during_data_transfer(
150        self,
151        slot_0_nw_gen="volte",
152        slot_1_nw_gen="volte",
153        call_slot=0,
154        call_direction=None,
155        call_or_sms_or_mms="call",
156        streaming=True,
157        is_airplane_mode=False,
158        wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED]):
159        """Switch DDS and make voice call (VoLTE/WFC/CS call)/SMS/MMS together
160        with Youtube playing after each DDS switch at specific slot in specific
161        RAT.
162
163        Test step:
164            1. Get sub ID of each slot of the primary device.
165            2. Set up phones in desired RAT.
166            3. Switch DDS to slot 0.
167            4. Check HTTP connection after DDS switch.
168            5. Play Youtube.
169            6. Make voice call (VoLTE/WFC/CS call)/SMS/MMS
170            7. Switch DDS to slot 1 and repeat step 4-6.
171            8. Switch DDS to slot 0 again and repeat step 4-6.
172
173        Args:
174            1, slot_0_nw_gen: Network generation of slot 0 on the primary device
175            2, slot_1_nw_gen: Network generation of slot 1 on the primary device
176            3. call_slot: Slot for making voice call
177            4. call_direction: "mo" or "mt" or None to stoping making call.
178            5. call_or_sms_or_mms: Voice call or SMS or MMS
179            6. streaming: True for playing Youtube after DDS switch and False on
180                the contrary.
181            7. is_airplane_mode: True of False for WFC setup
182            8. wfc_mode: Cellular preferred or Wi-Fi preferred.
183
184        Returns:
185            True or False
186        """
187        ad = self.android_devices[0]
188        slot_0_subid = get_subid_from_slot_index(self.log, ad, 0)
189        slot_1_subid = get_subid_from_slot_index(self.log, ad, 1)
190
191        if slot_0_subid == INVALID_SUB_ID or slot_1_subid == INVALID_SUB_ID:
192            ad.log.error("Not all slots have valid sub ID.")
193            raise signals.TestFailure("Failed",
194                extras={"fail_reason": "Not all slots have valid sub ID"})
195
196        ad.log.info(
197            "Step 0: Set up phone in desired RAT (slot 0: %s, slot 1: %s)",
198            slot_0_nw_gen, slot_1_nw_gen)
199
200        if not phone_setup_on_rat(
201            self.log,
202            ad,
203            slot_0_nw_gen,
204            slot_0_subid,
205            is_airplane_mode,
206            wfc_mode[0],
207            self.wifi_network_ssid,
208            self.wifi_network_pass):
209
210            self.log.error("Phone Failed to Set Up Properly.")
211            self.tel_logger.set_result(CallResult("CALL_SETUP_FAILURE"))
212            raise signals.TestFailure("Failed",
213                extras={"fail_reason": "Phone Failed to Set Up Properly."})
214
215        if not phone_setup_on_rat(
216            self.log,
217            ad,
218            slot_1_nw_gen,
219            slot_1_subid,
220            is_airplane_mode,
221            wfc_mode[1],
222            self.wifi_network_ssid,
223            self.wifi_network_pass):
224
225            self.log.error("Phone Failed to Set Up Properly.")
226            self.tel_logger.set_result(CallResult("CALL_SETUP_FAILURE"))
227            raise signals.TestFailure("Failed",
228                extras={"fail_reason": "Phone Failed to Set Up Properly."})
229
230        is_slot0_in_call = is_phone_in_call_on_rat(
231            self.log, ad, slot_0_nw_gen, True)
232        is_slot1_in_call = is_phone_in_call_on_rat(
233            self.log, ad, slot_1_nw_gen, True)
234
235        for attempt in range(3):
236            if attempt != 0:
237                ad.log.info("Repeat step 1 to 4.")
238
239            ad.log.info("Step 1: Switch DDS.")
240            if attempt % 2 == 0:
241                set_dds_on_slot_0(ad)
242            else:
243                set_dds_on_slot_1(ad)
244
245            ad.log.info("Step 2: Check HTTP connection after DDS switch.")
246            if not verify_http_connection(self.log, ad):
247                ad.log.error("Failed to verify http connection.")
248                return False
249            else:
250                ad.log.info("Verify http connection successfully.")
251
252            if streaming:
253                ad.log.info("Step 3: Start Youtube streaming.")
254                if not start_youtube_video(ad):
255                    ad.log.warning("Fail to bring up youtube video")
256                time.sleep(10)
257            else:
258                ad.log.info("Step 3: Skip Youtube streaming.")
259
260            if not call_direction:
261                return True
262            else:
263                expected_result = True
264                if call_direction == "mo":
265                    ad_mo = self.android_devices[0]
266                    ad_mt = self.android_devices[1]
267                    mo_sub_id = get_subid_from_slot_index(self.log, ad, call_slot)
268                    if call_or_sms_or_mms == "call":
269                        set_voice_sub_id(ad_mo, mo_sub_id)
270                        _, mt_sub_id, _ = get_subid_on_same_network_of_host_ad(
271                            self.android_devices)
272
273                        if call_slot == 0:
274                            is_mo_in_call = is_slot0_in_call
275                        elif call_slot == 1:
276                            is_mo_in_call = is_slot1_in_call
277                        is_mt_in_call = None
278
279                    elif call_or_sms_or_mms == "sms":
280                        set_message_subid(ad_mo, mo_sub_id)
281                        _, mt_sub_id, _ = get_subid_on_same_network_of_host_ad(
282                            self.android_devices, type="sms")
283                        set_message_subid(ad_mt, mt_sub_id)
284
285                    elif call_or_sms_or_mms == "mms":
286                        current_data_sub_id = get_default_data_sub_id(ad_mo)
287                        if mo_sub_id != current_data_sub_id:
288                            ad_mo.log.warning(
289                                "Current data sub ID (%s) does not match"
290                                " message sub ID (%s). MMS should NOT be sent.",
291                                current_data_sub_id, mo_sub_id)
292                            expected_result = False
293                        set_message_subid(ad_mo, mo_sub_id)
294                        _, mt_sub_id, _ = get_subid_on_same_network_of_host_ad(
295                            self.android_devices, type="sms")
296                        set_message_subid(ad_mt, mt_sub_id)
297                        set_subid_for_data(ad_mt, mt_sub_id)
298                        ad_mt.droid.telephonyToggleDataConnection(True)
299
300                elif call_direction == "mt":
301                    ad_mo = self.android_devices[1]
302                    ad_mt = self.android_devices[0]
303                    mt_sub_id = get_subid_from_slot_index(self.log, ad, call_slot)
304                    if call_or_sms_or_mms == "call":
305                        set_voice_sub_id(ad_mt, mt_sub_id)
306                        _, mo_sub_id, _ = get_subid_on_same_network_of_host_ad(
307                            self.android_devices)
308
309                        if call_slot == 0:
310                            is_mt_in_call = is_slot0_in_call
311                        elif call_slot == 1:
312                            is_mt_in_call = is_slot1_in_call
313                        is_mo_in_call = None
314
315                    elif call_or_sms_or_mms == "sms":
316                        set_message_subid(ad_mt, mt_sub_id)
317                        _, mo_sub_id, _ = get_subid_on_same_network_of_host_ad(
318                            self.android_devices, type="sms")
319                        set_message_subid(ad_mo, mo_sub_id)
320
321                    elif call_or_sms_or_mms == "mms":
322                        current_data_sub_id = get_default_data_sub_id(ad_mt)
323                        if mt_sub_id != current_data_sub_id:
324                            ad_mt.log.warning(
325                                "Current data sub ID (%s) does not match"
326                                " message sub ID (%s). MMS should NOT be"
327                                " received.", current_data_sub_id, mt_sub_id)
328                            expected_result = False
329                        set_message_subid(ad_mt, mt_sub_id)
330                        _, mo_sub_id, _ = get_subid_on_same_network_of_host_ad(
331                            self.android_devices, type="sms")
332                        set_message_subid(ad_mo, mo_sub_id)
333                        set_subid_for_data(ad_mo, mo_sub_id)
334                        ad_mo.droid.telephonyToggleDataConnection(True)
335
336                if call_or_sms_or_mms == "call":
337                    self.log.info("Step 4: Make voice call.")
338                    mo_slot = get_slot_index_from_subid(
339                        self.log, ad_mo, mo_sub_id)
340                    mt_slot = get_slot_index_from_subid(
341                        self.log, ad_mt, mt_sub_id)
342                    result = two_phone_call_msim_for_slot(
343                        self.log,
344                        ad_mo,
345                        mo_slot,
346                        None,
347                        is_mo_in_call,
348                        ad_mt,
349                        mt_slot,
350                        None,
351                        is_mt_in_call)
352                    self.tel_logger.set_result(result.result_value)
353
354                    if not result:
355                        self.log.error(
356                            "Failed to make MO call from %s slot %s to %s"
357                            " slot %s", ad_mo.serial, mo_slot, ad_mt.serial,
358                            mt_slot)
359                        raise signals.TestFailure("Failed",
360                            extras={"fail_reason": str(result.result_value)})
361                else:
362                    self.log.info("Step 4: Send %s.", call_or_sms_or_mms)
363                    if call_or_sms_or_mms == "sms":
364                        result = self._msim_message_test(
365                            ad_mo,
366                            ad_mt,
367                            mo_sub_id,
368                            mt_sub_id,
369                            msg=call_or_sms_or_mms.upper())
370                    elif call_or_sms_or_mms == "mms":
371                        result = self._msim_message_test(
372                            ad_mo,
373                            ad_mt,
374                            mo_sub_id,
375                            mt_sub_id,
376                            msg=call_or_sms_or_mms.upper(),
377                            expected_result=expected_result)
378                    if not result:
379                        log_messaging_screen_shot(
380                            ad_mo, test_name="%s_tx" % call_or_sms_or_mms)
381                        log_messaging_screen_shot(
382                            ad_mt, test_name="%s_rx" % call_or_sms_or_mms)
383
384                        return False
385        return True
386
387    def _test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
388        self,
389        slot_0_nw_gen="volte",
390        slot_1_nw_gen="volte",
391        call_slot=0,
392        call_direction=None,
393        streaming=True,
394        airplane_mode_cycling=False,
395        cellular_data_cycling=False,
396        wifi_cycling=False,
397        enable_volte=[True, True],
398        enable_wfc=[True, True],
399        wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
400        is_airplane_mode=False,
401        is_wifi_connected=False):
402        """Switch DDS and make VoLTE/WFC call together with Youtube playing
403        after each DDS switch at specific slot in specific RAT.
404
405        Test step:
406            1. Get sub ID of each slot of the primary device.
407            2. Set up phones in desired RAT.
408            3. Toggle on/off VoLTE/WFC and set WFC mode.
409            4. Airplane mode or cellular data or Wi-Fi cycling.
410            5. Switch DDS to slot 0.
411            6. Check HTTP connection after DDS switch.
412            7. Play Youtube.
413            8. Make VoLTE or WFC call.
414            9. Switch DDS to slot 1 and repeat step 6-8.
415            10. Switch DDS to slot 0 again and repeat step 6-8.
416
417        Args:
418            1, slot_0_nw_gen: Network generation of slot 0 on the primary device
419            2, slot_1_nw_gen: Network generation of slot 1 on the primary device
420            3. call_slot: Slot for making voice call
421            4. call_direction: "mo" or "mt" or None to stoping making call.
422            5. streaming: True for playing Youtube after DDS switch and False on
423                the contrary.
424            6. airplane_mode_cycling: True for cycling airplane
425            7. cellular_data_cycling: True for cycling cellular data
426            8. wifi_cycling: True for cycling Wi-Fi
427            9. enable_volte: True for enabling and False for disabling VoLTE for
428               each slot on the primary device
429            10. enable_wfc: True for enabling and False for disabling WFC for
430                each slot on the primary device
431            11. wfc_mode: Cellular preferred or Wi-Fi preferred.
432            12. is_airplane_mode: True of False for WFC setup
433
434        Returns:
435            True or False
436        """
437        ad = self.android_devices[0]
438        slot_0_subid = get_subid_from_slot_index(self.log, ad, 0)
439        slot_1_subid = get_subid_from_slot_index(self.log, ad, 1)
440
441        if slot_0_subid == INVALID_SUB_ID or slot_1_subid == INVALID_SUB_ID:
442            ad.log.error("Not all slots have valid sub ID.")
443            raise signals.TestFailure("Failed",
444                extras={"fail_reason": "Not all slots have valid sub ID"})
445
446        ad.log.info(
447            "Step 0: Set up phone in desired RAT (slot 0: %s, slot 1: %s)",
448            slot_0_nw_gen, slot_1_nw_gen)
449
450        if not phone_setup_on_rat(
451            self.log,
452            ad,
453            slot_0_nw_gen,
454            slot_0_subid,
455            is_airplane_mode,
456            wfc_mode[0],
457            self.wifi_network_ssid,
458            self.wifi_network_pass):
459
460            self.log.error("Phone Failed to Set Up Properly.")
461            self.tel_logger.set_result(CallResult("CALL_SETUP_FAILURE"))
462            raise signals.TestFailure("Failed",
463                extras={"fail_reason": "Phone Failed to Set Up Properly."})
464
465        if not phone_setup_on_rat(
466            self.log,
467            ad,
468            slot_1_nw_gen,
469            slot_1_subid,
470            is_airplane_mode,
471            wfc_mode[1],
472            self.wifi_network_ssid,
473            self.wifi_network_pass):
474
475            self.log.error("Phone Failed to Set Up Properly.")
476            self.tel_logger.set_result(CallResult("CALL_SETUP_FAILURE"))
477            raise signals.TestFailure("Failed",
478                extras={"fail_reason": "Phone Failed to Set Up Properly."})
479
480        is_slot0_in_call = is_phone_in_call_on_rat(
481            self.log, ad, slot_0_nw_gen, True)
482        is_slot1_in_call = is_phone_in_call_on_rat(
483            self.log, ad, slot_1_nw_gen, True)
484
485        if is_wifi_connected:
486            if not ensure_wifi_connected(
487                self.log,
488                ad,
489                self.wifi_network_ssid,
490                self.wifi_network_pass,
491                apm=False):
492                return False
493            time.sleep(5)
494
495        ad.log.info("Step 1: Enable/disable VoLTE and WFC.")
496        for sub_id, volte in zip([slot_0_subid, slot_1_subid], enable_volte):
497            if not toggle_volte_for_subscription(
498                self.log,
499                ad,
500                sub_id,
501                new_state=volte):
502                return False
503
504        for sub_id, wfc, mode in \
505            zip([slot_0_subid, slot_1_subid], enable_wfc, wfc_mode):
506            if not toggle_wfc_for_subscription(self.log, ad, new_state=wfc, sub_id=sub_id):
507                return False
508            if not set_wfc_mode_for_subscription(ad, mode, sub_id=sub_id):
509                return False
510
511        if airplane_mode_cycling:
512            ad.log.info("Step 2: Airplane mode cycling.")
513            ad.log.info("Step 2-1: Toggle on airplane mode.")
514            if not toggle_airplane_mode(self.log, ad, True):
515                ad.log.error("Failed to toggle on airplane mode.")
516                return False
517            time.sleep(5)
518            ad.log.info("Step 2-2: Toggle off airplane mode.")
519            if not toggle_airplane_mode(self.log, ad, False):
520                ad.log.error("Failed to toggle off airplane mode.")
521                return False
522
523            if is_airplane_mode:
524                time.sleep(5)
525                ad.log.info("Step 2-3: Toggle on airplane mode again.")
526                if not toggle_airplane_mode(self.log, ad, True):
527                    ad.log.error("Failed to toggle on airplane mode.")
528                    return False
529
530                if wfc_mode[0] or wfc_mode[1]:
531                    time.sleep(5)
532                    ad.log.info("Step 2-4: Toggle on Wi-Fi again.")
533                    if not ensure_wifi_connected(
534                        self.log,
535                        ad,
536                        self.wifi_network_ssid,
537                        self.wifi_network_pass,
538                        apm=is_airplane_mode):
539                        return False
540                    time.sleep(5)
541
542        if cellular_data_cycling:
543            if call_slot == 0:
544                sub_id = slot_0_subid
545            elif call_slot == 1:
546                sub_id = slot_1_subid
547            ad.log.info("Step 2: Cellular data cycling")
548            ad.log.info("Step 2-1: Toggle off cellular data.")
549            ad.droid.telephonyToggleDataConnection(False)
550            if not check_is_wifi_connected(
551                self.log,
552                ad,
553                self.wifi_network_ssid):
554                if not wait_for_cell_data_connection_for_subscription(
555                        self.log, ad, sub_id, False):
556                    ad.log.error("Failed to disable cellular data")
557                    return False
558
559                if not verify_internet_connection(
560                    self.log,
561                    ad,
562                    expected_state=False):
563                    ad.log.error("Internet still accessible when cellular data"
564                    " is disabled.")
565                    return False
566            time.sleep(5)
567            ad.log.info("Step 2-2: Toggle on cellular data.")
568            ad.droid.telephonyToggleDataConnection(True)
569            if not check_is_wifi_connected(
570                self.log,
571                ad,
572                self.wifi_network_ssid):
573                if not wait_for_cell_data_connection_for_subscription(
574                        self.log, ad, sub_id, True):
575                    ad.log.error("Failed to enable cellular data")
576                    return False
577                if not verify_internet_connection(self.log, ad, retries=3):
578                    ad.log.error(
579                        "Internet inaccessible when cellular data is enabled.")
580                    return False
581
582        if wifi_cycling:
583            ad.log.info("Step 2: Wi-Fi cycling")
584            ad.log.info("Step 2-1: Toggle on Wi-Fi.")
585            if not ensure_wifi_connected(
586                self.log,
587                ad,
588                self.wifi_network_ssid,
589                self.wifi_network_pass,
590                apm=is_airplane_mode):
591                return False
592            time.sleep(5)
593            ad.log.info("Step 2-2: Toggle off Wi-Fi.")
594            ad.droid.wifiToggleState(False)
595            time.sleep(5)
596
597            if (call_slot == 0 and slot_0_nw_gen == "wfc") or \
598                (call_slot == 1 and slot_1_nw_gen == "wfc") or is_wifi_connected:
599                if not ensure_wifi_connected(
600                    self.log,
601                    ad,
602                    self.wifi_network_ssid,
603                    self.wifi_network_pass,
604                    apm=is_airplane_mode):
605                    return False
606
607        for attempt in range(3):
608            if attempt != 0:
609                ad.log.info("Repeat step 1 to 4.")
610
611            ad.log.info("Step 3: Switch DDS.")
612            if attempt % 2 == 0:
613                set_dds_on_slot_0(ad)
614            else:
615                set_dds_on_slot_1(ad)
616
617            ad.log.info("Step 4: Check HTTP connection after DDS switch.")
618            if not verify_http_connection(self.log, ad):
619                ad.log.error("Failed to verify http connection.")
620                return False
621            else:
622                ad.log.info("Verify http connection successfully.")
623
624            if streaming:
625                ad.log.info("Step 5: Start Youtube streaming.")
626                if not start_youtube_video(ad):
627                    ad.log.warning("Fail to bring up youtube video")
628                time.sleep(10)
629            else:
630                ad.log.info("Step 5: Skip Youtube streaming.")
631
632            if not call_direction:
633                return True
634            else:
635                if call_direction == "mo":
636                    ad_mo = self.android_devices[0]
637                    ad_mt = self.android_devices[1]
638                    mo_sub_id = get_subid_from_slot_index(self.log, ad, call_slot)
639
640                    set_voice_sub_id(ad_mo, mo_sub_id)
641                    _, mt_sub_id, _ = get_subid_on_same_network_of_host_ad(
642                        self.android_devices)
643
644                    if call_slot == 0:
645                        is_mo_in_call = is_slot0_in_call
646                    elif call_slot == 1:
647                        is_mo_in_call = is_slot1_in_call
648                    is_mt_in_call = None
649
650                elif call_direction == "mt":
651                    ad_mo = self.android_devices[1]
652                    ad_mt = self.android_devices[0]
653                    mt_sub_id = get_subid_from_slot_index(self.log, ad, call_slot)
654
655                    set_voice_sub_id(ad_mt, mt_sub_id)
656                    _, mo_sub_id, _ = get_subid_on_same_network_of_host_ad(
657                        self.android_devices)
658
659                    if call_slot == 0:
660                        is_mt_in_call = is_slot0_in_call
661                    elif call_slot == 1:
662                        is_mt_in_call = is_slot1_in_call
663                    is_mo_in_call = None
664
665                if (call_slot == 0 and slot_0_nw_gen == "wfc") or \
666                    (call_slot == 1 and slot_1_nw_gen == "wfc"):
667                    if not wait_for_wfc_enabled(self.log, ad):
668                        return False
669
670                self.log.info("Step 6: Make voice call.")
671                mo_slot = get_slot_index_from_subid(self.log, ad_mo, mo_sub_id)
672                mt_slot = get_slot_index_from_subid(self.log, ad_mt, mt_sub_id)
673                result = two_phone_call_msim_for_slot(
674                    self.log,
675                    ad_mo,
676                    mo_slot,
677                    None,
678                    is_mo_in_call,
679                    ad_mt,
680                    mt_slot,
681                    None,
682                    is_mt_in_call)
683                self.tel_logger.set_result(result.result_value)
684
685                if not result:
686                    self.log.error(
687                        "Failed to make MO call from %s slot %s to %s slot %s",
688                        ad_mo.serial, mo_slot, ad_mt.serial, mt_slot)
689                    raise signals.TestFailure("Failed",
690                        extras={"fail_reason": str(result.result_value)})
691
692        return True
693
694    def _test_dds_switch_volte_cycling(self, slot=0):
695        """ VoLTE cycling after DDS switch.
696
697        Test steps:
698            1. Enable VoLTE.
699            2. Disable VoLTE.
700            3. Switch DDS to slot 0.
701            4. Check HTTP connection after DDS switch.
702            5. Enable VoLTE again.
703            6. Check if IMS can be registered successfully and if VoLTE is
704               available.
705            7. Repeat steps 2-6 for 2 times and each time DDS should be switched
706               to another slot.
707
708        Args:
709            slot: slot to be tested
710
711        Returns:
712            True or False
713        """
714        ad = self.android_devices[0]
715        slot_0_subid = get_subid_from_slot_index(self.log, ad, 0)
716        slot_1_subid = get_subid_from_slot_index(self.log, ad, 1)
717
718        if slot == 0:
719            sub_id = slot_0_subid
720        elif slot == 1:
721            sub_id = slot_1_subid
722
723        ad.log.info("Step 1: Enable VoLTE for sub ID %s.", sub_id)
724        if not phone_setup_volte_for_subscription(self.log, ad, sub_id):
725            return False
726
727        for attempt in range(3):
728            if attempt != 0:
729                ad.log.info("Repeat step 2 to 4.")
730
731            ad.log.info("Step 2-1: Disable VoLTE for sub ID %s.", sub_id)
732            if not toggle_volte_for_subscription(
733                self.log, ad, sub_id, new_state=False):
734                return False
735
736            ad.log.info(
737                "Step 2-2: Ensure VoLTE is disabled for sub ID %s.", sub_id)
738            if is_volte_enabled(self.log, ad, sub_id):
739                return False
740
741            ad.log.info("Step 3: Switch DDS.")
742            if attempt % 2 == 0:
743                set_dds_on_slot_0(ad)
744            else:
745                set_dds_on_slot_1(ad)
746
747            ad.log.info("Step 4: Check HTTP connection after DDS switch.")
748            if not verify_http_connection(self.log, ad):
749                ad.log.error("Failed to verify http connection.")
750                return False
751            else:
752                ad.log.info("Verify http connection successfully.")
753
754            ad.log.info(
755                "Step 5: Enable VoLTE again after DDS switch for sub ID %s.",
756                sub_id)
757            if not phone_setup_volte_for_subscription(self.log, ad, sub_id):
758                return False
759
760        return True
761
762    @test_tracker_info(uuid="06908fb0-aaaa-4c95-b073-ea5ba8977050")
763    @TelephonyBaseTest.tel_test_wrap
764    def test_dds_switch_when_volte_enabled(self):
765        ad = self.android_devices[0]
766        slot_0_subid = get_subid_from_slot_index(self.log, ad, 0)
767        slot_1_subid = get_subid_from_slot_index(self.log, ad, 1)
768
769        ad.log.info("Step 0: Ensure VoLTE is enabled as initial condition.")
770        if not phone_setup_volte_for_subscription(self.log, ad, slot_0_subid):
771            return False
772        if not phone_setup_volte_for_subscription(self.log, ad, slot_1_subid):
773            return False
774
775        for attempt in range(3):
776            ad.log.info("Step 1: Switch DDS.")
777            if attempt % 2 == 0:
778                set_dds_on_slot_0(ad)
779            else:
780                set_dds_on_slot_1(ad)
781
782            ad.log.info("Step 2: Check HTTP connection after DDS switch.")
783            if not verify_http_connection(self.log, ad):
784                ad.log.error("Failed to verify http connection.")
785                return False
786            else:
787                ad.log.info("Verify http connection successfully.")
788
789            ad.log.info("Step 3: Ensure VoLTE is still enabled after DDS"
790                " switch.")
791            if not phone_setup_volte_for_subscription(
792                self.log, ad, slot_0_subid):
793                return False
794            if not phone_setup_volte_for_subscription(
795                self.log, ad, slot_1_subid):
796                return False
797        return True
798
799    @test_tracker_info(uuid="6b41d84c-4485-47b0-a5d8-eac16ed36258")
800    @TelephonyBaseTest.tel_test_wrap
801    def test_dds_switch_and_reboot_when_volte_enabled(self):
802        ad = self.android_devices[0]
803        slot_0_subid = get_subid_from_slot_index(self.log, ad, 0)
804        slot_1_subid = get_subid_from_slot_index(self.log, ad, 1)
805
806        ad.log.info("Step 0: Ensure VoLTE is enabled as initial condition.")
807        if not phone_setup_volte_for_subscription(self.log, ad, slot_0_subid):
808            return False
809        if not phone_setup_volte_for_subscription(self.log, ad, slot_1_subid):
810            return False
811
812        for attempt in range(3):
813            ad.log.info("Step 1: Switch DDS.")
814            if attempt % 2 == 0:
815                set_dds_on_slot_0(ad)
816            else:
817                set_dds_on_slot_1(ad)
818
819            ad.log.info("Step 2: Check HTTP connection after DDS switch.")
820            if not verify_http_connection(self.log, ad):
821                ad.log.error("Failed to verify http connection.")
822                return False
823            else:
824                ad.log.info("Verify http connection successfully.")
825
826            ad.log.info("Step 3: Reboot.")
827            if not reboot_test(self.log, ad):
828                return False
829
830            ad.log.info("Step 4: Ensure VoLTE is still enabled after DDS"
831                " switch.")
832            if not phone_setup_volte_for_subscription(
833                self.log, ad, slot_0_subid):
834                return False
835            if not phone_setup_volte_for_subscription(
836                self.log, ad, slot_1_subid):
837                return False
838        return True
839
840    @test_tracker_info(uuid="bb440f33-ab0d-4999-885c-5c1f933430c4")
841    @TelephonyBaseTest.tel_test_wrap
842    def test_dds_switch_when_volte_cycling_psim(self):
843        return self._test_dds_switch_volte_cycling(slot=0)
844
845    @test_tracker_info(uuid="cbd5a4ae-be37-4435-b9db-fe58e8fdac5f")
846    @TelephonyBaseTest.tel_test_wrap
847    def test_dds_switch_when_volte_cycling_esim(self):
848        return self._test_dds_switch_volte_cycling(slot=1)
849
850
851    @test_tracker_info(uuid="2df5faf9-8318-4acb-9068-e6ec0481c2ca")
852    @TelephonyBaseTest.tel_test_wrap
853    def test_dds_switch_youtube_volte(self):
854        return self._test_dds_switch_during_data_transfer(
855            slot_0_nw_gen="volte",
856            slot_1_nw_gen="volte")
857
858    @test_tracker_info(uuid="eb73506e-c604-48df-be04-9b602a801afc")
859    @TelephonyBaseTest.tel_test_wrap
860    def test_dds_switch_youtube_and_voice_call_mo_volte_psim(self):
861        return self._test_dds_switch_during_data_transfer(
862            slot_0_nw_gen="volte",
863            slot_1_nw_gen="volte",
864            call_slot=0,
865            call_direction="mo")
866
867    @test_tracker_info(uuid="2e2feab1-65a8-40a7-8666-0c46cb3411a4")
868    @TelephonyBaseTest.tel_test_wrap
869    def test_dds_switch_youtube_and_voice_call_mo_volte_esim(self):
870        return self._test_dds_switch_during_data_transfer(
871            slot_0_nw_gen="volte",
872            slot_1_nw_gen="volte",
873            call_slot=1,
874            call_direction="mo")
875
876    @test_tracker_info(uuid="f2a7d62c-1f54-4081-b7bb-4782c5482b41")
877    @TelephonyBaseTest.tel_test_wrap
878    def test_dds_switch_youtube_and_voice_call_mt_volte_psim(self):
879        return self._test_dds_switch_during_data_transfer(
880            slot_0_nw_gen="volte",
881            slot_1_nw_gen="volte",
882            call_slot=0,
883            call_direction="mt")
884
885    @test_tracker_info(uuid="df211078-b260-499d-8f7e-86cad039c5f5")
886    @TelephonyBaseTest.tel_test_wrap
887    def test_dds_switch_youtube_and_voice_call_mt_volte_esim(self):
888        return self._test_dds_switch_during_data_transfer(
889            slot_0_nw_gen="volte",
890            slot_1_nw_gen="volte",
891            call_slot=1,
892            call_direction="mt")
893
894    @test_tracker_info(uuid="bd77782d-f43d-40c6-9982-47cd452d980f")
895    @TelephonyBaseTest.tel_test_wrap
896    def test_dds_switch_youtube_and_voice_call_mo_csfb_psim(self):
897        return self._test_dds_switch_during_data_transfer(
898            slot_0_nw_gen="csfb",
899            slot_1_nw_gen="csfb",
900            call_slot=0,
901            call_direction="mo")
902
903    @test_tracker_info(uuid="361a6f69-e6ea-4013-960d-732931fcd130")
904    @TelephonyBaseTest.tel_test_wrap
905    def test_dds_switch_youtube_and_voice_call_mo_csfb_esim(self):
906        return self._test_dds_switch_during_data_transfer(
907            slot_0_nw_gen="csfb",
908            slot_1_nw_gen="csfb",
909            call_slot=1,
910            call_direction="mo")
911
912    @test_tracker_info(uuid="26186d4f-0b0d-41c5-ab91-04e9851461f0")
913    @TelephonyBaseTest.tel_test_wrap
914    def test_dds_switch_youtube_and_voice_call_mt_csfb_psim(self):
915        return self._test_dds_switch_during_data_transfer(
916            slot_0_nw_gen="csfb",
917            slot_1_nw_gen="csfb",
918            call_slot=0,
919            call_direction="mt")
920
921    @test_tracker_info(uuid="7d31c644-a470-4eb9-b272-f0cfc34d23cb")
922    @TelephonyBaseTest.tel_test_wrap
923    def test_dds_switch_youtube_and_voice_call_mt_csfb_esim(self):
924        return self._test_dds_switch_during_data_transfer(
925            slot_0_nw_gen="csfb",
926            slot_1_nw_gen="csfb",
927            call_slot=1,
928            call_direction="mt")
929
930    @test_tracker_info(uuid="614076a6-b042-45f3-84fe-c84591e02f78")
931    @TelephonyBaseTest.tel_test_wrap
932    def test_dds_switch_youtube_and_sms_volte(self):
933        result = True
934        self.log.info("Scenario 1: MO SMS at slot 0")
935        if not self._test_dds_switch_during_data_transfer(
936            slot_0_nw_gen="volte",
937            slot_1_nw_gen="volte",
938            call_slot=0,
939            call_direction="mo",
940            call_or_sms_or_mms="sms"):
941            result = False
942        self.log.info("Scenario 2: MO SMS at slot 1")
943        if not self._test_dds_switch_during_data_transfer(
944            slot_0_nw_gen="volte",
945            slot_1_nw_gen="volte",
946            call_slot=1,
947            call_direction="mo",
948            call_or_sms_or_mms="sms"):
949            result = False
950        self.log.info("Scenario 3: MT SMS at slot 0")
951        if not self._test_dds_switch_during_data_transfer(
952            slot_0_nw_gen="volte",
953            slot_1_nw_gen="volte",
954            call_slot=0,
955            call_direction="mt",
956            call_or_sms_or_mms="sms"):
957            result = False
958        self.log.info("Scenario 4: MT SMS at slot 1")
959        if not self._test_dds_switch_during_data_transfer(
960            slot_0_nw_gen="volte",
961            slot_1_nw_gen="volte",
962            call_slot=1,
963            call_direction="mt",
964            call_or_sms_or_mms="sms"):
965            result = False
966        return result
967
968    @test_tracker_info(uuid="5e61f007-7b01-4dee-ac2d-fd2225ac3dbd")
969    @TelephonyBaseTest.tel_test_wrap
970    def test_dds_switch_youtube_and_mms_volte(self):
971        result = True
972        self.log.info("Scenario 1: MO MMS at slot 0")
973        if not self._test_dds_switch_during_data_transfer(
974            slot_0_nw_gen="volte",
975            slot_1_nw_gen="volte",
976            call_slot=0,
977            call_direction="mo",
978            call_or_sms_or_mms="mms"):
979            result = False
980        self.log.info("Scenario 2: MO MMS at slot 1")
981        if not self._test_dds_switch_during_data_transfer(
982            slot_0_nw_gen="volte",
983            slot_1_nw_gen="volte",
984            call_slot=1,
985            call_direction="mo",
986            call_or_sms_or_mms="mms"):
987            result = False
988        self.log.info("Scenario 3: MT MMS at slot 0")
989        if not self._test_dds_switch_during_data_transfer(
990            slot_0_nw_gen="volte",
991            slot_1_nw_gen="volte",
992            call_slot=0,
993            call_direction="mt",
994            call_or_sms_or_mms="mms"):
995            result = False
996        self.log.info("Scenario 4: MT MMS at slot 1")
997        if not self._test_dds_switch_during_data_transfer(
998            slot_0_nw_gen="volte",
999            slot_1_nw_gen="volte",
1000            call_slot=1,
1001            call_direction="mt",
1002            call_or_sms_or_mms="mms"):
1003            result = False
1004        return result
1005
1006    @test_tracker_info(uuid="47b9bf08-2c17-4646-b1d3-3d191318bc0d")
1007    @TelephonyBaseTest.tel_test_wrap
1008    def test_dds_switch_voice_call_mo_volte_psim(self):
1009        return self._test_dds_switch_during_data_transfer(
1010            "volte", "volte", 0, "mo", "call", False)
1011
1012    @test_tracker_info(uuid="eef31675-f0a3-4086-8474-d67614ede507")
1013    @TelephonyBaseTest.tel_test_wrap
1014    def test_dds_switch_voice_call_mo_volte_esim(self):
1015        return self._test_dds_switch_during_data_transfer(
1016            "volte", "volte", 1, "mo", "call", False)
1017
1018    @test_tracker_info(uuid="ce8b6ce8-d314-49ca-bead-391c15809235")
1019    @TelephonyBaseTest.tel_test_wrap
1020    def test_dds_switch_voice_call_mt_volte_psim(self):
1021        return self._test_dds_switch_during_data_transfer(
1022            "volte", "volte", 0, "mt", "call", False)
1023
1024    @test_tracker_info(uuid="64c941e0-fcab-43ca-a988-f667398f1997")
1025    @TelephonyBaseTest.tel_test_wrap
1026    def test_dds_switch_voice_call_mt_volte_esim(self):
1027        return self._test_dds_switch_during_data_transfer(
1028            "volte", "volte", 1, "mt", "call", False)
1029
1030    @test_tracker_info(uuid="28963e86-f8ce-4324-8ce8-8e6628fd2d99")
1031    @TelephonyBaseTest.tel_test_wrap
1032    def test_dds_switch_sms_volte(self):
1033        result = True
1034        self.log.info("Scenario 1: MO SMS at slot 0")
1035        if not self._test_dds_switch_during_data_transfer(
1036            "volte", "volte", 0, "mo", "sms", False):
1037            result = False
1038        self.log.info("Scenario 2: MO SMS at slot 1")
1039        if not self._test_dds_switch_during_data_transfer(
1040            "volte", "volte", 1, "mo", "sms", False):
1041            result = False
1042        self.log.info("Scenario 3: MT SMS at slot 0")
1043        if not self._test_dds_switch_during_data_transfer(
1044            "volte", "volte", 0, "mt", "sms", False):
1045            result = False
1046        self.log.info("Scenario 4: MT SMS at slot 1")
1047        if not self._test_dds_switch_during_data_transfer(
1048            "volte", "volte", 1, "mt", "sms", False):
1049            result = False
1050        return result
1051
1052    @test_tracker_info(uuid="915c0eb3-1a84-4eb0-8cba-cafe32c0d604")
1053    @TelephonyBaseTest.tel_test_wrap
1054    def test_dds_switch_mms_volte(self):
1055        result = True
1056        self.log.info("Scenario 1: MO MMS at slot 0")
1057        if not self._test_dds_switch_during_data_transfer(
1058            "volte", "volte", 0, "mo", "mms", False):
1059            result = False
1060        self.log.info("Scenario 2: MO MMS at slot 1")
1061        if not self._test_dds_switch_during_data_transfer(
1062            "volte", "volte", 1, "mo", "mms", False):
1063            result = False
1064        self.log.info("Scenario 3: MT MMS at slot 0")
1065        if not self._test_dds_switch_during_data_transfer(
1066            "volte", "volte", 0, "mt", "mms", False):
1067            result = False
1068        self.log.info("Scenario 4: MT MMS at slot 1")
1069        if not self._test_dds_switch_during_data_transfer(
1070            "volte", "volte", 1, "mt", "mms", False):
1071            result = False
1072        return result
1073
1074    @test_tracker_info(uuid="d58939c0-d246-453e-9eac-54152d6dc70c")
1075    @TelephonyBaseTest.tel_test_wrap
1076    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_on_apm_cycling(self):
1077        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1078            slot_0_nw_gen="volte",
1079            slot_1_nw_gen="volte",
1080            call_slot=0,
1081            call_direction="mo",
1082            streaming=True,
1083            airplane_mode_cycling=True,
1084            enable_volte=[True, True],
1085            enable_wfc=[True, True],
1086            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1087
1088    @test_tracker_info(uuid="61dfb957-6349-4190-8e63-973558b1292b")
1089    @TelephonyBaseTest.tel_test_wrap
1090    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_on_apm_cycling(self):
1091        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1092            slot_0_nw_gen="volte",
1093            slot_1_nw_gen="volte",
1094            call_slot=1,
1095            call_direction="mo",
1096            streaming=True,
1097            airplane_mode_cycling=True,
1098            enable_volte=[True, True],
1099            enable_wfc=[True, True],
1100            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1101
1102    @test_tracker_info(uuid="127377f2-973f-4758-b138-4c0dd276f893")
1103    @TelephonyBaseTest.tel_test_wrap
1104    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_on_apm_cycling(self):
1105        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1106            slot_0_nw_gen="volte",
1107            slot_1_nw_gen="volte",
1108            call_slot=0,
1109            call_direction="mt",
1110            streaming=True,
1111            airplane_mode_cycling=True,
1112            enable_volte=[True, True],
1113            enable_wfc=[True, True],
1114            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1115
1116    @test_tracker_info(uuid="a149d357-27a7-490d-a30b-70f44cd43ac7")
1117    @TelephonyBaseTest.tel_test_wrap
1118    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_on_apm_cycling(self):
1119        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1120            slot_0_nw_gen="volte",
1121            slot_1_nw_gen="volte",
1122            call_slot=1,
1123            call_direction="mt",
1124            streaming=True,
1125            airplane_mode_cycling=True,
1126            enable_volte=[True, True],
1127            enable_wfc=[True, True],
1128            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1129
1130    @test_tracker_info(uuid="8823e87c-0e4d-435d-a17f-84e1b65c1012")
1131    @TelephonyBaseTest.tel_test_wrap
1132    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_on_wifi_on_apm_cycling(self):
1133        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1134            slot_0_nw_gen="volte",
1135            slot_1_nw_gen="volte",
1136            call_slot=0,
1137            call_direction="mo",
1138            streaming=True,
1139            airplane_mode_cycling=True,
1140            enable_volte=[True, True],
1141            enable_wfc=[True, True],
1142            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1143            is_wifi_connected=True)
1144
1145    @test_tracker_info(uuid="bd038a77-baa6-483d-9af0-fe18d50d7f1f")
1146    @TelephonyBaseTest.tel_test_wrap
1147    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_on_wifi_on_apm_cycling(self):
1148        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1149            slot_0_nw_gen="volte",
1150            slot_1_nw_gen="volte",
1151            call_slot=1,
1152            call_direction="mo",
1153            streaming=True,
1154            airplane_mode_cycling=True,
1155            enable_volte=[True, True],
1156            enable_wfc=[True, True],
1157            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1158            is_wifi_connected=True)
1159
1160    @test_tracker_info(uuid="3f96fb8a-d4ee-49b8-8958-45cd509ed7b8")
1161    @TelephonyBaseTest.tel_test_wrap
1162    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_on_wifi_on_apm_cycling(self):
1163        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1164            slot_0_nw_gen="volte",
1165            slot_1_nw_gen="volte",
1166            call_slot=0,
1167            call_direction="mt",
1168            streaming=True,
1169            airplane_mode_cycling=True,
1170            enable_volte=[True, True],
1171            enable_wfc=[True, True],
1172            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1173            is_wifi_connected=True)
1174
1175    @test_tracker_info(uuid="1f89da8b-e559-4e96-afc7-0d2127616c56")
1176    @TelephonyBaseTest.tel_test_wrap
1177    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_on_wifi_on_apm_cycling(self):
1178        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1179            slot_0_nw_gen="volte",
1180            slot_1_nw_gen="volte",
1181            call_slot=1,
1182            call_direction="mt",
1183            streaming=True,
1184            airplane_mode_cycling=True,
1185            enable_volte=[True, True],
1186            enable_wfc=[True, True],
1187            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1188            is_wifi_connected=True)
1189
1190    @test_tracker_info(uuid="bc522b4d-2d26-4b5f-b82c-f92356f103d0")
1191    @TelephonyBaseTest.tel_test_wrap
1192    def test_dds_switch_voice_call_mo_wfc_psim_cellular_preferred_apm_on_with_volte_on_apm_cycling(self):
1193        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1194            slot_0_nw_gen="wfc",
1195            slot_1_nw_gen="wfc",
1196            call_slot=0,
1197            call_direction="mo",
1198            streaming=True,
1199            airplane_mode_cycling=True,
1200            enable_volte=[True, True],
1201            enable_wfc=[True, True],
1202            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1203            is_airplane_mode=True)
1204
1205    @test_tracker_info(uuid="970ccdb4-c7b3-4b56-b93b-f811407c82cb")
1206    @TelephonyBaseTest.tel_test_wrap
1207    def test_dds_switch_voice_call_mo_wfc_esim_cellular_preferred_apm_on_with_volte_on_apm_cycling(self):
1208        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1209            slot_0_nw_gen="wfc",
1210            slot_1_nw_gen="wfc",
1211            call_slot=1,
1212            call_direction="mo",
1213            streaming=True,
1214            airplane_mode_cycling=True,
1215            enable_volte=[True, True],
1216            enable_wfc=[True, True],
1217            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1218            is_airplane_mode=True)
1219
1220    @test_tracker_info(uuid="26c8b63e-631c-42d0-868b-03c2db6181b7")
1221    @TelephonyBaseTest.tel_test_wrap
1222    def test_dds_switch_voice_call_mo_wfc_psim_wifi_preferred_apm_off_with_volte_on_apm_cycling(self):
1223        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1224            slot_0_nw_gen="wfc",
1225            slot_1_nw_gen="wfc",
1226            call_slot=0,
1227            call_direction="mo",
1228            streaming=True,
1229            airplane_mode_cycling=True,
1230            enable_volte=[True, True],
1231            enable_wfc=[True, True],
1232            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1233            is_airplane_mode=False)
1234
1235    @test_tracker_info(uuid="efd73091-8667-42a3-8551-eafa497fc383")
1236    @TelephonyBaseTest.tel_test_wrap
1237    def test_dds_switch_voice_call_mo_wfc_esim_wifi_preferred_apm_off_with_volte_on_apm_cycling(self):
1238        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1239            slot_0_nw_gen="wfc",
1240            slot_1_nw_gen="wfc",
1241            call_slot=1,
1242            call_direction="mo",
1243            streaming=True,
1244            airplane_mode_cycling=True,
1245            enable_volte=[True, True],
1246            enable_wfc=[True, True],
1247            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1248            is_airplane_mode=False)
1249
1250    @test_tracker_info(uuid="618768b9-83c2-4ab7-b1fb-10a4037c5834")
1251    @TelephonyBaseTest.tel_test_wrap
1252    def test_dds_switch_voice_call_mt_wfc_psim_cellular_preferred_apm_on_with_volte_on_apm_cycling(self):
1253        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1254            slot_0_nw_gen="wfc",
1255            slot_1_nw_gen="wfc",
1256            call_slot=0,
1257            call_direction="mt",
1258            streaming=True,
1259            airplane_mode_cycling=True,
1260            enable_volte=[True, True],
1261            enable_wfc=[True, True],
1262            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1263            is_airplane_mode=True)
1264
1265    @test_tracker_info(uuid="24d695a1-7421-4038-bb07-4d81f3f6d05b")
1266    @TelephonyBaseTest.tel_test_wrap
1267    def test_dds_switch_voice_call_mt_wfc_esim_cellular_preferred_apm_on_with_volte_on_apm_cycling(self):
1268        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1269            slot_0_nw_gen="wfc",
1270            slot_1_nw_gen="wfc",
1271            call_slot=1,
1272            call_direction="mt",
1273            streaming=True,
1274            airplane_mode_cycling=True,
1275            enable_volte=[True, True],
1276            enable_wfc=[True, True],
1277            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1278            is_airplane_mode=True)
1279
1280    @test_tracker_info(uuid="2f28db8f-c0c3-4cf6-9f6f-439c9e32d9f3")
1281    @TelephonyBaseTest.tel_test_wrap
1282    def test_dds_switch_voice_call_mt_wfc_psim_wifi_preferred_apm_off_with_volte_on_apm_cycling(self):
1283        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1284            slot_0_nw_gen="wfc",
1285            slot_1_nw_gen="wfc",
1286            call_slot=0,
1287            call_direction="mt",
1288            streaming=True,
1289            airplane_mode_cycling=True,
1290            enable_volte=[True, True],
1291            enable_wfc=[True, True],
1292            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1293            is_airplane_mode=False)
1294
1295    @test_tracker_info(uuid="60d851c5-f79d-46e7-b921-b510bcdc9024")
1296    @TelephonyBaseTest.tel_test_wrap
1297    def test_dds_switch_voice_call_mt_wfc_esim_wifi_preferred_apm_off_with_volte_on_apm_cycling(self):
1298        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1299            slot_0_nw_gen="wfc",
1300            slot_1_nw_gen="wfc",
1301            call_slot=1,
1302            call_direction="mt",
1303            streaming=True,
1304            airplane_mode_cycling=True,
1305            enable_volte=[True, True],
1306            enable_wfc=[True, True],
1307            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1308            is_airplane_mode=False)
1309
1310    @test_tracker_info(uuid="092b1e43-3de4-4b08-b526-4f3f1e71a47a")
1311    @TelephonyBaseTest.tel_test_wrap
1312    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_on_cellular_data_cycling(self):
1313        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1314            slot_0_nw_gen="volte",
1315            slot_1_nw_gen="volte",
1316            call_slot=0,
1317            call_direction="mo",
1318            streaming=True,
1319            cellular_data_cycling=True,
1320            enable_volte=[True, True],
1321            enable_wfc=[True, True],
1322            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1323
1324    @test_tracker_info(uuid="3b876b39-1cfb-4adb-a45c-11a02890f8e1")
1325    @TelephonyBaseTest.tel_test_wrap
1326    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_on_cellular_data_cycling(self):
1327        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1328            slot_0_nw_gen="volte",
1329            slot_1_nw_gen="volte",
1330            call_slot=1,
1331            call_direction="mo",
1332            streaming=True,
1333            cellular_data_cycling=True,
1334            enable_volte=[True, True],
1335            enable_wfc=[True, True],
1336            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1337
1338    @test_tracker_info(uuid="96c42ffb-5b4e-4ab0-b52a-8b498a25f759")
1339    @TelephonyBaseTest.tel_test_wrap
1340    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_on_cellular_data_cycling(self):
1341        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1342            slot_0_nw_gen="volte",
1343            slot_1_nw_gen="volte",
1344            call_slot=0,
1345            call_direction="mt",
1346            streaming=True,
1347            cellular_data_cycling=True,
1348            enable_volte=[True, True],
1349            enable_wfc=[True, True],
1350            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1351
1352    @test_tracker_info(uuid="fbd4c30c-fef9-4100-b704-eb27d3bcb7ae")
1353    @TelephonyBaseTest.tel_test_wrap
1354    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_on_cellular_data_cycling(self):
1355        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1356            slot_0_nw_gen="volte",
1357            slot_1_nw_gen="volte",
1358            call_slot=1,
1359            call_direction="mt",
1360            streaming=True,
1361            cellular_data_cycling=True,
1362            enable_volte=[True, True],
1363            enable_wfc=[True, True],
1364            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1365
1366    @test_tracker_info(uuid="fbd88b9d-e27b-4c06-a983-a780d0c00623")
1367    @TelephonyBaseTest.tel_test_wrap
1368    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_on_wifi_on_cellular_data_cycling(self):
1369        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1370            slot_0_nw_gen="volte",
1371            slot_1_nw_gen="volte",
1372            call_slot=0,
1373            call_direction="mo",
1374            streaming=True,
1375            cellular_data_cycling=True,
1376            enable_volte=[True, True],
1377            enable_wfc=[True, True],
1378            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1379            is_wifi_connected=True)
1380
1381    @test_tracker_info(uuid="0fabca6f-28c4-4843-af70-f33d806d8dc1")
1382    @TelephonyBaseTest.tel_test_wrap
1383    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_on_wifi_on_cellular_data_cycling(self):
1384        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1385            slot_0_nw_gen="volte",
1386            slot_1_nw_gen="volte",
1387            call_slot=1,
1388            call_direction="mo",
1389            streaming=True,
1390            cellular_data_cycling=True,
1391            enable_volte=[True, True],
1392            enable_wfc=[True, True],
1393            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1394            is_wifi_connected=True)
1395
1396    @test_tracker_info(uuid="9b060264-69d8-437e-9981-b86e213952c5")
1397    @TelephonyBaseTest.tel_test_wrap
1398    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_on_wifi_on_cellular_data_cycling(self):
1399        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1400            slot_0_nw_gen="volte",
1401            slot_1_nw_gen="volte",
1402            call_slot=0,
1403            call_direction="mt",
1404            streaming=True,
1405            cellular_data_cycling=True,
1406            enable_volte=[True, True],
1407            enable_wfc=[True, True],
1408            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1409            is_wifi_connected=True)
1410
1411    @test_tracker_info(uuid="3a2effa4-728a-4160-9e0c-2aeafc7ba153")
1412    @TelephonyBaseTest.tel_test_wrap
1413    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_on_wifi_on_cellular_data_cycling(self):
1414        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1415            slot_0_nw_gen="volte",
1416            slot_1_nw_gen="volte",
1417            call_slot=1,
1418            call_direction="mt",
1419            streaming=True,
1420            cellular_data_cycling=True,
1421            enable_volte=[True, True],
1422            enable_wfc=[True, True],
1423            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1424            is_wifi_connected=True)
1425
1426    @test_tracker_info(uuid="ad491362-8bcc-4097-84af-932878002ce6")
1427    @TelephonyBaseTest.tel_test_wrap
1428    def test_dds_switch_voice_call_mo_wfc_psim_cellular_preferred_apm_on_with_volte_on_cellular_data_cycling(self):
1429        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1430            slot_0_nw_gen="wfc",
1431            slot_1_nw_gen="wfc",
1432            call_slot=0,
1433            call_direction="mo",
1434            streaming=True,
1435            cellular_data_cycling=True,
1436            enable_volte=[True, True],
1437            enable_wfc=[True, True],
1438            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1439            is_airplane_mode=True)
1440
1441    @test_tracker_info(uuid="c137fe4e-380b-4dc5-8996-c8c5654596f7")
1442    @TelephonyBaseTest.tel_test_wrap
1443    def test_dds_switch_voice_call_mo_wfc_esim_cellular_preferred_apm_on_with_volte_on_cellular_data_cycling(self):
1444        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1445            slot_0_nw_gen="wfc",
1446            slot_1_nw_gen="wfc",
1447            call_slot=1,
1448            call_direction="mo",
1449            streaming=True,
1450            cellular_data_cycling=True,
1451            enable_volte=[True, True],
1452            enable_wfc=[True, True],
1453            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1454            is_airplane_mode=True)
1455
1456    @test_tracker_info(uuid="e7936ce8-1652-4b21-b3f0-5327084b823c")
1457    @TelephonyBaseTest.tel_test_wrap
1458    def test_dds_switch_voice_call_mo_wfc_psim_wifi_preferred_apm_off_with_volte_on_cellular_data_cycling(self):
1459        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1460            slot_0_nw_gen="wfc",
1461            slot_1_nw_gen="wfc",
1462            call_slot=0,
1463            call_direction="mo",
1464            streaming=True,
1465            cellular_data_cycling=True,
1466            enable_volte=[True, True],
1467            enable_wfc=[True, True],
1468            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1469            is_airplane_mode=False)
1470
1471    @test_tracker_info(uuid="86db06b4-907f-4085-af8e-75c983831bb0")
1472    @TelephonyBaseTest.tel_test_wrap
1473    def test_dds_switch_voice_call_mo_wfc_esim_wifi_preferred_apm_off_with_volte_on_cellular_data_cycling(self):
1474        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1475            slot_0_nw_gen="wfc",
1476            slot_1_nw_gen="wfc",
1477            call_slot=1,
1478            call_direction="mo",
1479            streaming=True,
1480            cellular_data_cycling=True,
1481            enable_volte=[True, True],
1482            enable_wfc=[True, True],
1483            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1484            is_airplane_mode=False)
1485
1486    @test_tracker_info(uuid="e43b23b5-022a-4830-9110-839ece333f6f")
1487    @TelephonyBaseTest.tel_test_wrap
1488    def test_dds_switch_voice_call_mt_wfc_psim_cellular_preferred_apm_on_with_volte_on_cellular_data_cycling(self):
1489        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1490            slot_0_nw_gen="wfc",
1491            slot_1_nw_gen="wfc",
1492            call_slot=0,
1493            call_direction="mt",
1494            streaming=True,
1495            cellular_data_cycling=True,
1496            enable_volte=[True, True],
1497            enable_wfc=[True, True],
1498            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1499            is_airplane_mode=True)
1500
1501    @test_tracker_info(uuid="00d0bfc2-2121-4ba9-9dd7-72bf78380121")
1502    @TelephonyBaseTest.tel_test_wrap
1503    def test_dds_switch_voice_call_mt_wfc_esim_cellular_preferred_apm_on_with_volte_on_cellular_data_cycling(self):
1504        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1505            slot_0_nw_gen="wfc",
1506            slot_1_nw_gen="wfc",
1507            call_slot=1,
1508            call_direction="mt",
1509            streaming=True,
1510            cellular_data_cycling=True,
1511            enable_volte=[True, True],
1512            enable_wfc=[True, True],
1513            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1514            is_airplane_mode=True)
1515
1516    @test_tracker_info(uuid="4921a948-54d4-4945-81ea-02893d10b6e6")
1517    @TelephonyBaseTest.tel_test_wrap
1518    def test_dds_switch_voice_call_mt_wfc_psim_wifi_preferred_apm_off_with_volte_on_cellular_data_cycling(self):
1519        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1520            slot_0_nw_gen="wfc",
1521            slot_1_nw_gen="wfc",
1522            call_slot=0,
1523            call_direction="mt",
1524            streaming=True,
1525            cellular_data_cycling=True,
1526            enable_volte=[True, True],
1527            enable_wfc=[True, True],
1528            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1529            is_airplane_mode=False)
1530
1531    @test_tracker_info(uuid="ed4b8ba4-1b31-4e3c-9be3-0e184e324523")
1532    @TelephonyBaseTest.tel_test_wrap
1533    def test_dds_switch_voice_call_mt_wfc_esim_wifi_preferred_apm_off_with_volte_on_cellular_data_cycling(self):
1534        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1535            slot_0_nw_gen="wfc",
1536            slot_1_nw_gen="wfc",
1537            call_slot=1,
1538            call_direction="mt",
1539            streaming=True,
1540            cellular_data_cycling=True,
1541            enable_volte=[True, True],
1542            enable_wfc=[True, True],
1543            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1544            is_airplane_mode=False)
1545
1546    @test_tracker_info(uuid="1fb43960-51dd-4be9-adf1-51c84cb8d85a")
1547    @TelephonyBaseTest.tel_test_wrap
1548    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_on_wifi_cycling(self):
1549        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1550            slot_0_nw_gen="volte",
1551            slot_1_nw_gen="volte",
1552            call_slot=0,
1553            call_direction="mo",
1554            streaming=True,
1555            wifi_cycling=True,
1556            enable_volte=[True, True],
1557            enable_wfc=[True, True],
1558            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1559
1560    @test_tracker_info(uuid="1052e02f-5a4b-4826-9c47-9ab6d142f300")
1561    @TelephonyBaseTest.tel_test_wrap
1562    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_on_wifi_cycling(self):
1563        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1564            slot_0_nw_gen="volte",
1565            slot_1_nw_gen="volte",
1566            call_slot=1,
1567            call_direction="mo",
1568            streaming=True,
1569            wifi_cycling=True,
1570            enable_volte=[True, True],
1571            enable_wfc=[True, True],
1572            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1573
1574    @test_tracker_info(uuid="23bb1991-6ff1-4528-aeee-1ec0c7b525be")
1575    @TelephonyBaseTest.tel_test_wrap
1576    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_on_wifi_cycling(self):
1577        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1578            slot_0_nw_gen="volte",
1579            slot_1_nw_gen="volte",
1580            call_slot=0,
1581            call_direction="mt",
1582            streaming=True,
1583            wifi_cycling=True,
1584            enable_volte=[True, True],
1585            enable_wfc=[True, True],
1586            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1587
1588    @test_tracker_info(uuid="1d5842c5-91f5-4c87-9f65-67891d255d43")
1589    @TelephonyBaseTest.tel_test_wrap
1590    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_on_wifi_cycling(self):
1591        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1592            slot_0_nw_gen="volte",
1593            slot_1_nw_gen="volte",
1594            call_slot=1,
1595            call_direction="mt",
1596            streaming=True,
1597            wifi_cycling=True,
1598            enable_volte=[True, True],
1599            enable_wfc=[True, True],
1600            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED])
1601
1602    @test_tracker_info(uuid="380bd592-5437-4e16-9564-5f47b066cab2")
1603    @TelephonyBaseTest.tel_test_wrap
1604    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_on_wifi_on_wifi_cycling(self):
1605        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1606            slot_0_nw_gen="volte",
1607            slot_1_nw_gen="volte",
1608            call_slot=0,
1609            call_direction="mo",
1610            streaming=True,
1611            wifi_cycling=True,
1612            enable_volte=[True, True],
1613            enable_wfc=[True, True],
1614            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1615            is_wifi_connected=True)
1616
1617    @test_tracker_info(uuid="90bb2647-71f1-44cd-bff3-5bbb720e59b7")
1618    @TelephonyBaseTest.tel_test_wrap
1619    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_on_wifi_on_wifi_cycling(self):
1620        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1621            slot_0_nw_gen="volte",
1622            slot_1_nw_gen="volte",
1623            call_slot=1,
1624            call_direction="mo",
1625            streaming=True,
1626            wifi_cycling=True,
1627            enable_volte=[True, True],
1628            enable_wfc=[True, True],
1629            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1630            is_wifi_connected=True)
1631
1632    @test_tracker_info(uuid="5bca72c8-62d0-41bf-8888-310cd235dac4")
1633    @TelephonyBaseTest.tel_test_wrap
1634    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_on_wifi_on_wifi_cycling(self):
1635        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1636            slot_0_nw_gen="volte",
1637            slot_1_nw_gen="volte",
1638            call_slot=0,
1639            call_direction="mt",
1640            streaming=True,
1641            wifi_cycling=True,
1642            enable_volte=[True, True],
1643            enable_wfc=[True, True],
1644            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1645            is_wifi_connected=True)
1646
1647    @test_tracker_info(uuid="13805ecf-3cf9-44c8-98bc-a099edb36340")
1648    @TelephonyBaseTest.tel_test_wrap
1649    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_on_wifi_on_wifi_cycling(self):
1650        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1651            slot_0_nw_gen="volte",
1652            slot_1_nw_gen="volte",
1653            call_slot=1,
1654            call_direction="mt",
1655            streaming=True,
1656            wifi_cycling=True,
1657            enable_volte=[True, True],
1658            enable_wfc=[True, True],
1659            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1660            is_wifi_connected=True)
1661
1662    @test_tracker_info(uuid="33ed3dee-581f-4ae8-b236-1317377a6ca1")
1663    @TelephonyBaseTest.tel_test_wrap
1664    def test_dds_switch_voice_call_mo_wfc_psim_cellular_preferred_apm_on_with_with_volte_on_wifi_cycling(self):
1665        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1666            slot_0_nw_gen="wfc",
1667            slot_1_nw_gen="wfc",
1668            call_slot=0,
1669            call_direction="mo",
1670            streaming=True,
1671            wifi_cycling=True,
1672            enable_volte=[True, True],
1673            enable_wfc=[True, True],
1674            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1675            is_airplane_mode=True)
1676
1677    @test_tracker_info(uuid="88391458-6886-483f-a997-c62fd6dfd0b8")
1678    @TelephonyBaseTest.tel_test_wrap
1679    def test_dds_switch_voice_call_mo_wfc_esim_cellular_preferred_apm_on_with_with_volte_on_wifi_cycling(self):
1680        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1681            slot_0_nw_gen="wfc",
1682            slot_1_nw_gen="wfc",
1683            call_slot=1,
1684            call_direction="mo",
1685            streaming=True,
1686            wifi_cycling=True,
1687            enable_volte=[True, True],
1688            enable_wfc=[True, True],
1689            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1690            is_airplane_mode=True)
1691
1692    @test_tracker_info(uuid="966bcb75-dd2d-4400-a880-e7407989ee52")
1693    @TelephonyBaseTest.tel_test_wrap
1694    def test_dds_switch_voice_call_mo_wfc_psim_wifi_preferred_apm_off_with_with_volte_on_wifi_cycling(self):
1695        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1696            slot_0_nw_gen="wfc",
1697            slot_1_nw_gen="wfc",
1698            call_slot=0,
1699            call_direction="mo",
1700            streaming=True,
1701            wifi_cycling=True,
1702            enable_volte=[True, True],
1703            enable_wfc=[True, True],
1704            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1705            is_airplane_mode=False)
1706
1707    @test_tracker_info(uuid="7ff48189-5b4b-4b2d-a96a-fa66e86d0596")
1708    @TelephonyBaseTest.tel_test_wrap
1709    def test_dds_switch_voice_call_mo_wfc_esim_wifi_preferred_apm_off_with_with_volte_on_wifi_cycling(self):
1710        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1711            slot_0_nw_gen="wfc",
1712            slot_1_nw_gen="wfc",
1713            call_slot=1,
1714            call_direction="mo",
1715            streaming=True,
1716            wifi_cycling=True,
1717            enable_volte=[True, True],
1718            enable_wfc=[True, True],
1719            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1720            is_airplane_mode=False)
1721
1722    @test_tracker_info(uuid="ab503377-7150-4a6d-a7c1-b21009a69402")
1723    @TelephonyBaseTest.tel_test_wrap
1724    def test_dds_switch_voice_call_mt_psim_wfc_cellular_preferred_apm_on_with_with_volte_on_wifi_cycling(self):
1725        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1726            slot_0_nw_gen="wfc",
1727            slot_1_nw_gen="wfc",
1728            call_slot=0,
1729            call_direction="mt",
1730            streaming=True,
1731            wifi_cycling=True,
1732            enable_volte=[True, True],
1733            enable_wfc=[True, True],
1734            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1735            is_airplane_mode=True)
1736
1737    @test_tracker_info(uuid="7f02ee60-19e9-4602-8f6d-a13b976a6bba")
1738    @TelephonyBaseTest.tel_test_wrap
1739    def test_dds_switch_voice_call_mt_esim_wfc_cellular_preferred_apm_on_with_with_volte_on_wifi_cycling(self):
1740        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1741            slot_0_nw_gen="wfc",
1742            slot_1_nw_gen="wfc",
1743            call_slot=1,
1744            call_direction="mt",
1745            streaming=True,
1746            wifi_cycling=True,
1747            enable_volte=[True, True],
1748            enable_wfc=[True, True],
1749            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1750            is_airplane_mode=True)
1751
1752    @test_tracker_info(uuid="e93fa3ac-c5cd-4e21-b872-5172aa22d030")
1753    @TelephonyBaseTest.tel_test_wrap
1754    def test_dds_switch_voice_call_mt_wfc_psim_wifi_preferred_apm_off_with_with_volte_on_wifi_cycling(self):
1755        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1756            slot_0_nw_gen="wfc",
1757            slot_1_nw_gen="wfc",
1758            call_slot=0,
1759            call_direction="mt",
1760            streaming=True,
1761            wifi_cycling=True,
1762            enable_volte=[True, True],
1763            enable_wfc=[True, True],
1764            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1765            is_airplane_mode=False)
1766
1767    @test_tracker_info(uuid="c2af6998-f702-4e36-bbaa-f099a307b21a")
1768    @TelephonyBaseTest.tel_test_wrap
1769    def test_dds_switch_voice_call_mt_wfc_esim_wifi_preferred_apm_off_with_with_volte_on_wifi_cycling(self):
1770        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1771            slot_0_nw_gen="wfc",
1772            slot_1_nw_gen="wfc",
1773            call_slot=1,
1774            call_direction="mt",
1775            streaming=True,
1776            wifi_cycling=True,
1777            enable_volte=[True, True],
1778            enable_wfc=[True, True],
1779            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1780            is_airplane_mode=False)
1781
1782    @test_tracker_info(uuid="45ba6e90-bdaa-4dc0-a504-c596bafdfaad")
1783    @TelephonyBaseTest.tel_test_wrap
1784    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_off_apm_cycling(self):
1785        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1786            slot_0_nw_gen="volte",
1787            slot_1_nw_gen="volte",
1788            call_slot=0,
1789            call_direction="mo",
1790            streaming=True,
1791            airplane_mode_cycling=True,
1792            enable_volte=[True, True],
1793            enable_wfc=[False, False],
1794            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1795
1796    @test_tracker_info(uuid="1b573f40-3eaf-4149-baad-2e73e5bf15f4")
1797    @TelephonyBaseTest.tel_test_wrap
1798    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_off_apm_cycling(self):
1799        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1800            slot_0_nw_gen="volte",
1801            slot_1_nw_gen="volte",
1802            call_slot=1,
1803            call_direction="mo",
1804            streaming=True,
1805            airplane_mode_cycling=True,
1806            enable_volte=[True, True],
1807            enable_wfc=[False, False],
1808            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1809
1810    @test_tracker_info(uuid="13511fb6-2984-40c3-b1b9-22f27f241c07")
1811    @TelephonyBaseTest.tel_test_wrap
1812    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_off_apm_cycling(self):
1813        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1814            slot_0_nw_gen="volte",
1815            slot_1_nw_gen="volte",
1816            call_slot=0,
1817            call_direction="mt",
1818            streaming=True,
1819            airplane_mode_cycling=True,
1820            enable_volte=[True, True],
1821            enable_wfc=[False, False],
1822            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1823
1824    @test_tracker_info(uuid="61cf33d1-e1b2-427a-bb38-29a4c7566947")
1825    @TelephonyBaseTest.tel_test_wrap
1826    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_off_apm_cycling(self):
1827        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1828            slot_0_nw_gen="volte",
1829            slot_1_nw_gen="volte",
1830            call_slot=1,
1831            call_direction="mt",
1832            streaming=True,
1833            airplane_mode_cycling=True,
1834            enable_volte=[True, True],
1835            enable_wfc=[False, False],
1836            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1837
1838    @test_tracker_info(uuid="31a2a741-c825-46f8-8e0a-8487fab9940e")
1839    @TelephonyBaseTest.tel_test_wrap
1840    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_off_cellular_data_cycling(self):
1841        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1842            slot_0_nw_gen="volte",
1843            slot_1_nw_gen="volte",
1844            call_slot=0,
1845            call_direction="mo",
1846            streaming=True,
1847            cellular_data_cycling=True,
1848            enable_volte=[True, True],
1849            enable_wfc=[False, False],
1850            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1851
1852    @test_tracker_info(uuid="9fb2a85f-08b3-4d5d-9e03-3f7f67039148")
1853    @TelephonyBaseTest.tel_test_wrap
1854    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_off_cellular_data_cycling(self):
1855        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1856            slot_0_nw_gen="volte",
1857            slot_1_nw_gen="volte",
1858            call_slot=1,
1859            call_direction="mo",
1860            streaming=True,
1861            cellular_data_cycling=True,
1862            enable_volte=[True, True],
1863            enable_wfc=[False, False],
1864            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1865
1866    @test_tracker_info(uuid="30eba519-b349-4a75-9f31-3fea0d1a8447")
1867    @TelephonyBaseTest.tel_test_wrap
1868    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_off_cellular_data_cycling(self):
1869        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1870            slot_0_nw_gen="volte",
1871            slot_1_nw_gen="volte",
1872            call_slot=0,
1873            call_direction="mt",
1874            streaming=True,
1875            cellular_data_cycling=True,
1876            enable_volte=[True, True],
1877            enable_wfc=[False, False],
1878            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1879
1880    @test_tracker_info(uuid="37240938-3ce1-4ad2-b35a-a8862dc2c70f")
1881    @TelephonyBaseTest.tel_test_wrap
1882    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_off_cellular_data_cycling(self):
1883        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1884            slot_0_nw_gen="volte",
1885            slot_1_nw_gen="volte",
1886            call_slot=1,
1887            call_direction="mt",
1888            streaming=True,
1889            cellular_data_cycling=True,
1890            enable_volte=[True, True],
1891            enable_wfc=[False, False],
1892            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1893
1894    @test_tracker_info(uuid="a7321b9c-fb2c-4a03-9566-05e4244ae6fd")
1895    @TelephonyBaseTest.tel_test_wrap
1896    def test_dds_switch_voice_call_mo_volte_psim_with_wfc_off_wifi_cycling(self):
1897        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1898            slot_0_nw_gen="volte",
1899            slot_1_nw_gen="volte",
1900            call_slot=0,
1901            call_direction="mo",
1902            streaming=True,
1903            wifi_cycling=True,
1904            enable_volte=[True, True],
1905            enable_wfc=[False, False],
1906            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1907
1908    @test_tracker_info(uuid="6de8d678-2f72-41ea-9ed9-47b27afee038")
1909    @TelephonyBaseTest.tel_test_wrap
1910    def test_dds_switch_voice_call_mo_volte_esim_with_wfc_off_wifi_cycling(self):
1911        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1912            slot_0_nw_gen="volte",
1913            slot_1_nw_gen="volte",
1914            call_slot=1,
1915            call_direction="mo",
1916            streaming=True,
1917            wifi_cycling=True,
1918            enable_volte=[True, True],
1919            enable_wfc=[False, False],
1920            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1921
1922    @test_tracker_info(uuid="7bc16dcf-6dab-4eec-931d-9b342caa7a32")
1923    @TelephonyBaseTest.tel_test_wrap
1924    def test_dds_switch_voice_call_mt_volte_psim_with_wfc_off_wifi_cycling(self):
1925        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1926            slot_0_nw_gen="volte",
1927            slot_1_nw_gen="volte",
1928            call_slot=0,
1929            call_direction="mt",
1930            streaming=True,
1931            wifi_cycling=True,
1932            enable_volte=[True, True],
1933            enable_wfc=[False, False],
1934            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1935
1936    @test_tracker_info(uuid="9c13e51b-385d-4df6-90b7-33b5e185f225")
1937    @TelephonyBaseTest.tel_test_wrap
1938    def test_dds_switch_voice_call_mt_volte_esim_with_wfc_off_wifi_cycling(self):
1939        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1940            slot_0_nw_gen="volte",
1941            slot_1_nw_gen="volte",
1942            call_slot=1,
1943            call_direction="mt",
1944            streaming=True,
1945            wifi_cycling=True,
1946            enable_volte=[True, True],
1947            enable_wfc=[False, False],
1948            wfc_mode=[WFC_MODE_DISABLED, WFC_MODE_DISABLED])
1949
1950    @test_tracker_info(uuid="161341e7-5c2d-45f9-9b11-4f44d542cd01")
1951    @TelephonyBaseTest.tel_test_wrap
1952    def test_dds_switch_voice_call_mo_wfc_psim_cellular_preferred_apm_on_with_volte_off_apm_cycling(self):
1953        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1954            slot_0_nw_gen="wfc",
1955            slot_1_nw_gen="wfc",
1956            call_slot=0,
1957            call_direction="mo",
1958            streaming=True,
1959            airplane_mode_cycling=True,
1960            enable_volte=[False, False],
1961            enable_wfc=[True, True],
1962            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1963            is_airplane_mode=True)
1964
1965    @test_tracker_info(uuid="4d43f92f-562f-4bf1-bc25-71410f14425c")
1966    @TelephonyBaseTest.tel_test_wrap
1967    def test_dds_switch_voice_call_mo_wfc_esim_cellular_preferred_apm_on_with_volte_off_apm_cycling(self):
1968        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1969            slot_0_nw_gen="wfc",
1970            slot_1_nw_gen="wfc",
1971            call_slot=1,
1972            call_direction="mo",
1973            streaming=True,
1974            airplane_mode_cycling=True,
1975            enable_volte=[False, False],
1976            enable_wfc=[True, True],
1977            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
1978            is_airplane_mode=True)
1979
1980    @test_tracker_info(uuid="fe83e92d-c554-4f81-a447-d58300426da7")
1981    @TelephonyBaseTest.tel_test_wrap
1982    def test_dds_switch_voice_call_mo_wfc_psim_wifi_preferred_apm_off_with_volte_off_apm_cycling(self):
1983        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1984            slot_0_nw_gen="wfc",
1985            slot_1_nw_gen="wfc",
1986            call_slot=0,
1987            call_direction="mo",
1988            streaming=True,
1989            airplane_mode_cycling=True,
1990            enable_volte=[False, False],
1991            enable_wfc=[True, True],
1992            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
1993            is_airplane_mode=False)
1994
1995    @test_tracker_info(uuid="76ba6834-1523-4ce8-80b9-079f2428da67")
1996    @TelephonyBaseTest.tel_test_wrap
1997    def test_dds_switch_voice_call_mo_wfc_esim_wifi_preferred_apm_off_with_volte_off_apm_cycling(self):
1998        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
1999            slot_0_nw_gen="wfc",
2000            slot_1_nw_gen="wfc",
2001            call_slot=1,
2002            call_direction="mo",
2003            streaming=True,
2004            airplane_mode_cycling=True,
2005            enable_volte=[False, False],
2006            enable_wfc=[True, True],
2007            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2008            is_airplane_mode=False)
2009
2010    @test_tracker_info(uuid="15289348-8e09-4997-b5a3-f66bb7e7dca1")
2011    @TelephonyBaseTest.tel_test_wrap
2012    def test_dds_switch_voice_call_mt_wfc_psim_cellular_preferred_apm_on_with_volte_off_apm_cycling(self):
2013        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2014            slot_0_nw_gen="wfc",
2015            slot_1_nw_gen="wfc",
2016            call_slot=0,
2017            call_direction="mt",
2018            streaming=True,
2019            airplane_mode_cycling=True,
2020            enable_volte=[False, False],
2021            enable_wfc=[True, True],
2022            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2023            is_airplane_mode=True)
2024
2025    @test_tracker_info(uuid="1ae4fa98-1ac3-4194-a483-097b7262415b")
2026    @TelephonyBaseTest.tel_test_wrap
2027    def test_dds_switch_voice_call_mt_wfc_esim_cellular_preferred_apm_on_with_volte_off_apm_cycling(self):
2028        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2029            slot_0_nw_gen="wfc",
2030            slot_1_nw_gen="wfc",
2031            call_slot=1,
2032            call_direction="mt",
2033            streaming=True,
2034            airplane_mode_cycling=True,
2035            enable_volte=[False, False],
2036            enable_wfc=[True, True],
2037            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2038            is_airplane_mode=True)
2039
2040    @test_tracker_info(uuid="13d0af2c-2870-4cbc-8a38-311f93cd4bd7")
2041    @TelephonyBaseTest.tel_test_wrap
2042    def test_dds_switch_voice_call_mt_wfc_psim_wifi_preferred_apm_off_with_volte_off_apm_cycling(self):
2043        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2044            slot_0_nw_gen="wfc",
2045            slot_1_nw_gen="wfc",
2046            call_slot=0,
2047            call_direction="mt",
2048            streaming=True,
2049            airplane_mode_cycling=True,
2050            enable_volte=[False, False],
2051            enable_wfc=[True, True],
2052            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2053            is_airplane_mode=False)
2054
2055    @test_tracker_info(uuid="5fbe2002-a02f-4750-81e5-4a06d7b62740")
2056    @TelephonyBaseTest.tel_test_wrap
2057    def test_dds_switch_voice_call_mt_wfc_esim_wifi_preferred_apm_off_with_volte_off_apm_cycling(self):
2058        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2059            slot_0_nw_gen="wfc",
2060            slot_1_nw_gen="wfc",
2061            call_slot=1,
2062            call_direction="mt",
2063            streaming=True,
2064            airplane_mode_cycling=True,
2065            enable_volte=[False, False],
2066            enable_wfc=[True, True],
2067            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2068            is_airplane_mode=False)
2069
2070    @test_tracker_info(uuid="f8f523d2-e432-45d4-a850-469a22894bc7")
2071    @TelephonyBaseTest.tel_test_wrap
2072    def test_dds_switch_voice_call_mo_wfc_psim_cellular_preferred_apm_on_with_volte_off_cellular_data_cycling(self):
2073        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2074            slot_0_nw_gen="wfc",
2075            slot_1_nw_gen="wfc",
2076            call_slot=0,
2077            call_direction="mo",
2078            streaming=True,
2079            cellular_data_cycling=True,
2080            enable_volte=[False, False],
2081            enable_wfc=[True, True],
2082            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2083            is_airplane_mode=True)
2084
2085    @test_tracker_info(uuid="750a8690-f9dd-4779-b13f-4011f478f194")
2086    @TelephonyBaseTest.tel_test_wrap
2087    def test_dds_switch_voice_call_mo_wfc_esim_cellular_preferred_apm_on_with_volte_off_cellular_data_cycling(self):
2088        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2089            slot_0_nw_gen="wfc",
2090            slot_1_nw_gen="wfc",
2091            call_slot=1,
2092            call_direction="mo",
2093            streaming=True,
2094            cellular_data_cycling=True,
2095            enable_volte=[False, False],
2096            enable_wfc=[True, True],
2097            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2098            is_airplane_mode=True)
2099
2100    @test_tracker_info(uuid="9fcda7e5-1705-4bbe-8f18-f005437c71f2")
2101    @TelephonyBaseTest.tel_test_wrap
2102    def test_dds_switch_voice_call_mo_wfc_psim_wifi_preferred_apm_off_with_volte_off_cellular_data_cycling(self):
2103        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2104            slot_0_nw_gen="wfc",
2105            slot_1_nw_gen="wfc",
2106            call_slot=0,
2107            call_direction="mo",
2108            streaming=True,
2109            cellular_data_cycling=True,
2110            enable_volte=[False, False],
2111            enable_wfc=[True, True],
2112            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2113            is_airplane_mode=False)
2114
2115    @test_tracker_info(uuid="0e054729-945a-4f6f-ad29-4d832f0b11ed")
2116    @TelephonyBaseTest.tel_test_wrap
2117    def test_dds_switch_voice_call_mo_wfc_esim_wifi_preferred_apm_off_with_volte_off_cellular_data_cycling(self):
2118        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2119            slot_0_nw_gen="wfc",
2120            slot_1_nw_gen="wfc",
2121            call_slot=1,
2122            call_direction="mo",
2123            streaming=True,
2124            cellular_data_cycling=True,
2125            enable_volte=[False, False],
2126            enable_wfc=[True, True],
2127            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2128            is_airplane_mode=False)
2129
2130    @test_tracker_info(uuid="2e387739-cc4a-4d48-aa56-83bf621835b1")
2131    @TelephonyBaseTest.tel_test_wrap
2132    def test_dds_switch_voice_call_mt_wfc_psim_cellular_preferred_apm_on_with_volte_off_cellular_data_cycling(self):
2133        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2134            slot_0_nw_gen="wfc",
2135            slot_1_nw_gen="wfc",
2136            call_slot=0,
2137            call_direction="mt",
2138            streaming=True,
2139            cellular_data_cycling=True,
2140            enable_volte=[False, False],
2141            enable_wfc=[True, True],
2142            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2143            is_airplane_mode=True)
2144
2145    @test_tracker_info(uuid="a0e2deda-9148-4665-abc8-7665e3818d06")
2146    @TelephonyBaseTest.tel_test_wrap
2147    def test_dds_switch_voice_call_mt_wfc_esim_cellular_preferred_apm_on_with_volte_off_cellular_data_cycling(self):
2148        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2149            slot_0_nw_gen="wfc",
2150            slot_1_nw_gen="wfc",
2151            call_slot=1,
2152            call_direction="mt",
2153            streaming=True,
2154            cellular_data_cycling=True,
2155            enable_volte=[False, False],
2156            enable_wfc=[True, True],
2157            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2158            is_airplane_mode=True)
2159
2160    @test_tracker_info(uuid="6a43acef-aaa1-4fe8-ae7e-c8e045bf8814")
2161    @TelephonyBaseTest.tel_test_wrap
2162    def test_dds_switch_voice_call_mt_wfc_psim_wifi_preferred_apm_off_with_volte_off_cellular_data_cycling(self):
2163        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2164            slot_0_nw_gen="wfc",
2165            slot_1_nw_gen="wfc",
2166            call_slot=0,
2167            call_direction="mt",
2168            streaming=True,
2169            cellular_data_cycling=True,
2170            enable_volte=[False, False],
2171            enable_wfc=[True, True],
2172            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2173            is_airplane_mode=False)
2174
2175    @test_tracker_info(uuid="95524166-212f-4e82-9e02-2f9b58d92a9f")
2176    @TelephonyBaseTest.tel_test_wrap
2177    def test_dds_switch_voice_call_mt_wfc_esim_wifi_preferred_apm_off_with_volte_off_cellular_data_cycling(self):
2178        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2179            slot_0_nw_gen="wfc",
2180            slot_1_nw_gen="wfc",
2181            call_slot=1,
2182            call_direction="mt",
2183            streaming=True,
2184            cellular_data_cycling=True,
2185            enable_volte=[False, False],
2186            enable_wfc=[True, True],
2187            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2188            is_airplane_mode=False)
2189
2190    @test_tracker_info(uuid="828ae64c-41b3-4974-a412-342d3ca16ce3")
2191    @TelephonyBaseTest.tel_test_wrap
2192    def test_dds_switch_voice_call_mo_wfc_psim_cellular_preferred_apm_on_with_volte_off_wifi_cycling(self):
2193        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2194            slot_0_nw_gen="wfc",
2195            slot_1_nw_gen="wfc",
2196            call_slot=0,
2197            call_direction="mo",
2198            streaming=True,
2199            wifi_cycling=True,
2200            enable_volte=[False, False],
2201            enable_wfc=[True, True],
2202            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2203            is_airplane_mode=True)
2204
2205    @test_tracker_info(uuid="343cf9dc-4f4c-4c0c-bd7b-ba664381f6bd")
2206    @TelephonyBaseTest.tel_test_wrap
2207    def test_dds_switch_voice_call_mo_wfc_esim_cellular_preferred_apm_on_with_volte_off_wifi_cycling(self):
2208        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2209            slot_0_nw_gen="wfc",
2210            slot_1_nw_gen="wfc",
2211            call_slot=1,
2212            call_direction="mo",
2213            streaming=True,
2214            wifi_cycling=True,
2215            enable_volte=[False, False],
2216            enable_wfc=[True, True],
2217            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2218            is_airplane_mode=True)
2219
2220    @test_tracker_info(uuid="6ef18605-bf4c-43d8-83fd-0bf71311973e")
2221    @TelephonyBaseTest.tel_test_wrap
2222    def test_dds_switch_voice_call_mo_wfc_psim_wifi_preferred_apm_off_with_volte_off_wifi_cycling(self):
2223        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2224            slot_0_nw_gen="wfc",
2225            slot_1_nw_gen="wfc",
2226            call_slot=0,
2227            call_direction="mo",
2228            streaming=True,
2229            wifi_cycling=True,
2230            enable_volte=[False, False],
2231            enable_wfc=[True, True],
2232            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2233            is_airplane_mode=False)
2234
2235    @test_tracker_info(uuid="9bddfe69-68e1-4d04-aeaa-75fb0f9ed9aa")
2236    @TelephonyBaseTest.tel_test_wrap
2237    def test_dds_switch_voice_call_mo_wfc_esim_wifi_preferred_apm_off_with_volte_off_wifi_cycling(self):
2238        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2239            slot_0_nw_gen="wfc",
2240            slot_1_nw_gen="wfc",
2241            call_slot=1,
2242            call_direction="mo",
2243            streaming=True,
2244            wifi_cycling=True,
2245            enable_volte=[False, False],
2246            enable_wfc=[True, True],
2247            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2248            is_airplane_mode=False)
2249
2250    @test_tracker_info(uuid="81e7d2b6-e3eb-4651-807f-66bf8eeeea93")
2251    @TelephonyBaseTest.tel_test_wrap
2252    def test_dds_switch_voice_call_mt_wfc_psim_cellular_preferred_apm_on_with_volte_off_wifi_cycling(self):
2253        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2254            slot_0_nw_gen="wfc",
2255            slot_1_nw_gen="wfc",
2256            call_slot=0,
2257            call_direction="mt",
2258            streaming=True,
2259            wifi_cycling=True,
2260            enable_volte=[False, False],
2261            enable_wfc=[True, True],
2262            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2263            is_airplane_mode=True)
2264
2265    @test_tracker_info(uuid="8c6da88b-be3a-4c0c-a239-255faf03a28b")
2266    @TelephonyBaseTest.tel_test_wrap
2267    def test_dds_switch_voice_call_mt_wfc_esim_cellular_preferred_apm_on_with_volte_off_wifi_cycling(self):
2268        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2269            slot_0_nw_gen="wfc",
2270            slot_1_nw_gen="wfc",
2271            call_slot=1,
2272            call_direction="mt",
2273            streaming=True,
2274            wifi_cycling=True,
2275            enable_volte=[False, False],
2276            enable_wfc=[True, True],
2277            wfc_mode=[WFC_MODE_CELLULAR_PREFERRED, WFC_MODE_CELLULAR_PREFERRED],
2278            is_airplane_mode=True)
2279
2280    @test_tracker_info(uuid="1b9ef6b4-c0c0-4375-b1a5-d569b946491e")
2281    @TelephonyBaseTest.tel_test_wrap
2282    def test_dds_switch_voice_call_mt_wfc_psim_wifi_preferred_apm_off_with_volte_off_wifi_cycling(self):
2283        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2284            slot_0_nw_gen="wfc",
2285            slot_1_nw_gen="wfc",
2286            call_slot=0,
2287            call_direction="mt",
2288            streaming=True,
2289            wifi_cycling=True,
2290            enable_volte=[False, False],
2291            enable_wfc=[True, True],
2292            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2293            is_airplane_mode=False)
2294
2295    @test_tracker_info(uuid="5771fedb-5eed-4868-84a3-0d7a01474dcf")
2296    @TelephonyBaseTest.tel_test_wrap
2297    def test_dds_switch_voice_call_mt_wfc_esim_wifi_preferred_apm_off_with_volte_off_wifi_cycling(self):
2298        return self._test_dds_switch_during_data_transfer_with_apm_cycling_and_ims_setting(
2299            slot_0_nw_gen="wfc",
2300            slot_1_nw_gen="wfc",
2301            call_slot=1,
2302            call_direction="mt",
2303            streaming=True,
2304            wifi_cycling=True,
2305            enable_volte=[False, False],
2306            enable_wfc=[True, True],
2307            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
2308            is_airplane_mode=False)