• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3.4
2#
3#   Copyright 2016 - Google
4#
5#   Licensed under the Apache License, Version 2.0 (the "License");
6#   you may not use this file except in compliance with the License.
7#   You may obtain a copy of the License at
8#
9#       http://www.apache.org/licenses/LICENSE-2.0
10#
11#   Unless required by applicable law or agreed to in writing, software
12#   distributed under the License is distributed on an "AS IS" BASIS,
13#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14#   See the License for the specific language governing permissions and
15#   limitations under the License.
16"""
17    Test Script for Live Network Telephony Conference Call
18"""
19
20import time
21from acts import signals
22from acts.test_decorators import test_tracker_info
23from acts.test_utils.tel.TelephonyBaseTest import TelephonyBaseTest
24from acts.test_utils.tel.tel_defines import CALL_CAPABILITY_MANAGE_CONFERENCE
25from acts.test_utils.tel.tel_defines import CALL_CAPABILITY_MERGE_CONFERENCE
26from acts.test_utils.tel.tel_defines import CALL_CAPABILITY_SWAP_CONFERENCE
27from acts.test_utils.tel.tel_defines import CALL_PROPERTY_CONFERENCE
28from acts.test_utils.tel.tel_defines import CALL_STATE_ACTIVE
29from acts.test_utils.tel.tel_defines import CALL_STATE_HOLDING
30from acts.test_utils.tel.tel_defines import CAPABILITY_CONFERENCE
31from acts.test_utils.tel.tel_defines import PHONE_TYPE_CDMA
32from acts.test_utils.tel.tel_defines import PHONE_TYPE_GSM
33from acts.test_utils.tel.tel_defines import WAIT_TIME_IN_CALL
34from acts.test_utils.tel.tel_defines import WFC_MODE_WIFI_ONLY
35from acts.test_utils.tel.tel_defines import WFC_MODE_WIFI_PREFERRED
36from acts.test_utils.tel.tel_test_utils import call_reject
37from acts.test_utils.tel.tel_test_utils import call_setup_teardown
38from acts.test_utils.tel.tel_test_utils import get_call_uri
39from acts.test_utils.tel.tel_test_utils import get_phone_number
40from acts.test_utils.tel.tel_test_utils import hangup_call
41from acts.test_utils.tel.tel_test_utils import is_uri_equivalent
42from acts.test_utils.tel.tel_test_utils import multithread_func
43from acts.test_utils.tel.tel_test_utils import num_active_calls
44from acts.test_utils.tel.tel_test_utils import verify_incall_state
45from acts.test_utils.tel.tel_test_utils import wait_and_answer_call
46from acts.test_utils.tel.tel_voice_utils import get_cep_conference_call_id
47from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_1x
48from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_2g
49from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_3g
50from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_csfb
51from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_iwlan
52from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_volte
53from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_wcdma
54from acts.test_utils.tel.tel_voice_utils import phone_setup_3g
55from acts.test_utils.tel.tel_voice_utils import phone_setup_voice_2g
56from acts.test_utils.tel.tel_voice_utils import phone_setup_voice_3g
57from acts.test_utils.tel.tel_voice_utils import phone_setup_csfb
58from acts.test_utils.tel.tel_voice_utils import phone_setup_iwlan
59from acts.test_utils.tel.tel_voice_utils import phone_setup_voice_general
60from acts.test_utils.tel.tel_voice_utils import phone_setup_volte
61from acts.test_utils.tel.tel_voice_utils import swap_calls
62
63
64class TelLiveVoiceConfTest(TelephonyBaseTest):
65    def setup_class(self):
66        TelephonyBaseTest.setup_class(self)
67        if CAPABILITY_CONFERENCE not in self.android_devices[0].telephony.get(
68                "capabilities", []):
69            self.android_devices[0].log.error(
70                "Conference call is not supported, abort test.")
71            raise signals.TestAbortClass(
72                "Conference call is not supported, abort test.")
73
74    # Note: Currently Conference Call do not verify voice.
75    # So even if test cases passed, does not necessarily means
76    # conference call functionality is working.
77    # Need to add code to check for voice.
78    """ Private Test Utils """
79
80    def _get_expected_call_state(self, ad):
81        if "vzw" in [
82                sub["operator"]
83                for sub in ad.telephony["subscription"].values()
84        ]:
85            return CALL_STATE_ACTIVE
86        return CALL_STATE_HOLDING
87
88    def _hangup_call(self, ad, device_description='Device'):
89        if not hangup_call(self.log, ad):
90            ad.log.error("Failed to hang up on %s", device_description)
91            return False
92        return True
93
94    def _three_phone_call_mo_add_mo(self, ads, phone_setups, verify_funcs):
95        """Use 3 phones to make MO calls.
96
97        Call from PhoneA to PhoneB, accept on PhoneB.
98        Call from PhoneA to PhoneC, accept on PhoneC.
99
100        Args:
101            ads: list of ad object.
102                The list should have three objects.
103            phone_setups: list of phone setup functions.
104                The list should have three objects.
105            verify_funcs: list of phone call verify functions.
106                The list should have three objects.
107
108        Returns:
109            If success, return 'call_AB' id in PhoneA.
110            if fail, return None.
111        """
112
113        class _CallException(Exception):
114            pass
115
116        try:
117            verify_func_a, verify_func_b, verify_func_c = verify_funcs
118            tasks = []
119            for ad, setup_func in zip(ads, phone_setups):
120                if setup_func is not None:
121                    tasks.append((setup_func, (self.log, ad)))
122            if tasks != [] and not multithread_func(self.log, tasks):
123                self.log.error("Phone Failed to Set Up Properly.")
124                raise _CallException("Setup failed.")
125            for ad in ads:
126                ad.droid.telecomCallClearCallList()
127                if num_active_calls(self.log, ad) != 0:
128                    ad.log.error("Phone Call List is not empty.")
129                    raise _CallException("Clear call list failed.")
130
131            self.log.info("Step1: Call From PhoneA to PhoneB.")
132            if not call_setup_teardown(
133                    self.log,
134                    ads[0],
135                    ads[1],
136                    ad_hangup=None,
137                    verify_caller_func=verify_func_a,
138                    verify_callee_func=verify_func_b):
139                raise _CallException("PhoneA call PhoneB failed.")
140
141            calls = ads[0].droid.telecomCallGetCallIds()
142            ads[0].log.info("Calls in PhoneA %s", calls)
143            if num_active_calls(self.log, ads[0]) != 1:
144                raise _CallException("Call list verify failed.")
145            call_ab_id = calls[0]
146
147            self.log.info("Step2: Call From PhoneA to PhoneC.")
148            if not call_setup_teardown(
149                    self.log,
150                    ads[0],
151                    ads[2],
152                    ad_hangup=None,
153                    verify_caller_func=verify_func_a,
154                    verify_callee_func=verify_func_c):
155                raise _CallException("PhoneA call PhoneC failed.")
156            if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]],
157                                       True):
158                raise _CallException("Not All phones are in-call.")
159
160        except _CallException:
161            return None
162
163        return call_ab_id
164
165    def _three_phone_call_mo_add_mt(self, ads, phone_setups, verify_funcs):
166        """Use 3 phones to make MO call and MT call.
167
168        Call from PhoneA to PhoneB, accept on PhoneB.
169        Call from PhoneC to PhoneA, accept on PhoneA.
170
171        Args:
172            ads: list of ad object.
173                The list should have three objects.
174            phone_setups: list of phone setup functions.
175                The list should have three objects.
176            verify_funcs: list of phone call verify functions.
177                The list should have three objects.
178
179        Returns:
180            If success, return 'call_AB' id in PhoneA.
181            if fail, return None.
182        """
183
184        class _CallException(Exception):
185            pass
186
187        try:
188            verify_func_a, verify_func_b, verify_func_c = verify_funcs
189            tasks = []
190            for ad, setup_func in zip(ads, phone_setups):
191                if setup_func is not None:
192                    tasks.append((setup_func, (self.log, ad)))
193            if tasks != [] and not multithread_func(self.log, tasks):
194                self.log.error("Phone Failed to Set Up Properly.")
195                raise _CallException("Setup failed.")
196            for ad in ads:
197                ad.droid.telecomCallClearCallList()
198                if num_active_calls(self.log, ad) != 0:
199                    ad.log.error("Phone Call List is not empty.")
200                    raise _CallException("Clear call list failed.")
201
202            self.log.info("Step1: Call From PhoneA to PhoneB.")
203            if not call_setup_teardown(
204                    self.log,
205                    ads[0],
206                    ads[1],
207                    ad_hangup=None,
208                    verify_caller_func=verify_func_a,
209                    verify_callee_func=verify_func_b):
210                raise _CallException("PhoneA call PhoneB failed.")
211
212            calls = ads[0].droid.telecomCallGetCallIds()
213            ads[0].log.info("Calls in PhoneA %s", calls)
214            if num_active_calls(self.log, ads[0]) != 1:
215                raise _CallException("Call list verify failed.")
216            call_ab_id = calls[0]
217
218            self.log.info("Step2: Call From PhoneC to PhoneA.")
219            if not call_setup_teardown(
220                    self.log,
221                    ads[2],
222                    ads[0],
223                    ad_hangup=None,
224                    verify_caller_func=verify_func_c,
225                    verify_callee_func=verify_func_a):
226                raise _CallException("PhoneA call PhoneC failed.")
227            if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]],
228                                       True):
229                raise _CallException("Not All phones are in-call.")
230
231        except _CallException:
232            return None
233
234        return call_ab_id
235
236    def _three_phone_call_mo_add_mt_reject(self, ads, verify_funcs, reject):
237        """Use 3 phones to make MO call and MT call.
238
239        Call from PhoneA to PhoneB, accept on PhoneB.
240        Call from PhoneC to PhoneA. PhoneA receive incoming call.
241            if reject is True, then reject the call on PhoneA.
242            if reject if False, then just ignore the incoming call on PhoneA.
243
244        Args:
245            ads: list of ad object.
246                The list should have three objects.
247            verify_funcs: list of phone call verify functions for
248                PhoneA and PhoneB. The list should have two objects.
249
250        Returns:
251            True if no error happened.
252        """
253
254        class _CallException(Exception):
255            pass
256
257        try:
258            verify_func_a, verify_func_b = verify_funcs
259            self.log.info("Step1: Call From PhoneA to PhoneB.")
260            if not call_setup_teardown(
261                    self.log,
262                    ads[0],
263                    ads[1],
264                    ad_hangup=None,
265                    verify_caller_func=verify_func_a,
266                    verify_callee_func=verify_func_b):
267                raise _CallException("PhoneA call PhoneB failed.")
268
269            self.log.info("Step2: Call From PhoneC to PhoneA then decline.")
270            if not call_reject(self.log, ads[2], ads[0], reject):
271                raise _CallException("PhoneC call PhoneA then decline failed.")
272            time.sleep(WAIT_TIME_IN_CALL)
273            if not verify_incall_state(self.log, [ads[0], ads[1]], True):
274                raise _CallException("PhoneA and PhoneB are not in call.")
275
276        except _CallException:
277            return False
278
279        return True
280
281    def _three_phone_call_mt_add_mt(self, ads, phone_setups, verify_funcs):
282        """Use 3 phones to make MT call and MT call.
283
284        Call from PhoneB to PhoneA, accept on PhoneA.
285        Call from PhoneC to PhoneA, accept on PhoneA.
286
287        Args:
288            ads: list of ad object.
289                The list should have three objects.
290            phone_setups: list of phone setup functions.
291                The list should have three objects.
292            verify_funcs: list of phone call verify functions.
293                The list should have three objects.
294
295        Returns:
296            If success, return 'call_AB' id in PhoneA.
297            if fail, return None.
298        """
299
300        class _CallException(Exception):
301            pass
302
303        try:
304            verify_func_a, verify_func_b, verify_func_c = verify_funcs
305            tasks = []
306            for ad, setup_func in zip(ads, phone_setups):
307                if setup_func is not None:
308                    tasks.append((setup_func, (self.log, ad)))
309            if tasks != [] and not multithread_func(self.log, tasks):
310                self.log.error("Phone Failed to Set Up Properly.")
311                raise _CallException("Setup failed.")
312            for ad in ads:
313                ad.droid.telecomCallClearCallList()
314                if num_active_calls(self.log, ad) != 0:
315                    ad.log.error("Phone Call List is not empty.")
316                    raise _CallException("Clear call list failed.")
317
318            self.log.info("Step1: Call From PhoneB to PhoneA.")
319            if not call_setup_teardown(
320                    self.log,
321                    ads[1],
322                    ads[0],
323                    ad_hangup=None,
324                    verify_caller_func=verify_func_b,
325                    verify_callee_func=verify_func_a):
326                raise _CallException("PhoneB call PhoneA failed.")
327
328            calls = ads[0].droid.telecomCallGetCallIds()
329            ads[0].log.info("Calls in PhoneA %s", calls)
330            if num_active_calls(self.log, ads[0]) != 1:
331                raise _CallException("Call list verify failed.")
332            call_ab_id = calls[0]
333
334            self.log.info("Step2: Call From PhoneC to PhoneA.")
335            if not call_setup_teardown(
336                    self.log,
337                    ads[2],
338                    ads[0],
339                    ad_hangup=None,
340                    verify_caller_func=verify_func_c,
341                    verify_callee_func=verify_func_a):
342                raise _CallException("PhoneA call PhoneC failed.")
343            if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]],
344                                       True):
345                raise _CallException("Not All phones are in-call.")
346
347        except _CallException:
348            return None
349
350        return call_ab_id
351
352    def _test_1x_mo_mo_add(self):
353        """Test multi call feature in 1x call.
354
355        PhoneA (1x) call PhoneB, accept on PhoneB.
356        PhoneA (1x) call PhoneC, accept on PhoneC.
357
358        Returns:
359            call_ab_id, call_ac_id, call_conf_id if succeed;
360            None, None, None if failed.
361
362        """
363        ads = self.android_devices
364
365        # make sure PhoneA is CDMA phone before proceed.
366        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
367            ads[0].log.error("not CDMA phone, abort this 1x test.")
368            return None, None, None
369
370        call_ab_id = self._three_phone_call_mo_add_mo(
371            [ads[0], ads[1], ads[2]], [
372                phone_setup_voice_3g, phone_setup_voice_general,
373                phone_setup_voice_general
374            ], [is_phone_in_call_1x, None, None])
375        if call_ab_id is None:
376            self.log.error("Failed to get call_ab_id")
377            return None, None, None
378
379        calls = ads[0].droid.telecomCallGetCallIds()
380        ads[0].log.info("Calls in PhoneA %s", calls)
381        if num_active_calls(self.log, ads[0]) != 3:
382            return None, None, None
383        for call_id in calls:
384            if (CALL_CAPABILITY_MERGE_CONFERENCE in ads[0]
385                    .droid.telecomCallGetCapabilities(call_id)):
386                call_conf_id = call_id
387            elif call_id != call_ab_id:
388                call_ac_id = call_id
389
390        return call_ab_id, call_ac_id, call_conf_id
391
392    def _test_1x_mo_mt_add_swap_x(self, num_swaps):
393        """Test multi call feature in 1x call.
394
395        PhoneA (1x) call PhoneB, accept on PhoneB.
396        PhoneC call PhoneA (1x), accept on PhoneA.
397        Swap active call on PhoneA.(N times)
398
399        Returns:
400            call_ab_id, call_ac_id, call_conf_id if succeed;
401            None, None, None if failed.
402
403        """
404        ads = self.android_devices
405
406        # make sure PhoneA is CDMA phone before proceed.
407        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
408            ads[0].log.error("not CDMA phone, abort this 1x test.")
409            return None, None, None
410
411        call_ab_id = self._three_phone_call_mo_add_mt(
412            [ads[0], ads[1], ads[2]], [
413                phone_setup_voice_3g, phone_setup_voice_general,
414                phone_setup_voice_general
415            ], [is_phone_in_call_1x, None, None])
416        if call_ab_id is None:
417            self.log.error("Failed to get call_ab_id")
418            return None, None, None
419
420        call_conf_id = None
421        calls = ads[0].droid.telecomCallGetCallIds()
422        ads[0].log.info("Calls in PhoneA %s", calls)
423        if num_active_calls(self.log, ads[0]) != 3:
424            return None, None, None
425        for call_id in calls:
426            if (CALL_CAPABILITY_SWAP_CONFERENCE in ads[0]
427                    .droid.telecomCallGetCapabilities(call_id)):
428                call_conf_id = call_id
429            elif call_id != call_ab_id:
430                call_ac_id = call_id
431
432        if num_swaps > 0:
433            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
434            if not swap_calls(
435                    self.log,
436                    ads,
437                    call_ab_id,
438                    call_ac_id,
439                    num_swaps,
440                    check_call_status=False):
441                self.log.error("Swap test failed.")
442                return None, None, None
443
444        return call_ab_id, call_ac_id, call_conf_id
445
446    def _test_1x_mt_mt_add_swap_x(self, num_swaps):
447        """Test multi call feature in 1x call.
448
449        PhoneB call PhoneA (1x), accept on PhoneA.
450        PhoneC call PhoneA (1x), accept on PhoneA.
451        Swap active call on PhoneA.(N times)
452
453        Returns:
454            call_ab_id, call_ac_id, call_conf_id if succeed;
455            None, None, None if failed.
456
457        """
458        ads = self.android_devices
459
460        # make sure PhoneA is CDMA phone before proceed.
461        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
462            ads[0].log.error("not CDMA phone, abort this 1x test.")
463            return None, None, None
464
465        call_ab_id = self._three_phone_call_mt_add_mt(
466            [ads[0], ads[1], ads[2]], [
467                phone_setup_voice_3g, phone_setup_voice_general,
468                phone_setup_voice_general
469            ], [is_phone_in_call_1x, None, None])
470        if call_ab_id is None:
471            self.log.error("Failed to get call_ab_id")
472            return None, None, None
473
474        call_conf_id = None
475        calls = ads[0].droid.telecomCallGetCallIds()
476        ads[0].log.info("Calls in PhoneA %s", calls)
477        if num_active_calls(self.log, ads[0]) != 3:
478            return None, None, None
479        for call_id in calls:
480            if (CALL_CAPABILITY_SWAP_CONFERENCE in ads[0]
481                    .droid.telecomCallGetCapabilities(call_id)):
482                call_conf_id = call_id
483            elif call_id != call_ab_id:
484                call_ac_id = call_id
485
486        if num_swaps > 0:
487            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
488            if not swap_calls(
489                    self.log,
490                    ads,
491                    call_ab_id,
492                    call_ac_id,
493                    num_swaps,
494                    check_call_status=False):
495                self.log.error("Swap test failed.")
496                return None, None, None
497
498        return call_ab_id, call_ac_id, call_conf_id
499
500    def _test_1x_multi_call_drop_from_participant(self, host, first_drop_ad,
501                                                  second_drop_ad):
502        """Test private function to drop call from participant in 1x multi call.
503
504        Host(1x) is in multi call scenario with first_drop_ad and second_drop_ad.
505        Drop call on first_drop_ad.
506        Verify call continues between host and second_drop_ad.
507        Drop call on second_drop_ad and verify host also ends.
508
509        Args:
510            host: android device object for multi-call/conference-call host.
511            first_drop_ad: android device object for call participant, end call
512                on this participant first.
513            second_drop_ad: android device object for call participant, end call
514                on this participant second.
515
516        Returns:
517            True if no error happened. Otherwise False.
518        """
519        self.log.info("Drop 1st call.")
520        if not self._hangup_call(first_drop_ad):
521            return False
522        time.sleep(WAIT_TIME_IN_CALL)
523        calls = host.droid.telecomCallGetCallIds()
524        host.log.info("Calls list: %s", calls)
525        if num_active_calls(self.log, host) != 3:
526            return False
527        if not verify_incall_state(self.log, [host, second_drop_ad], True):
528            return False
529        if not verify_incall_state(self.log, [first_drop_ad], False):
530            return False
531
532        self.log.info("Drop 2nd call.")
533        if not self._hangup_call(second_drop_ad):
534            return False
535        time.sleep(WAIT_TIME_IN_CALL)
536        if not verify_incall_state(
537                self.log, [host, second_drop_ad, first_drop_ad], False):
538            return False
539        return True
540
541    def _test_1x_multi_call_drop_from_host(self, host, active_participant_ad,
542                                           held_participant_ad):
543        """Test private function to drop call from host in 1x multi call.
544
545        Host(1x) is in multi call scenario with first_drop_ad and second_drop_ad.
546        Drop call on host. Then active_participant_ad should ends as well.
547        Host should receive a call back from held_participant_ad. Answer on host.
548        Drop call on host. Then verify held_participant_ad ends as well.
549
550        Args:
551            host: android device object for multi-call/conference-call host.
552            active_participant_ad: android device object for the current active
553                call participant.
554            held_participant_ad: android device object for the current held
555                call participant.
556
557        Returns:
558            True if no error happened. Otherwise False.
559        """
560        self.log.info("Drop current call on Host.")
561        if not self._hangup_call(host, "Host"):
562            return False
563        if not wait_and_answer_call(self.log, host,
564                                    get_phone_number(self.log,
565                                                     held_participant_ad)):
566            self.log.error("Did not receive call back.")
567            return False
568        time.sleep(WAIT_TIME_IN_CALL)
569        if not verify_incall_state(self.log, [host, held_participant_ad],
570                                   True):
571            return False
572        if not verify_incall_state(self.log, [active_participant_ad], False):
573            return False
574
575        self.log.info("Drop current call on Host.")
576        if not self._hangup_call(host, "Host"):
577            return False
578        time.sleep(WAIT_TIME_IN_CALL)
579        if not verify_incall_state(
580                self.log, [host, held_participant_ad, active_participant_ad],
581                False):
582            return False
583        return True
584
585    def _test_1x_conf_call_drop_from_host(self, host, participant_list):
586        """Test private function to drop call from host in 1x conference call.
587
588        Host(1x) is in conference call scenario with phones in participant_list.
589        End call on host. Then all phones in participant_list should end call.
590
591        Args:
592            host: android device object for multi-call/conference-call host.
593            participant_list: android device objects list for all other
594                participants in multi-call/conference-call.
595
596        Returns:
597            True if no error happened. Otherwise False.
598        """
599        self.log.info("Drop conference call on Host.")
600        if not self._hangup_call(host, "Host"):
601            return False
602        time.sleep(WAIT_TIME_IN_CALL)
603        if not verify_incall_state(self.log, [host], False):
604            return False
605        if not verify_incall_state(self.log, participant_list, False):
606            return False
607        return True
608
609    def _test_1x_merge_conference(self, host, participant_list, call_conf_id):
610        """Test private function to merge to conference in 1x multi call scenario.
611
612        Host(1x) is in multi call scenario with phones in participant_list.
613        Merge to conference on host.
614        Verify merge succeed.
615
616        Args:
617            host: android device object for multi-call/conference-call host.
618            participant_list: android device objects list for all other
619                participants in multi-call/conference-call.
620            call_conf_id: conference call id in host android device object.
621
622        Returns:
623            True if no error happened. Otherwise False.
624        """
625        host.droid.telecomCallMergeToConf(call_conf_id)
626        time.sleep(WAIT_TIME_IN_CALL)
627        calls = host.droid.telecomCallGetCallIds()
628        host.log.info("Calls in Phone %s", calls)
629        if num_active_calls(self.log, host) != 3:
630            return False
631        if not verify_incall_state(self.log, [host], True):
632            return False
633        if not verify_incall_state(self.log, participant_list, True):
634            return False
635        if (CALL_CAPABILITY_MERGE_CONFERENCE in
636                host.droid.telecomCallGetCapabilities(call_conf_id)):
637            self.log.error("Merge conference failed.")
638            return False
639        return True
640
641    def _test_volte_mo_mo_add_volte_swap_x(self, num_swaps):
642        """Test swap feature in VoLTE call.
643
644        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
645        PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
646        Swap active call on PhoneA.(N times)
647
648        Args:
649            num_swaps: do swap for 'num_swaps' times.
650                This value can be 0 (no swap operation).
651
652        Returns:
653            call_ab_id, call_ac_id if succeed;
654            None, None if failed.
655
656        """
657        ads = self.android_devices
658
659        call_ab_id = self._three_phone_call_mo_add_mo(
660            [ads[0], ads[1], ads[2]],
661            [phone_setup_volte, phone_setup_volte, phone_setup_volte], [
662                is_phone_in_call_volte, is_phone_in_call_volte,
663                is_phone_in_call_volte
664            ])
665        if call_ab_id is None:
666            self.log.error("Failed to get call_ab_id")
667            return None, None
668
669        calls = ads[0].droid.telecomCallGetCallIds()
670        ads[0].log.info("Calls in PhoneA %s", calls)
671        if num_active_calls(self.log, ads[0]) != 2:
672            return None, None
673        if calls[0] == call_ab_id:
674            call_ac_id = calls[1]
675        else:
676            call_ac_id = calls[0]
677
678        if num_swaps > 0:
679            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
680            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
681                              num_swaps):
682                self.log.error("Swap test failed.")
683                return None, None
684
685        return call_ab_id, call_ac_id
686
687    def _test_volte_mo_mt_add_volte_swap_x(self, num_swaps):
688        """Test swap feature in VoLTE call.
689
690        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
691        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
692        Swap active call on PhoneA. (N times)
693
694        Args:
695            num_swaps: do swap for 'num_swaps' times.
696                This value can be 0 (no swap operation).
697
698        Returns:
699            call_ab_id, call_ac_id if succeed;
700            None, None if failed.
701
702        """
703        ads = self.android_devices
704
705        call_ab_id = self._three_phone_call_mo_add_mt(
706            [ads[0], ads[1], ads[2]],
707            [phone_setup_volte, phone_setup_volte, phone_setup_volte], [
708                is_phone_in_call_volte, is_phone_in_call_volte,
709                is_phone_in_call_volte
710            ])
711        if call_ab_id is None:
712            self.log.error("Failed to get call_ab_id")
713            return None, None
714
715        calls = ads[0].droid.telecomCallGetCallIds()
716        ads[0].log.info("Calls in PhoneA %s", calls)
717        if num_active_calls(self.log, ads[0]) != 2:
718            return None, None
719        if calls[0] == call_ab_id:
720            call_ac_id = calls[1]
721        else:
722            call_ac_id = calls[0]
723
724        if num_swaps > 0:
725            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
726            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
727                              num_swaps):
728                self.log.error("Swap test failed.")
729                return None, None
730
731        return call_ab_id, call_ac_id
732
733    def _test_volte_mt_mt_add_volte_swap_x(self, num_swaps):
734        """Test swap feature in VoLTE call.
735
736        PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
737        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
738        Swap active call on PhoneA. (N times)
739
740        Args:
741            num_swaps: do swap for 'num_swaps' times.
742                This value can be 0 (no swap operation).
743
744        Returns:
745            call_ab_id, call_ac_id if succeed;
746            None, None if failed.
747
748        """
749        ads = self.android_devices
750
751        call_ab_id = self._three_phone_call_mt_add_mt(
752            [ads[0], ads[1], ads[2]],
753            [phone_setup_volte, phone_setup_volte, phone_setup_volte], [
754                is_phone_in_call_volte, is_phone_in_call_volte,
755                is_phone_in_call_volte
756            ])
757        if call_ab_id is None:
758            self.log.error("Failed to get call_ab_id")
759            return None, None
760
761        calls = ads[0].droid.telecomCallGetCallIds()
762        ads[0].log.info("Calls in PhoneA %s", calls)
763        if num_active_calls(self.log, ads[0]) != 2:
764            return None, None
765        if calls[0] == call_ab_id:
766            call_ac_id = calls[1]
767        else:
768            call_ac_id = calls[0]
769
770        if num_swaps > 0:
771            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
772            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
773                              num_swaps):
774                self.log.error("Swap test failed.")
775                return None, None
776
777        return call_ab_id, call_ac_id
778
779    def _test_volte_mo_mo_add_wcdma_swap_x(self, num_swaps):
780        """Test swap feature in VoLTE call.
781
782        PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
783        PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
784        Swap active call on PhoneA.(N times)
785
786        Args:
787            num_swaps: do swap for 'num_swaps' times.
788                This value can be 0 (no swap operation).
789
790        Returns:
791            call_ab_id, call_ac_id if succeed;
792            None, None if failed.
793
794        """
795        ads = self.android_devices
796
797        # make sure PhoneB and PhoneC are GSM phone before proceed.
798        for ad in [ads[1], ads[2]]:
799            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
800                ad.log.error("not GSM phone, abort wcdma swap test.")
801                return None, None
802
803        call_ab_id = self._three_phone_call_mo_add_mo(
804            [ads[0], ads[1], ads[2]],
805            [phone_setup_volte, phone_setup_voice_3g, phone_setup_voice_3g], [
806                is_phone_in_call_volte, is_phone_in_call_wcdma,
807                is_phone_in_call_wcdma
808            ])
809        if call_ab_id is None:
810            self.log.error("Failed to get call_ab_id")
811            return None, None
812
813        calls = ads[0].droid.telecomCallGetCallIds()
814        ads[0].log.info("Calls in PhoneA %s", calls)
815        if num_active_calls(self.log, ads[0]) != 2:
816            return None, None
817        if calls[0] == call_ab_id:
818            call_ac_id = calls[1]
819        else:
820            call_ac_id = calls[0]
821
822        if num_swaps > 0:
823            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
824            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
825                              num_swaps):
826                self.log.error("Swap test failed.")
827                return None, None
828
829        return call_ab_id, call_ac_id
830
831    def _test_volte_mo_mt_add_wcdma_swap_x(self, num_swaps):
832        """Test swap feature in VoLTE call.
833
834        PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
835        PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
836        Swap active call on PhoneA.(N times)
837
838        Args:
839            num_swaps: do swap for 'num_swaps' times.
840                This value can be 0 (no swap operation).
841
842        Returns:
843            call_ab_id, call_ac_id if succeed;
844            None, None if failed.
845
846        """
847        ads = self.android_devices
848
849        # make sure PhoneB and PhoneC are GSM phone before proceed.
850        for ad in [ads[1], ads[2]]:
851            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
852                ad.log.error("not GSM phone, abort wcdma swap test.")
853                return None, None
854
855        call_ab_id = self._three_phone_call_mo_add_mt(
856            [ads[0], ads[1], ads[2]],
857            [phone_setup_volte, phone_setup_voice_3g, phone_setup_voice_3g], [
858                is_phone_in_call_volte, is_phone_in_call_wcdma,
859                is_phone_in_call_wcdma
860            ])
861        if call_ab_id is None:
862            self.log.error("Failed to get call_ab_id")
863            return None, None
864
865        calls = ads[0].droid.telecomCallGetCallIds()
866        ads[0].log.info("Calls in PhoneA %s", calls)
867        if num_active_calls(self.log, ads[0]) != 2:
868            return None, None
869        if calls[0] == call_ab_id:
870            call_ac_id = calls[1]
871        else:
872            call_ac_id = calls[0]
873
874        if num_swaps > 0:
875            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
876            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
877                              num_swaps):
878                self.log.error("Swap test failed.")
879                return None, None
880
881        return call_ab_id, call_ac_id
882
883    def _test_volte_mt_mt_add_wcdma_swap_x(self, num_swaps):
884        """Test swap feature in VoLTE call.
885
886        PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
887        PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
888        Swap active call on PhoneA.(N times)
889
890        Args:
891            num_swaps: do swap for 'num_swaps' times.
892                This value can be 0 (no swap operation).
893
894        Returns:
895            call_ab_id, call_ac_id if succeed;
896            None, None if failed.
897
898        """
899        ads = self.android_devices
900
901        # make sure PhoneB and PhoneC are GSM phone before proceed.
902        for ad in [ads[1], ads[2]]:
903            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
904                ad.log.error("not GSM phone, abort wcdma swap test.")
905                return None, None
906
907        call_ab_id = self._three_phone_call_mt_add_mt(
908            [ads[0], ads[1], ads[2]],
909            [phone_setup_volte, phone_setup_voice_3g, phone_setup_voice_3g], [
910                is_phone_in_call_volte, is_phone_in_call_wcdma,
911                is_phone_in_call_wcdma
912            ])
913        if call_ab_id is None:
914            self.log.error("Failed to get call_ab_id")
915            return None, None
916
917        calls = ads[0].droid.telecomCallGetCallIds()
918        ads[0].log.info("Calls in PhoneA %s", calls)
919        if num_active_calls(self.log, ads[0]) != 2:
920            return None, None
921        if calls[0] == call_ab_id:
922            call_ac_id = calls[1]
923        else:
924            call_ac_id = calls[0]
925
926        if num_swaps > 0:
927            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
928            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
929                              num_swaps):
930                self.log.error("Swap test failed.")
931                return None, None
932
933        return call_ab_id, call_ac_id
934
935    def _test_volte_mo_mo_add_1x_swap_x(self, num_swaps):
936        """Test swap feature in VoLTE call.
937
938        PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
939        PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
940        Swap active call on PhoneA.(N times)
941
942        Args:
943            num_swaps: do swap for 'num_swaps' times.
944                This value can be 0 (no swap operation).
945
946        Returns:
947            call_ab_id, call_ac_id if succeed;
948            None, None if failed.
949
950        """
951        ads = self.android_devices
952
953        # make sure PhoneB and PhoneC are CDMA phone before proceed.
954        for ad in [ads[1], ads[2]]:
955            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
956                ad.log.error("not CDMA phone, abort 1x swap test.")
957                return None, None
958
959        call_ab_id = self._three_phone_call_mo_add_mo(
960            [ads[0], ads[1], ads[2]],
961            [phone_setup_volte, phone_setup_voice_3g, phone_setup_voice_3g],
962            [is_phone_in_call_volte, is_phone_in_call_1x, is_phone_in_call_1x])
963        if call_ab_id is None:
964            self.log.error("Failed to get call_ab_id")
965            return None, None
966
967        calls = ads[0].droid.telecomCallGetCallIds()
968        ads[0].log.info("Calls in PhoneA %s", calls)
969        if num_active_calls(self.log, ads[0]) != 2:
970            return None, None
971        if calls[0] == call_ab_id:
972            call_ac_id = calls[1]
973        else:
974            call_ac_id = calls[0]
975
976        if num_swaps > 0:
977            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
978            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
979                              num_swaps):
980                self.log.error("Swap test failed.")
981                return None, None
982
983        return call_ab_id, call_ac_id
984
985    def _test_volte_mo_mt_add_1x_swap_x(self, num_swaps):
986        """Test swap feature in VoLTE call.
987
988        PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
989        PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
990        Swap active call on PhoneA.(N times)
991
992        Args:
993            num_swaps: do swap for 'num_swaps' times.
994                This value can be 0 (no swap operation).
995
996        Returns:
997            call_ab_id, call_ac_id if succeed;
998            None, None if failed.
999
1000        """
1001        ads = self.android_devices
1002
1003        # make sure PhoneB and PhoneC are CDMA phone before proceed.
1004        for ad in [ads[1], ads[2]]:
1005            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
1006                ad.log.error("not CDMA phone, abort 1x swap test.")
1007                return None, None
1008
1009        call_ab_id = self._three_phone_call_mo_add_mt(
1010            [ads[0], ads[1], ads[2]],
1011            [phone_setup_volte, phone_setup_voice_3g, phone_setup_voice_3g],
1012            [is_phone_in_call_volte, is_phone_in_call_1x, is_phone_in_call_1x])
1013        if call_ab_id is None:
1014            self.log.error("Failed to get call_ab_id")
1015            return None, None
1016
1017        calls = ads[0].droid.telecomCallGetCallIds()
1018        ads[0].log.info("Calls in PhoneA %s", calls)
1019        if num_active_calls(self.log, ads[0]) != 2:
1020            return None, None
1021        if calls[0] == call_ab_id:
1022            call_ac_id = calls[1]
1023        else:
1024            call_ac_id = calls[0]
1025
1026        if num_swaps > 0:
1027            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1028            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1029                              num_swaps):
1030                self.log.error("Swap test failed.")
1031                return None, None
1032
1033        return call_ab_id, call_ac_id
1034
1035    def _test_volte_mt_mt_add_1x_swap_x(self, num_swaps):
1036        """Test swap feature in VoLTE call.
1037
1038        PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
1039        PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
1040        Swap active call on PhoneA.(N times)
1041
1042        Args:
1043            num_swaps: do swap for 'num_swaps' times.
1044                This value can be 0 (no swap operation).
1045
1046        Returns:
1047            call_ab_id, call_ac_id if succeed;
1048            None, None if failed.
1049
1050        """
1051        ads = self.android_devices
1052
1053        # make sure PhoneB and PhoneC are CDMA phone before proceed.
1054        for ad in [ads[1], ads[2]]:
1055            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
1056                self.log.error("not CDMA phone, abort 1x swap test.")
1057                return None, None
1058
1059        call_ab_id = self._three_phone_call_mt_add_mt(
1060            [ads[0], ads[1], ads[2]],
1061            [phone_setup_volte, phone_setup_voice_3g, phone_setup_voice_3g],
1062            [is_phone_in_call_volte, is_phone_in_call_1x, is_phone_in_call_1x])
1063        if call_ab_id is None:
1064            self.log.error("Failed to get call_ab_id")
1065            return None, None
1066
1067        calls = ads[0].droid.telecomCallGetCallIds()
1068        ads[0].log.info("Calls in PhoneA %s", calls)
1069        if num_active_calls(self.log, ads[0]) != 2:
1070            return None, None
1071        if calls[0] == call_ab_id:
1072            call_ac_id = calls[1]
1073        else:
1074            call_ac_id = calls[0]
1075
1076        if num_swaps > 0:
1077            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1078            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1079                              num_swaps):
1080                self.log.error("Swap test failed.")
1081                return None, None
1082
1083        return call_ab_id, call_ac_id
1084
1085    def _test_wcdma_mo_mo_add_swap_x(self, num_swaps):
1086        """Test swap feature in WCDMA call.
1087
1088        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
1089        PhoneA (WCDMA) call PhoneC, accept on PhoneC.
1090        Swap active call on PhoneA. (N times)
1091
1092        Args:
1093            num_swaps: do swap for 'num_swaps' times.
1094                This value can be 0 (no swap operation).
1095
1096        Returns:
1097            call_ab_id, call_ac_id if succeed;
1098            None, None if failed.
1099
1100        """
1101        ads = self.android_devices
1102
1103        # make sure PhoneA is GSM phone before proceed.
1104        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
1105            ad.log.error("not GSM phone, abort wcdma swap test.")
1106            return None, None
1107
1108        call_ab_id = self._three_phone_call_mo_add_mo(
1109            [ads[0], ads[1], ads[2]], [
1110                phone_setup_voice_3g, phone_setup_voice_general,
1111                phone_setup_voice_general
1112            ], [is_phone_in_call_3g, None, None])
1113        if call_ab_id is None:
1114            self.log.error("Failed to get call_ab_id")
1115            return None, None
1116
1117        calls = ads[0].droid.telecomCallGetCallIds()
1118        ads[0].log.info("Calls in PhoneA %s", calls)
1119        if num_active_calls(self.log, ads[0]) != 2:
1120            return None, None
1121        if calls[0] == call_ab_id:
1122            call_ac_id = calls[1]
1123        else:
1124            call_ac_id = calls[0]
1125
1126        if num_swaps > 0:
1127            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1128            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1129                              num_swaps):
1130                self.log.error("Swap test failed.")
1131                return None, None
1132
1133        return call_ab_id, call_ac_id
1134
1135    def _test_wcdma_mt_mt_add_swap_x(self, num_swaps):
1136        """Test swap feature in WCDMA call.
1137
1138        PhoneB call PhoneA (WCDMA), accept on PhoneA.
1139        PhoneC call PhoneA (WCDMA), accept on PhoneA.
1140        Swap active call on PhoneA. (N times)
1141
1142        Args:
1143            num_swaps: do swap for 'num_swaps' times.
1144                This value can be 0 (no swap operation).
1145
1146        Returns:
1147            call_ab_id, call_ac_id if succeed;
1148            None, None if failed.
1149
1150        """
1151        ads = self.android_devices
1152
1153        # make sure PhoneA is GSM phone before proceed.
1154        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
1155            ads[0].log.error("not GSM phone, abort wcdma swap test.")
1156            return None, None
1157
1158        call_ab_id = self._three_phone_call_mt_add_mt(
1159            [ads[0], ads[1], ads[2]], [
1160                phone_setup_voice_3g, phone_setup_voice_general,
1161                phone_setup_voice_general
1162            ], [is_phone_in_call_3g, None, None])
1163        if call_ab_id is None:
1164            self.log.error("Failed to get call_ab_id")
1165            return None, None
1166
1167        calls = ads[0].droid.telecomCallGetCallIds()
1168        ads[0].log.info("Calls in PhoneA %s", calls)
1169        if num_active_calls(self.log, ads[0]) != 2:
1170            return None, None
1171        if calls[0] == call_ab_id:
1172            call_ac_id = calls[1]
1173        else:
1174            call_ac_id = calls[0]
1175
1176        if num_swaps > 0:
1177            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1178            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1179                              num_swaps):
1180                self.log.error("Swap test failed.")
1181                return None, None
1182
1183        return call_ab_id, call_ac_id
1184
1185    def _test_wcdma_mo_mt_add_swap_x(self, num_swaps):
1186        """Test swap feature in WCDMA call.
1187
1188        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
1189        PhoneC call PhoneA (WCDMA), accept on PhoneA.
1190        Swap active call on PhoneA. (N times)
1191
1192        Args:
1193            num_swaps: do swap for 'num_swaps' times.
1194                This value can be 0 (no swap operation).
1195
1196        Returns:
1197            call_ab_id, call_ac_id if succeed;
1198            None, None if failed.
1199
1200        """
1201        ads = self.android_devices
1202
1203        # make sure PhoneA is GSM phone before proceed.
1204        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
1205            ads[0].log.error("not GSM phone, abort wcdma swap test.")
1206            return None, None
1207
1208        call_ab_id = self._three_phone_call_mo_add_mt(
1209            [ads[0], ads[1], ads[2]], [
1210                phone_setup_voice_3g, phone_setup_voice_general,
1211                phone_setup_voice_general
1212            ], [is_phone_in_call_wcdma, None, None])
1213        if call_ab_id is None:
1214            self.log.error("Failed to get call_ab_id")
1215            return None, None
1216
1217        calls = ads[0].droid.telecomCallGetCallIds()
1218        ads[0].log.info("Calls in PhoneA %s", calls)
1219        if num_active_calls(self.log, ads[0]) != 2:
1220            return None, None
1221        if calls[0] == call_ab_id:
1222            call_ac_id = calls[1]
1223        else:
1224            call_ac_id = calls[0]
1225
1226        if num_swaps > 0:
1227            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1228            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1229                              num_swaps):
1230                self.log.error("Swap test failed.")
1231                return None, None
1232
1233        return call_ab_id, call_ac_id
1234
1235    def _test_csfb_wcdma_mo_mo_add_swap_x(self, num_swaps):
1236        """Test swap feature in CSFB WCDMA call.
1237
1238        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
1239        PhoneA (CSFB WCDMA) call PhoneC, accept on PhoneC.
1240        Swap active call on PhoneA. (N times)
1241
1242        Args:
1243            num_swaps: do swap for 'num_swaps' times.
1244                This value can be 0 (no swap operation).
1245
1246        Returns:
1247            call_ab_id, call_ac_id if succeed;
1248            None, None if failed.
1249
1250        """
1251        ads = self.android_devices
1252
1253        # make sure PhoneA is GSM phone before proceed.
1254        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
1255            ads[0].log.error("not GSM phone, abort wcdma swap test.")
1256            return None, None
1257
1258        call_ab_id = self._three_phone_call_mo_add_mo(
1259            [ads[0], ads[1], ads[2]], [
1260                phone_setup_csfb, phone_setup_voice_general,
1261                phone_setup_voice_general
1262            ], [is_phone_in_call_csfb, None, None])
1263        if call_ab_id is None:
1264            self.log.error("Failed to get call_ab_id")
1265            return None, None
1266
1267        calls = ads[0].droid.telecomCallGetCallIds()
1268        ads[0].log.info("Calls in PhoneA %s", calls)
1269        if num_active_calls(self.log, ads[0]) != 2:
1270            return None, None
1271        if calls[0] == call_ab_id:
1272            call_ac_id = calls[1]
1273        else:
1274            call_ac_id = calls[0]
1275
1276        if num_swaps > 0:
1277            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1278            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1279                              num_swaps):
1280                self.log.error("Swap test failed.")
1281                return None, None
1282
1283        return call_ab_id, call_ac_id
1284
1285    def _test_csfb_wcdma_mo_mt_add_swap_x(self, num_swaps):
1286        """Test swap feature in CSFB WCDMA call.
1287
1288        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
1289        PhoneC call PhoneA (CSFB WCDMA), accept on PhoneA.
1290        Swap active call on PhoneA. (N times)
1291
1292        Args:
1293            num_swaps: do swap for 'num_swaps' times.
1294                This value can be 0 (no swap operation).
1295
1296        Returns:
1297            call_ab_id, call_ac_id if succeed;
1298            None, None if failed.
1299
1300        """
1301        ads = self.android_devices
1302
1303        # make sure PhoneA is GSM phone before proceed.
1304        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
1305            ads[0].log.error("not GSM phone, abort wcdma swap test.")
1306            return None, None
1307
1308        call_ab_id = self._three_phone_call_mo_add_mt(
1309            [ads[0], ads[1], ads[2]], [
1310                phone_setup_csfb, phone_setup_voice_general,
1311                phone_setup_voice_general
1312            ], [is_phone_in_call_csfb, None, None])
1313        if call_ab_id is None:
1314            self.log.error("Failed to get call_ab_id")
1315            return None, None
1316
1317        calls = ads[0].droid.telecomCallGetCallIds()
1318        ads[0].log.info("Calls in PhoneA %s", calls)
1319        if num_active_calls(self.log, ads[0]) != 2:
1320            return None, None
1321        if calls[0] == call_ab_id:
1322            call_ac_id = calls[1]
1323        else:
1324            call_ac_id = calls[0]
1325
1326        if num_swaps > 0:
1327            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1328            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1329                              num_swaps):
1330                self.log.error("Swap test failed.")
1331                return None, None
1332
1333        return call_ab_id, call_ac_id
1334
1335    def _test_ims_conference_merge_drop_second_call_no_cep(
1336            self, call_ab_id, call_ac_id):
1337        """Test conference merge and drop in VoLTE call.
1338
1339        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneB.
1340        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneC.
1341        Merge calls to conference on PhoneA.
1342        Hangup on PhoneC, check call continues between AB.
1343        Hangup on PhoneB, check A ends.
1344
1345        Args:
1346            call_ab_id: call id for call_AB on PhoneA.
1347            call_ac_id: call id for call_AC on PhoneA.
1348
1349        Returns:
1350            True if succeed;
1351            False if failed.
1352        """
1353        ads = self.android_devices
1354
1355        self.log.info("Step4: Merge to Conf Call and verify Conf Call.")
1356        ads[0].droid.telecomCallJoinCallsInConf(call_ab_id, call_ac_id)
1357        time.sleep(WAIT_TIME_IN_CALL)
1358        calls = ads[0].droid.telecomCallGetCallIds()
1359        ads[0].log.info("Calls in PhoneA %s", calls)
1360        if num_active_calls(self.log, ads[0]) != 1:
1361            ads[0].log.error("Total number of call lists is not 1.")
1362            if get_cep_conference_call_id(ads[0]) is not None:
1363                self.log.error("CEP enabled.")
1364            else:
1365                self.log.error("Merge failed.")
1366            return False
1367        call_conf_id = None
1368        for call_id in calls:
1369            if call_id != call_ab_id and call_id != call_ac_id:
1370                call_conf_id = call_id
1371        if not call_conf_id:
1372            self.log.error("Merge call fail, no new conference call id.")
1373            return False
1374        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
1375            return False
1376
1377        # Check if Conf Call is currently active
1378        if ads[0].droid.telecomCallGetCallState(
1379                call_conf_id) != CALL_STATE_ACTIVE:
1380            ads[0].log.error(
1381                "Call_id:%s, state:%s, expected: STATE_ACTIVE", call_conf_id,
1382                ads[0].droid.telecomCallGetCallState(call_conf_id))
1383            return False
1384
1385        self.log.info("Step5: End call on PhoneC and verify call continues.")
1386        if not self._hangup_call(ads[2], "PhoneC"):
1387            return False
1388        time.sleep(WAIT_TIME_IN_CALL)
1389        calls = ads[0].droid.telecomCallGetCallIds()
1390        ads[0].log.info("Calls in PhoneA %s", calls)
1391        if not verify_incall_state(self.log, [ads[0], ads[1]], True):
1392            return False
1393        if not verify_incall_state(self.log, [ads[2]], False):
1394            return False
1395
1396        # Because of b/18413009, VZW VoLTE conference host will not drop call
1397        # even if all participants drop. The reason is VZW network is not
1398        # providing such information to DUT.
1399        # So this test probably will fail on the last step for VZW.
1400        self.log.info("Step6: End call on PhoneB and verify PhoneA end.")
1401        if not self._hangup_call(ads[1], "PhoneB"):
1402            return False
1403        time.sleep(WAIT_TIME_IN_CALL)
1404        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False):
1405            return False
1406        return True
1407
1408    def _merge_cep_conference_call(self, call_ab_id, call_ac_id):
1409        """Merge CEP conference call.
1410
1411        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneB.
1412        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneC.
1413        Merge calls to conference on PhoneA (CEP enabled IMS conference).
1414
1415        Args:
1416            call_ab_id: call id for call_AB on PhoneA.
1417            call_ac_id: call id for call_AC on PhoneA.
1418
1419        Returns:
1420            call_id for conference
1421        """
1422        ads = self.android_devices
1423
1424        self.log.info("Step4: Merge to Conf Call and verify Conf Call.")
1425        ads[0].droid.telecomCallJoinCallsInConf(call_ab_id, call_ac_id)
1426        time.sleep(WAIT_TIME_IN_CALL)
1427        calls = ads[0].droid.telecomCallGetCallIds()
1428        ads[0].log.info("Calls in PhoneA %s", calls)
1429
1430        call_conf_id = get_cep_conference_call_id(ads[0])
1431        if call_conf_id is None:
1432            self.log.error(
1433                "No call with children. Probably CEP not enabled or merge failed."
1434            )
1435            return None
1436        calls.remove(call_conf_id)
1437        if (set(ads[0].droid.telecomCallGetCallChildren(call_conf_id)) !=
1438                set(calls)):
1439            ads[0].log.error(
1440                "Children list %s for conference call is not correct.",
1441                ads[0].droid.telecomCallGetCallChildren(call_conf_id))
1442            return None
1443
1444        if (CALL_PROPERTY_CONFERENCE not in ads[0]
1445                .droid.telecomCallGetProperties(call_conf_id)):
1446            ads[0].log.error(
1447                "Conf call id % properties wrong: %s", call_conf_id,
1448                ads[0].droid.telecomCallGetProperties(call_conf_id))
1449            return None
1450
1451        if (CALL_CAPABILITY_MANAGE_CONFERENCE not in ads[0]
1452                .droid.telecomCallGetCapabilities(call_conf_id)):
1453            ads[0].log.error(
1454                "Conf call id %s capabilities wrong: %s", call_conf_id,
1455                ads[0].droid.telecomCallGetCapabilities(call_conf_id))
1456            return None
1457
1458        if (call_ab_id in calls) or (call_ac_id in calls):
1459            self.log.error(
1460                "Previous call ids should not in new call list after merge.")
1461            return None
1462
1463        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
1464            return None
1465
1466        # Check if Conf Call is currently active
1467        if ads[0].droid.telecomCallGetCallState(
1468                call_conf_id) != CALL_STATE_ACTIVE:
1469            ads[0].log.error(
1470                "Call_ID: %s, state: %s, expected: STATE_ACTIVE", call_conf_id,
1471                ads[0].droid.telecomCallGetCallState(call_conf_id))
1472            return None
1473
1474        return call_conf_id
1475
1476    def _test_ims_conference_merge_drop_second_call_from_participant_cep(
1477            self, call_ab_id, call_ac_id):
1478        """Test conference merge and drop in IMS (VoLTE or WiFi Calling) call.
1479        (CEP enabled).
1480
1481        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneB.
1482        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneC.
1483        Merge calls to conference on PhoneA (CEP enabled IMS conference).
1484        Hangup on PhoneC, check call continues between AB.
1485        Hangup on PhoneB, check A ends.
1486
1487        Args:
1488            call_ab_id: call id for call_AB on PhoneA.
1489            call_ac_id: call id for call_AC on PhoneA.
1490
1491        Returns:
1492            True if succeed;
1493            False if failed.
1494        """
1495        ads = self.android_devices
1496
1497        call_conf_id = self._merge_cep_conference_call(call_ab_id, call_ac_id)
1498        if call_conf_id is None:
1499            return False
1500
1501        self.log.info("Step5: End call on PhoneC and verify call continues.")
1502        if not self._hangup_call(ads[2], "PhoneC"):
1503            return False
1504        time.sleep(WAIT_TIME_IN_CALL)
1505        calls = ads[0].droid.telecomCallGetCallIds()
1506        ads[0].log.info("Calls in PhoneA %s", calls)
1507        if not verify_incall_state(self.log, [ads[0], ads[1]], True):
1508            return False
1509        if not verify_incall_state(self.log, [ads[2]], False):
1510            return False
1511
1512        self.log.info("Step6: End call on PhoneB and verify PhoneA end.")
1513        if not self._hangup_call(ads[1], "PhoneB"):
1514            return False
1515        time.sleep(WAIT_TIME_IN_CALL)
1516        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False):
1517            return False
1518        return True
1519
1520    def _test_ims_conference_merge_drop_first_call_from_participant_cep(
1521            self, call_ab_id, call_ac_id):
1522        """Test conference merge and drop in IMS (VoLTE or WiFi Calling) call.
1523        (CEP enabled).
1524
1525        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneB.
1526        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneC.
1527        Merge calls to conference on PhoneA (CEP enabled IMS conference).
1528        Hangup on PhoneB, check call continues between AC.
1529        Hangup on PhoneC, check A ends.
1530
1531        Args:
1532            call_ab_id: call id for call_AB on PhoneA.
1533            call_ac_id: call id for call_AC on PhoneA.
1534
1535        Returns:
1536            True if succeed;
1537            False if failed.
1538        """
1539        ads = self.android_devices
1540
1541        call_conf_id = self._merge_cep_conference_call(call_ab_id, call_ac_id)
1542        if call_conf_id is None:
1543            return False
1544
1545        self.log.info("Step5: End call on PhoneB and verify call continues.")
1546        if not self._hangup_call(ads[1], "PhoneB"):
1547            return False
1548        time.sleep(WAIT_TIME_IN_CALL)
1549        if not verify_incall_state(self.log, [ads[0], ads[2]], True):
1550            return False
1551        if not verify_incall_state(self.log, [ads[1]], False):
1552            return False
1553
1554        self.log.info("Step6: End call on PhoneC and verify PhoneA end.")
1555        if not self._hangup_call(ads[2], "PhoneC"):
1556            return False
1557        time.sleep(WAIT_TIME_IN_CALL)
1558        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False):
1559            return False
1560        return True
1561
1562    def _test_ims_conference_merge_drop_second_call_from_host_cep(
1563            self, call_ab_id, call_ac_id):
1564        """Test conference merge and drop in IMS (VoLTE or WiFi Calling) call.
1565        (CEP enabled).
1566
1567        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneB.
1568        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneC.
1569        Merge calls to conference on PhoneA (CEP enabled IMS conference).
1570        On PhoneA, disconnect call between A-C, verify PhoneA PhoneB still in call.
1571        On PhoneA, disconnect call between A-B, verify PhoneA PhoneB disconnected.
1572
1573        Args:
1574            call_ab_id: call id for call_AB on PhoneA.
1575            call_ac_id: call id for call_AC on PhoneA.
1576
1577        Returns:
1578            True if succeed;
1579            False if failed.
1580        """
1581        ads = self.android_devices
1582
1583        call_ab_uri = get_call_uri(ads[0], call_ab_id)
1584        call_ac_uri = get_call_uri(ads[0], call_ac_id)
1585
1586        call_conf_id = self._merge_cep_conference_call(call_ab_id, call_ac_id)
1587        if call_conf_id is None:
1588            return False
1589
1590        calls = ads[0].droid.telecomCallGetCallIds()
1591        calls.remove(call_conf_id)
1592
1593        self.log.info("Step5: Disconnect call A-C and verify call continues.")
1594        call_to_disconnect = None
1595        for call in calls:
1596            if is_uri_equivalent(call_ac_uri, get_call_uri(ads[0], call)):
1597                call_to_disconnect = call
1598                calls.remove(call_to_disconnect)
1599                break
1600        if call_to_disconnect is None:
1601            self.log.error("Can NOT find call on host represents A-C.")
1602            return False
1603        else:
1604            ads[0].droid.telecomCallDisconnect(call_to_disconnect)
1605        time.sleep(WAIT_TIME_IN_CALL)
1606        if not verify_incall_state(self.log, [ads[0], ads[1]], True):
1607            return False
1608        if not verify_incall_state(self.log, [ads[2]], False):
1609            return False
1610
1611        self.log.info(
1612            "Step6: Disconnect call A-B and verify PhoneA PhoneB end.")
1613        call_to_disconnect = None
1614        for call in calls:
1615            if is_uri_equivalent(call_ab_uri, get_call_uri(ads[0], call)):
1616                call_to_disconnect = call
1617                calls.remove(call_to_disconnect)
1618                break
1619        if call_to_disconnect is None:
1620            self.log.error("Can NOT find call on host represents A-B.")
1621            return False
1622        else:
1623            ads[0].droid.telecomCallDisconnect(call_to_disconnect)
1624        time.sleep(WAIT_TIME_IN_CALL)
1625        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False):
1626            return False
1627        return True
1628
1629    def _test_ims_conference_merge_drop_first_call_from_host_cep(
1630            self, call_ab_id, call_ac_id):
1631        """Test conference merge and drop in IMS (VoLTE or WiFi Calling) call.
1632        (CEP enabled).
1633
1634        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneB.
1635        PhoneA in IMS (VoLTE or WiFi Calling) call with PhoneC.
1636        Merge calls to conference on PhoneA (CEP enabled IMS conference).
1637        On PhoneA, disconnect call between A-B, verify PhoneA PhoneC still in call.
1638        On PhoneA, disconnect call between A-C, verify PhoneA PhoneC disconnected.
1639
1640        Args:
1641            call_ab_id: call id for call_AB on PhoneA.
1642            call_ac_id: call id for call_AC on PhoneA.
1643
1644        Returns:
1645            True if succeed;
1646            False if failed.
1647        """
1648        ads = self.android_devices
1649
1650        call_ab_uri = get_call_uri(ads[0], call_ab_id)
1651        call_ac_uri = get_call_uri(ads[0], call_ac_id)
1652
1653        call_conf_id = self._merge_cep_conference_call(call_ab_id, call_ac_id)
1654        if call_conf_id is None:
1655            return False
1656
1657        calls = ads[0].droid.telecomCallGetCallIds()
1658        calls.remove(call_conf_id)
1659
1660        self.log.info("Step5: Disconnect call A-B and verify call continues.")
1661        call_to_disconnect = None
1662        for call in calls:
1663            if is_uri_equivalent(call_ab_uri, get_call_uri(ads[0], call)):
1664                call_to_disconnect = call
1665                calls.remove(call_to_disconnect)
1666                break
1667        if call_to_disconnect is None:
1668            self.log.error("Can NOT find call on host represents A-B.")
1669            return False
1670        else:
1671            ads[0].droid.telecomCallDisconnect(call_to_disconnect)
1672        time.sleep(WAIT_TIME_IN_CALL)
1673        if not verify_incall_state(self.log, [ads[0], ads[2]], True):
1674            return False
1675        if not verify_incall_state(self.log, [ads[1]], False):
1676            return False
1677
1678        self.log.info(
1679            "Step6: Disconnect call A-C and verify PhoneA PhoneC end.")
1680        call_to_disconnect = None
1681        for call in calls:
1682            if is_uri_equivalent(call_ac_uri, get_call_uri(ads[0], call)):
1683                call_to_disconnect = call
1684                calls.remove(call_to_disconnect)
1685                break
1686        if call_to_disconnect is None:
1687            self.log.error("Can NOT find call on host represents A-C.")
1688            return False
1689        else:
1690            ads[0].droid.telecomCallDisconnect(call_to_disconnect)
1691        time.sleep(WAIT_TIME_IN_CALL)
1692        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False):
1693            return False
1694        return True
1695
1696    def _test_wcdma_conference_merge_drop(self, call_ab_id, call_ac_id):
1697        """Test conference merge and drop in WCDMA/CSFB_WCDMA call.
1698
1699        PhoneA in WCDMA (or CSFB_WCDMA) call with PhoneB.
1700        PhoneA in WCDMA (or CSFB_WCDMA) call with PhoneC.
1701        Merge calls to conference on PhoneA.
1702        Hangup on PhoneC, check call continues between AB.
1703        Hangup on PhoneB, check A ends.
1704
1705        Args:
1706            call_ab_id: call id for call_AB on PhoneA.
1707            call_ac_id: call id for call_AC on PhoneA.
1708
1709        Returns:
1710            True if succeed;
1711            False if failed.
1712        """
1713        ads = self.android_devices
1714
1715        self.log.info("Step4: Merge to Conf Call and verify Conf Call.")
1716        ads[0].droid.telecomCallJoinCallsInConf(call_ab_id, call_ac_id)
1717        time.sleep(WAIT_TIME_IN_CALL)
1718        calls = ads[0].droid.telecomCallGetCallIds()
1719        ads[0].log.info("Calls in PhoneA %s", calls)
1720        if num_active_calls(self.log, ads[0]) != 3:
1721            ads[0].log.error("Total number of call ids is not 3.")
1722            return False
1723        call_conf_id = None
1724        for call_id in calls:
1725            if call_id != call_ab_id and call_id != call_ac_id:
1726                call_conf_id = call_id
1727        if not call_conf_id:
1728            self.log.error("Merge call fail, no new conference call id.")
1729            return False
1730        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
1731            return False
1732
1733        # Check if Conf Call is currently active
1734        if ads[0].droid.telecomCallGetCallState(
1735                call_conf_id) != CALL_STATE_ACTIVE:
1736            ads[0].log.error(
1737                "Call_id: %s, state: %s, expected: STATE_ACTIVE", call_conf_id,
1738                ads[0].droid.telecomCallGetCallState(call_conf_id))
1739            return False
1740
1741        self.log.info("Step5: End call on PhoneC and verify call continues.")
1742        if not self._hangup_call(ads[2], "PhoneC"):
1743            return False
1744        time.sleep(WAIT_TIME_IN_CALL)
1745        calls = ads[0].droid.telecomCallGetCallIds()
1746        ads[0].log.info("Calls in PhoneA %s", calls)
1747        if num_active_calls(self.log, ads[0]) != 1:
1748            return False
1749        if not verify_incall_state(self.log, [ads[0], ads[1]], True):
1750            return False
1751        if not verify_incall_state(self.log, [ads[2]], False):
1752            return False
1753
1754        self.log.info("Step6: End call on PhoneB and verify PhoneA end.")
1755        if not self._hangup_call(ads[1], "PhoneB"):
1756            return False
1757        time.sleep(WAIT_TIME_IN_CALL)
1758        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False):
1759            return False
1760        return True
1761
1762    def _three_phone_hangup_call_verify_call_state(
1763            self, ad_hangup, ad_verify, call_id, call_state, ads_active):
1764        """Private Test utility for swap test.
1765
1766        Hangup on 'ad_hangup'.
1767        Verify 'call_id' on 'ad_verify' is in expected 'call_state'
1768        Verify each ad in ads_active are 'in-call'.
1769
1770        Args:
1771            ad_hangup: android object to hangup call.
1772            ad_verify: android object to verify call id state.
1773            call_id: call id in 'ad_verify'.
1774            call_state: expected state for 'call_id'.
1775                'call_state' is either CALL_STATE_HOLDING or CALL_STATE_ACTIVE.
1776            ads_active: list of android object.
1777                Each one of them should be 'in-call' after 'hangup' operation.
1778
1779        Returns:
1780            True if no error happened. Otherwise False.
1781
1782        """
1783
1784        ad_hangup.log.info("Hangup, verify call continues.")
1785        if not self._hangup_call(ad_hangup):
1786            ad_hangup.log.error("Phone fails to hang up")
1787            return False
1788        time.sleep(WAIT_TIME_IN_CALL)
1789
1790        if ad_verify.droid.telecomCallGetCallState(call_id) != call_state:
1791            ad_verify.log.error(
1792                "Call_id: %s, state: %s, expected: %s", call_id,
1793                ad_verify.droid.telecomCallGetCallState(call_id), call_state)
1794            return False
1795        ad_verify.log.info("Call in expected %s state", call_state)
1796        # TODO: b/26296375 add voice check.
1797
1798        if not verify_incall_state(self.log, ads_active, True):
1799            ads_active.log.error("Phone not in call state")
1800            return False
1801        if not verify_incall_state(self.log, [ad_hangup], False):
1802            ad_hangup.log.error("Phone not in hangup state")
1803            return False
1804
1805        return True
1806
1807    def _test_epdg_mo_mo_add_epdg_swap_x(self, num_swaps):
1808        """Test swap feature in epdg call.
1809
1810        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
1811        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
1812        Swap active call on PhoneA.(N times)
1813
1814        Args:
1815            num_swaps: do swap for 'num_swaps' times.
1816                This value can be 0 (no swap operation).
1817
1818        Returns:
1819            call_ab_id, call_ac_id if succeed;
1820            None, None if failed.
1821
1822        """
1823        ads = self.android_devices
1824
1825        # To make thing simple, for epdg, setup should be called before calling
1826        # _test_epdg_mo_mo_add_epdg_swap_x in test cases.
1827        call_ab_id = self._three_phone_call_mo_add_mo(
1828            [ads[0], ads[1], ads[2]], [None, None, None], [
1829                is_phone_in_call_iwlan, is_phone_in_call_iwlan,
1830                is_phone_in_call_iwlan
1831            ])
1832        if call_ab_id is None:
1833            self.log.error("Failed to get call_ab_id")
1834            return None, None
1835
1836        calls = ads[0].droid.telecomCallGetCallIds()
1837        ads[0].log.info("Calls in PhoneA %s", calls)
1838        if num_active_calls(self.log, ads[0]) != 2:
1839            return None, None
1840        if calls[0] == call_ab_id:
1841            call_ac_id = calls[1]
1842        else:
1843            call_ac_id = calls[0]
1844
1845        if num_swaps > 0:
1846            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1847            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1848                              num_swaps):
1849                self.log.error("Swap test failed.")
1850                return None, None
1851
1852        return call_ab_id, call_ac_id
1853
1854    def _test_epdg_mo_mt_add_epdg_swap_x(self, num_swaps):
1855        """Test swap feature in epdg call.
1856
1857        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
1858        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
1859        Swap active call on PhoneA.(N times)
1860
1861        Args:
1862            num_swaps: do swap for 'num_swaps' times.
1863                This value can be 0 (no swap operation).
1864
1865        Returns:
1866            call_ab_id, call_ac_id if succeed;
1867            None, None if failed.
1868
1869        """
1870        ads = self.android_devices
1871
1872        # To make thing simple, for epdg, setup should be called before calling
1873        # _test_epdg_mo_mt_add_epdg_swap_x in test cases.
1874        call_ab_id = self._three_phone_call_mo_add_mt(
1875            [ads[0], ads[1], ads[2]], [None, None, None], [
1876                is_phone_in_call_iwlan, is_phone_in_call_iwlan,
1877                is_phone_in_call_iwlan
1878            ])
1879        if call_ab_id is None:
1880            self.log.error("Failed to get call_ab_id")
1881            return None, None
1882
1883        calls = ads[0].droid.telecomCallGetCallIds()
1884        ads[0].log.info("Calls in PhoneA %s", calls)
1885        if num_active_calls(self.log, ads[0]) != 2:
1886            return None, None
1887        if calls[0] == call_ab_id:
1888            call_ac_id = calls[1]
1889        else:
1890            call_ac_id = calls[0]
1891
1892        if num_swaps > 0:
1893            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1894            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1895                              num_swaps):
1896                self.log.error("Swap test failed.")
1897                return None, None
1898
1899        return call_ab_id, call_ac_id
1900
1901    def _test_epdg_mt_mt_add_epdg_swap_x(self, num_swaps):
1902        """Test swap feature in epdg call.
1903
1904        PhoneB (epdg) call PhoneA (epdg), accept on PhoneA.
1905        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
1906        Swap active call on PhoneA.(N times)
1907
1908        Args:
1909            num_swaps: do swap for 'num_swaps' times.
1910                This value can be 0 (no swap operation).
1911
1912        Returns:
1913            call_ab_id, call_ac_id if succeed;
1914            None, None if failed.
1915
1916        """
1917        ads = self.android_devices
1918
1919        # To make thing simple, for epdg, setup should be called before calling
1920        # _test_epdg_mt_mt_add_epdg_swap_x in test cases.
1921        call_ab_id = self._three_phone_call_mt_add_mt(
1922            [ads[0], ads[1], ads[2]], [None, None, None], [
1923                is_phone_in_call_iwlan, is_phone_in_call_iwlan,
1924                is_phone_in_call_iwlan
1925            ])
1926        if call_ab_id is None:
1927            self.log.error("Failed to get call_ab_id")
1928            return None, None
1929
1930        calls = ads[0].droid.telecomCallGetCallIds()
1931        ads[0].log.info("Calls in PhoneA %s", calls)
1932        if num_active_calls(self.log, ads[0]) != 2:
1933            return None, None
1934        if calls[0] == call_ab_id:
1935            call_ac_id = calls[1]
1936        else:
1937            call_ac_id = calls[0]
1938
1939        if num_swaps > 0:
1940            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1941            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1942                              num_swaps):
1943                self.log.error("Swap test failed.")
1944                return None, None
1945
1946        return call_ab_id, call_ac_id
1947
1948    def _test_epdg_mo_mo_add_volte_swap_x(self, num_swaps):
1949        """Test swap feature in epdg call.
1950
1951        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
1952        PhoneA (epdg) call PhoneC (VoLTE), accept on PhoneC.
1953        Swap active call on PhoneA.(N times)
1954
1955        Args:
1956            num_swaps: do swap for 'num_swaps' times.
1957                This value can be 0 (no swap operation).
1958
1959        Returns:
1960            call_ab_id, call_ac_id if succeed;
1961            None, None if failed.
1962
1963        """
1964        ads = self.android_devices
1965
1966        # To make thing simple, for epdg, setup should be called before calling
1967        # _test_epdg_mo_mo_add_volte_swap_x in test cases.
1968        call_ab_id = self._three_phone_call_mo_add_mo(
1969            [ads[0], ads[1], ads[2]], [None, None, None], [
1970                is_phone_in_call_iwlan, is_phone_in_call_volte,
1971                is_phone_in_call_volte
1972            ])
1973        if call_ab_id is None:
1974            self.log.error("Failed to get call_ab_id")
1975            return None, None
1976
1977        calls = ads[0].droid.telecomCallGetCallIds()
1978        ads[0].log.info("Calls in PhoneA: %s", calls)
1979        if num_active_calls(self.log, ads[0]) != 2:
1980            return None, None
1981        if calls[0] == call_ab_id:
1982            call_ac_id = calls[1]
1983        else:
1984            call_ac_id = calls[0]
1985
1986        if num_swaps > 0:
1987            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
1988            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
1989                              num_swaps):
1990                self.log.error("Swap test failed.")
1991                return None, None
1992
1993        return call_ab_id, call_ac_id
1994
1995    def _test_epdg_mo_mt_add_volte_swap_x(self, num_swaps):
1996        """Test swap feature in epdg call.
1997
1998        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
1999        PhoneC (VoLTE) call PhoneA (epdg), accept on PhoneA.
2000        Swap active call on PhoneA.(N times)
2001
2002        Args:
2003            num_swaps: do swap for 'num_swaps' times.
2004                This value can be 0 (no swap operation).
2005
2006        Returns:
2007            call_ab_id, call_ac_id if succeed;
2008            None, None if failed.
2009
2010        """
2011        ads = self.android_devices
2012
2013        # To make thing simple, for epdg, setup should be called before calling
2014        # _test_epdg_mo_mt_add_volte_swap_x in test cases.
2015        call_ab_id = self._three_phone_call_mo_add_mt(
2016            [ads[0], ads[1], ads[2]], [None, None, None], [
2017                is_phone_in_call_iwlan, is_phone_in_call_volte,
2018                is_phone_in_call_volte
2019            ])
2020        if call_ab_id is None:
2021            self.log.error("Failed to get call_ab_id")
2022            return None, None
2023
2024        calls = ads[0].droid.telecomCallGetCallIds()
2025        ads[0].log.info("Calls in PhoneA: %s", calls)
2026        if num_active_calls(self.log, ads[0]) != 2:
2027            return None, None
2028        if calls[0] == call_ab_id:
2029            call_ac_id = calls[1]
2030        else:
2031            call_ac_id = calls[0]
2032
2033        if num_swaps > 0:
2034            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
2035            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
2036                              num_swaps):
2037                self.log.error("Swap test failed.")
2038                return None, None
2039
2040        return call_ab_id, call_ac_id
2041
2042    def _test_epdg_mt_mt_add_volte_swap_x(self, num_swaps):
2043        """Test swap feature in epdg call.
2044
2045        PhoneB (VoLTE) call PhoneA (epdg), accept on PhoneA.
2046        PhoneC (VoLTE) call PhoneA (epdg), accept on PhoneA.
2047        Swap active call on PhoneA.(N times)
2048
2049        Args:
2050            num_swaps: do swap for 'num_swaps' times.
2051                This value can be 0 (no swap operation).
2052
2053        Returns:
2054            call_ab_id, call_ac_id if succeed;
2055            None, None if failed.
2056
2057        """
2058        ads = self.android_devices
2059
2060        # To make thing simple, for epdg, setup should be called before calling
2061        # _test_epdg_mt_mt_add_volte_swap_x in test cases.
2062        call_ab_id = self._three_phone_call_mt_add_mt(
2063            [ads[0], ads[1], ads[2]], [None, None, None], [
2064                is_phone_in_call_iwlan, is_phone_in_call_volte,
2065                is_phone_in_call_volte
2066            ])
2067        if call_ab_id is None:
2068            self.log.error("Failed to get call_ab_id")
2069            return None, None
2070
2071        calls = ads[0].droid.telecomCallGetCallIds()
2072        ads[0].log.info("Calls in PhoneA %s", calls)
2073        if num_active_calls(self.log, ads[0]) != 2:
2074            return None, None
2075        if calls[0] == call_ab_id:
2076            call_ac_id = calls[1]
2077        else:
2078            call_ac_id = calls[0]
2079
2080        if num_swaps > 0:
2081            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
2082            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
2083                              num_swaps):
2084                self.log.error("Swap test failed.")
2085                return None, None
2086
2087        return call_ab_id, call_ac_id
2088
2089    def _test_epdg_mo_mo_add_wcdma_swap_x(self, num_swaps):
2090        """Test swap feature in epdg call.
2091
2092        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
2093        PhoneA (epdg) call PhoneC (WCDMA), accept on PhoneC.
2094        Swap active call on PhoneA.(N times)
2095
2096        Args:
2097            num_swaps: do swap for 'num_swaps' times.
2098                This value can be 0 (no swap operation).
2099
2100        Returns:
2101            call_ab_id, call_ac_id if succeed;
2102            None, None if failed.
2103
2104        """
2105        ads = self.android_devices
2106
2107        # make sure PhoneB and PhoneC are GSM phone before proceed.
2108        for ad in [ads[1], ads[2]]:
2109            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
2110                ad.log.error("not GSM phone, abort wcdma swap test.")
2111                return None, None
2112
2113        # To make thing simple, for epdg, setup should be called before calling
2114        # _test_epdg_mo_mo_add_wcdma_swap_x in test cases.
2115        call_ab_id = self._three_phone_call_mo_add_mo(
2116            [ads[0], ads[1], ads[2]], [None, None, None], [
2117                is_phone_in_call_iwlan, is_phone_in_call_wcdma,
2118                is_phone_in_call_wcdma
2119            ])
2120        if call_ab_id is None:
2121            self.log.error("Failed to get call_ab_id")
2122            return None, None
2123
2124        calls = ads[0].droid.telecomCallGetCallIds()
2125        ads[0].log.info("Calls in PhoneA %s", calls)
2126        if num_active_calls(self.log, ads[0]) != 2:
2127            return None, None
2128        if calls[0] == call_ab_id:
2129            call_ac_id = calls[1]
2130        else:
2131            call_ac_id = calls[0]
2132
2133        if num_swaps > 0:
2134            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
2135            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
2136                              num_swaps):
2137                self.log.error("Swap test failed.")
2138                return None, None
2139
2140        return call_ab_id, call_ac_id
2141
2142    def _test_epdg_mo_mt_add_wcdma_swap_x(self, num_swaps):
2143        """Test swap feature in epdg call.
2144
2145        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
2146        PhoneC (WCDMA) call PhoneA (epdg), accept on PhoneA.
2147        Swap active call on PhoneA.(N times)
2148
2149        Args:
2150            num_swaps: do swap for 'num_swaps' times.
2151                This value can be 0 (no swap operation).
2152
2153        Returns:
2154            call_ab_id, call_ac_id if succeed;
2155            None, None if failed.
2156
2157        """
2158        ads = self.android_devices
2159
2160        # make sure PhoneB and PhoneC are GSM phone before proceed.
2161        for ad in [ads[1], ads[2]]:
2162            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
2163                ad.log.error("not GSM phone, abort wcdma swap test.")
2164                return None, None
2165
2166        # To make thing simple, for epdg, setup should be called before calling
2167        # _test_epdg_mo_mt_add_wcdma_swap_x in test cases.
2168        call_ab_id = self._three_phone_call_mo_add_mt(
2169            [ads[0], ads[1], ads[2]], [None, None, None], [
2170                is_phone_in_call_iwlan, is_phone_in_call_wcdma,
2171                is_phone_in_call_wcdma
2172            ])
2173        if call_ab_id is None:
2174            self.log.error("Failed to get call_ab_id")
2175            return None, None
2176
2177        calls = ads[0].droid.telecomCallGetCallIds()
2178        ads[0].log.info("Calls in PhoneA %s", calls)
2179        if num_active_calls(self.log, ads[0]) != 2:
2180            return None, None
2181        if calls[0] == call_ab_id:
2182            call_ac_id = calls[1]
2183        else:
2184            call_ac_id = calls[0]
2185
2186        if num_swaps > 0:
2187            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
2188            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
2189                              num_swaps):
2190                self.log.error("Swap test failed.")
2191                return None, None
2192
2193        return call_ab_id, call_ac_id
2194
2195    def _test_epdg_mt_mt_add_wcdma_swap_x(self, num_swaps):
2196        """Test swap feature in epdg call.
2197
2198        PhoneB (WCDMA) call PhoneA (epdg), accept on PhoneA.
2199        PhoneC (WCDMA) call PhoneA (epdg), accept on PhoneA.
2200        Swap active call on PhoneA.(N times)
2201
2202        Args:
2203            num_swaps: do swap for 'num_swaps' times.
2204                This value can be 0 (no swap operation).
2205
2206        Returns:
2207            call_ab_id, call_ac_id if succeed;
2208            None, None if failed.
2209
2210        """
2211        ads = self.android_devices
2212
2213        # make sure PhoneB and PhoneC are GSM phone before proceed.
2214        for ad in [ads[1], ads[2]]:
2215            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
2216                ad.log.error("not GSM phone, abort wcdma swap test.")
2217                return None, None
2218
2219        # To make thing simple, for epdg, setup should be called before calling
2220        # _test_epdg_mo_mt_add_wcdma_swap_x in test cases.
2221        call_ab_id = self._three_phone_call_mt_add_mt(
2222            [ads[0], ads[1], ads[2]], [None, None, None], [
2223                is_phone_in_call_iwlan, is_phone_in_call_wcdma,
2224                is_phone_in_call_wcdma
2225            ])
2226        if call_ab_id is None:
2227            self.log.error("Failed to get call_ab_id")
2228            return None, None
2229
2230        calls = ads[0].droid.telecomCallGetCallIds()
2231        ads[0].log.info("Calls in PhoneA %s", calls)
2232        if num_active_calls(self.log, ads[0]) != 2:
2233            return None, None
2234        if calls[0] == call_ab_id:
2235            call_ac_id = calls[1]
2236        else:
2237            call_ac_id = calls[0]
2238
2239        if num_swaps > 0:
2240            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
2241            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
2242                              num_swaps):
2243                self.log.error("Swap test failed.")
2244                return None, None
2245
2246        return call_ab_id, call_ac_id
2247
2248    def _test_epdg_mo_mo_add_1x_swap_x(self, num_swaps):
2249        """Test swap feature in epdg call.
2250
2251        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
2252        PhoneA (epdg) call PhoneC (1x), accept on PhoneC.
2253        Swap active call on PhoneA.(N times)
2254
2255        Args:
2256            num_swaps: do swap for 'num_swaps' times.
2257                This value can be 0 (no swap operation).
2258
2259        Returns:
2260            call_ab_id, call_ac_id if succeed;
2261            None, None if failed.
2262
2263        """
2264        ads = self.android_devices
2265
2266        # make sure PhoneB and PhoneC are CDMA phone before proceed.
2267        for ad in [ads[1], ads[2]]:
2268            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
2269                ad.log.error("not CDMA phone, abort 1x swap test.")
2270                return None, None
2271
2272        # To make thing simple, for epdg, setup should be called before calling
2273        # _test_epdg_mo_mo_add_1x_swap_x in test cases.
2274        call_ab_id = self._three_phone_call_mo_add_mo(
2275            [ads[0], ads[1], ads[2]], [None, None, None],
2276            [is_phone_in_call_iwlan, is_phone_in_call_1x, is_phone_in_call_1x])
2277        if call_ab_id is None:
2278            self.log.error("Failed to get call_ab_id")
2279            return None, None
2280
2281        calls = ads[0].droid.telecomCallGetCallIds()
2282        ads[0].log.info("Calls in PhoneA %s", calls)
2283        if num_active_calls(self.log, ads[0]) != 2:
2284            return None, None
2285        if calls[0] == call_ab_id:
2286            call_ac_id = calls[1]
2287        else:
2288            call_ac_id = calls[0]
2289
2290        if num_swaps > 0:
2291            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
2292            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
2293                              num_swaps):
2294                self.log.error("Swap test failed.")
2295                return None, None
2296
2297        return call_ab_id, call_ac_id
2298
2299    def _test_epdg_mo_mt_add_1x_swap_x(self, num_swaps):
2300        """Test swap feature in epdg call.
2301
2302        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
2303        PhoneC (1x) call PhoneA (epdg), accept on PhoneA.
2304        Swap active call on PhoneA.(N times)
2305
2306        Args:
2307            num_swaps: do swap for 'num_swaps' times.
2308                This value can be 0 (no swap operation).
2309
2310        Returns:
2311            call_ab_id, call_ac_id if succeed;
2312            None, None if failed.
2313
2314        """
2315        ads = self.android_devices
2316
2317        # make sure PhoneB and PhoneC are CDMA phone before proceed.
2318        for ad in [ads[1], ads[2]]:
2319            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
2320                ad.log.error("not CDMA phone, abort 1x swap test.")
2321                return None, None
2322
2323        # To make thing simple, for epdg, setup should be called before calling
2324        # _test_epdg_mo_mt_add_1x_swap_x in test cases.
2325        call_ab_id = self._three_phone_call_mo_add_mt(
2326            [ads[0], ads[1], ads[2]], [None, None, None],
2327            [is_phone_in_call_iwlan, is_phone_in_call_1x, is_phone_in_call_1x])
2328        if call_ab_id is None:
2329            self.log.error("Failed to get call_ab_id")
2330            return None, None
2331
2332        calls = ads[0].droid.telecomCallGetCallIds()
2333        ads[0].log.info("Calls in PhoneA %s", calls)
2334        if num_active_calls(self.log, ads[0]) != 2:
2335            return None, None
2336        if calls[0] == call_ab_id:
2337            call_ac_id = calls[1]
2338        else:
2339            call_ac_id = calls[0]
2340
2341        if num_swaps > 0:
2342            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
2343            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
2344                              num_swaps):
2345                self.log.error("Swap test failed.")
2346                return None, None
2347
2348        return call_ab_id, call_ac_id
2349
2350    def _test_epdg_mt_mt_add_1x_swap_x(self, num_swaps):
2351        """Test swap feature in epdg call.
2352
2353        PhoneB (1x) call PhoneA (epdg), accept on PhoneA.
2354        PhoneC (1x) call PhoneA (epdg), accept on PhoneA.
2355        Swap active call on PhoneA.(N times)
2356
2357        Args:
2358            num_swaps: do swap for 'num_swaps' times.
2359                This value can be 0 (no swap operation).
2360
2361        Returns:
2362            call_ab_id, call_ac_id if succeed;
2363            None, None if failed.
2364
2365        """
2366        ads = self.android_devices
2367
2368        # make sure PhoneB and PhoneC are CDMA phone before proceed.
2369        for ad in [ads[1], ads[2]]:
2370            if (ad.droid.telephonyGetPhoneType() != PHONE_TYPE_CDMA):
2371                ad.log.error("not CDMA phone, abort 1x swap test.")
2372                return None, None
2373
2374        # To make thing simple, for epdg, setup should be called before calling
2375        # _test_epdg_mo_mt_add_1x_swap_x in test cases.
2376        call_ab_id = self._three_phone_call_mt_add_mt(
2377            [ads[0], ads[1], ads[2]], [None, None, None],
2378            [is_phone_in_call_iwlan, is_phone_in_call_1x, is_phone_in_call_1x])
2379        if call_ab_id is None:
2380            self.log.error("Failed to get call_ab_id")
2381            return None, None
2382
2383        calls = ads[0].droid.telecomCallGetCallIds()
2384        ads[0].log.info("Calls in PhoneA %s", calls)
2385        if num_active_calls(self.log, ads[0]) != 2:
2386            return None, None
2387        if calls[0] == call_ab_id:
2388            call_ac_id = calls[1]
2389        else:
2390            call_ac_id = calls[0]
2391
2392        if num_swaps > 0:
2393            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
2394            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
2395                              num_swaps):
2396                self.log.error("Swap test failed.")
2397                return None, None
2398
2399        return call_ab_id, call_ac_id
2400
2401    def _test_epdg_conference_merge_drop(self, call_ab_id, call_ac_id):
2402        """Test conference merge and drop in epdg call.
2403
2404        PhoneA in epdg call with PhoneB.
2405        PhoneA in epdg call with PhoneC.
2406        Merge calls to conference on PhoneA.
2407        Hangup on PhoneC, check call continues between AB.
2408        Hangup on PhoneB, check A ends.
2409
2410        Args:
2411            call_ab_id: call id for call_AB on PhoneA.
2412            call_ac_id: call id for call_AC on PhoneA.
2413
2414        Returns:
2415            True if succeed;
2416            False if failed.
2417        """
2418
2419        ads = self.android_devices
2420
2421        self.log.info("Step4: Merge to Conf Call and verify Conf Call.")
2422        ads[0].droid.telecomCallJoinCallsInConf(call_ab_id, call_ac_id)
2423        time.sleep(WAIT_TIME_IN_CALL)
2424        calls = ads[0].droid.telecomCallGetCallIds()
2425        ads[0].log.info("Calls in PhoneA %s", calls)
2426        if num_active_calls(self.log, ads[0]) != 1:
2427            ads[0].log.error("Total number of call ids is not 1.")
2428            return False
2429        call_conf_id = None
2430        for call_id in calls:
2431            if call_id != call_ab_id and call_id != call_ac_id:
2432                call_conf_id = call_id
2433        if not call_conf_id:
2434            self.log.error("Merge call fail, no new conference call id.")
2435            return False
2436        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2437            return False
2438
2439        # Check if Conf Call is currently active
2440        if ads[0].droid.telecomCallGetCallState(
2441                call_conf_id) != CALL_STATE_ACTIVE:
2442            ads[0].log.error(
2443                "Call_id: %s, state: %s, expected: STATE_ACTIVE", call_conf_id,
2444                ads[0].droid.telecomCallGetCallState(call_conf_id))
2445            return False
2446
2447        self.log.info("Step5: End call on PhoneC and verify call continues.")
2448        if not self._hangup_call(ads[2], "PhoneC"):
2449            return False
2450        time.sleep(WAIT_TIME_IN_CALL)
2451        calls = ads[0].droid.telecomCallGetCallIds()
2452        ads[0].log.info("Calls in PhoneA %s", calls)
2453        if not verify_incall_state(self.log, [ads[0], ads[1]], True):
2454            return False
2455        if not verify_incall_state(self.log, [ads[2]], False):
2456            return False
2457
2458        self.log.info("Step6: End call on PhoneB and verify PhoneA end.")
2459        if not self._hangup_call(ads[1], "PhoneB"):
2460            return False
2461        time.sleep(WAIT_TIME_IN_CALL)
2462        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False):
2463            return False
2464        return True
2465
2466    """ Tests Begin """
2467
2468    @TelephonyBaseTest.tel_test_wrap
2469    @test_tracker_info(uuid="3cd45972-3862-4956-9504-7fefacdd5ca6")
2470    def test_wcdma_mo_mo_add_merge_drop(self):
2471        """ Test Conf Call among three phones.
2472
2473        Call from PhoneA to PhoneB, accept on PhoneB.
2474        Call from PhoneA to PhoneC, accept on PhoneC.
2475        On PhoneA, merge to conference call.
2476        End call on PhoneC, verify call continues.
2477        End call on PhoneB, verify call end on PhoneA.
2478
2479        Returns:
2480            True if pass; False if fail.
2481        """
2482        call_ab_id, call_ac_id = self._test_wcdma_mo_mo_add_swap_x(0)
2483        if call_ab_id is None or call_ac_id is None:
2484            return False
2485
2486        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
2487
2488    @TelephonyBaseTest.tel_test_wrap
2489    @test_tracker_info(uuid="c1158bd3-6327-4c91-96a7-400e69f68698")
2490    def test_wcdma_mt_mt_add_merge_drop(self):
2491        """ Test Conf Call among three phones.
2492
2493        Call from PhoneB to PhoneA, accept on PhoneA.
2494        Call from PhoneC to PhoneA, accept on PhoneA.
2495        On PhoneA, merge to conference call.
2496        End call on PhoneC, verify call continues.
2497        End call on PhoneB, verify call end on PhoneA.
2498
2499        Returns:
2500            True if pass; False if fail.
2501        """
2502        call_ab_id, call_ac_id = self._test_wcdma_mt_mt_add_swap_x(0)
2503        if call_ab_id is None or call_ac_id is None:
2504            return False
2505
2506        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
2507
2508    @TelephonyBaseTest.tel_test_wrap
2509    @test_tracker_info(uuid="804478b4-a826-48be-a9fa-9a0cec66ee54")
2510    def test_1x_mo_mo_add_merge_drop_from_participant(self):
2511        """ Test 1x Conf Call among three phones.
2512
2513        Steps:
2514        1. DUT in 1x idle, PhoneB and PhoneC idle.
2515        2. Call from DUT to PhoneB, accept on PhoneB.
2516        3. Call from DUT to PhoneC, accept on PhoneC.
2517        4. On DUT, merge to conference call.
2518        5. End call PhoneC, verify call continues on DUT and PhoneB.
2519        6. End call on PhoneB, verify call end on PhoneA.
2520
2521        Expected Results:
2522        4. Merge Call succeed on DUT.
2523        5. PhoneC drop call, DUT and PhoneB call continues.
2524        6. PhoneB drop call, call also end on DUT.
2525
2526        Returns:
2527            True if pass; False if fail.
2528        """
2529
2530        ads = self.android_devices
2531
2532        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mo_add()
2533        if ((call_ab_id is None) or (call_ac_id is None)
2534                or (call_conf_id is None)):
2535            self.log.error("Failed to setup 3 way call.")
2536            return False
2537
2538        self.log.info("Merge to Conf Call and verify Conf Call.")
2539        if not self._test_1x_merge_conference(ads[0], [ads[1], ads[2]],
2540                                              call_conf_id):
2541            self.log.error("1x Conference merge failed.")
2542
2543        self.log.info("End call on PhoneC, and end call on PhoneB.")
2544        return self._test_1x_multi_call_drop_from_participant(
2545            ads[0], ads[2], ads[1])
2546
2547    @TelephonyBaseTest.tel_test_wrap
2548    @test_tracker_info(uuid="a36b02a6-480e-4cb6-9201-bd8bfa5ae8a4")
2549    def test_1x_mo_mo_add_merge_drop_from_host(self):
2550        """ Test 1x Conf Call among three phones.
2551
2552        Steps:
2553        1. DUT in 1x idle, PhoneB and PhoneC idle.
2554        2. Call from DUT to PhoneB, accept on PhoneB.
2555        3. Call from DUT to PhoneC, accept on PhoneC.
2556        4. On DUT, merge to conference call.
2557        5. End call on DUT, make sure all participants drop.
2558
2559        Expected Results:
2560        4. Merge Call succeed on DUT.
2561        5. Make sure DUT and all participants drop call.
2562
2563        Returns:
2564            True if pass; False if fail.
2565        """
2566
2567        ads = self.android_devices
2568
2569        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mo_add()
2570        if ((call_ab_id is None) or (call_ac_id is None)
2571                or (call_conf_id is None)):
2572            self.log.error("Failed to setup 3 way call.")
2573            return False
2574
2575        self.log.info("Merge to Conf Call and verify Conf Call.")
2576        if not self._test_1x_merge_conference(ads[0], [ads[1], ads[2]],
2577                                              call_conf_id):
2578            self.log.error("1x Conference merge failed.")
2579
2580        self.log.info("End call on PhoneC, and end call on PhoneB.")
2581        return self._test_1x_conf_call_drop_from_host(ads[0], [ads[2], ads[1]])
2582
2583    @TelephonyBaseTest.tel_test_wrap
2584    @test_tracker_info(uuid="0c9e5da6-90db-4cb5-9b2c-4be3460b49d0")
2585    def test_1x_mo_mt_add_drop_active(self):
2586        """ Test 1x MO+MT call among three phones.
2587
2588        Steps:
2589        1. DUT in 1x idle, PhoneB and PhoneC idle.
2590        2. Call from DUT to PhoneB, accept on PhoneB.
2591        3. Call from PhoneC to DUT, accept on DUT.
2592        4. End call PhoneC, verify call continues on DUT and PhoneB.
2593        5. End call on PhoneB, verify call end on PhoneA.
2594
2595        Expected Results:
2596        4. PhoneC drop call, DUT and PhoneB call continues.
2597        5. PhoneB drop call, call also end on DUT.
2598
2599        Returns:
2600            True if pass; False if fail.
2601        """
2602        ads = self.android_devices
2603
2604        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2605            0)
2606        if ((call_ab_id is None) or (call_ac_id is None)
2607                or (call_conf_id is None)):
2608            self.log.error("Failed to setup 3 way call.")
2609            return False
2610
2611        self.log.info("Verify no one dropped call.")
2612        time.sleep(WAIT_TIME_IN_CALL)
2613        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2614            return False
2615
2616        self.log.info("End call on PhoneC, and end call on PhoneB.")
2617        return self._test_1x_multi_call_drop_from_participant(
2618            ads[0], ads[2], ads[1])
2619
2620    @TelephonyBaseTest.tel_test_wrap
2621    @test_tracker_info(uuid="9dc16b45-3470-44c8-abf8-19cd5944a53c")
2622    def test_1x_mo_mt_add_swap_twice_drop_active(self):
2623        """ Test 1x MO+MT call among three phones.
2624
2625        Steps:
2626        1. DUT in 1x idle, PhoneB and PhoneC idle.
2627        2. DUT MO call to PhoneB, answer on PhoneB.
2628        3. PhoneC call to DUT, answer on DUT
2629        4. Swap active call on DUT.
2630        5. Swap active call on DUT.
2631        6. Drop on PhoneC.
2632        7. Drop on PhoneB.
2633
2634        Expected Results:
2635        4. Swap call succeed.
2636        5. Swap call succeed.
2637        6. Call between DUT and PhoneB continues.
2638        7. All participant call end.
2639
2640        Returns:
2641            True if pass; False if fail.
2642        """
2643        ads = self.android_devices
2644
2645        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2646            2)
2647        if ((call_ab_id is None) or (call_ac_id is None)
2648                or (call_conf_id is None)):
2649            self.log.error("Failed to setup 3 way call.")
2650            return False
2651
2652        self.log.info("Verify no one dropped call.")
2653        time.sleep(WAIT_TIME_IN_CALL)
2654        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2655            return False
2656
2657        self.log.info("End call on PhoneC, and end call on PhoneB.")
2658        return self._test_1x_multi_call_drop_from_participant(
2659            ads[0], ads[2], ads[1])
2660
2661    @TelephonyBaseTest.tel_test_wrap
2662    @test_tracker_info(uuid="dc7a3187-142e-4754-a914-d0241397a2b3")
2663    def test_1x_mo_mt_add_swap_once_drop_active(self):
2664        """ Test 1x MO+MT call among three phones.
2665
2666        Steps:
2667        1. DUT in 1x idle, PhoneB and PhoneC idle.
2668        2. DUT MO call to PhoneB, answer on PhoneB.
2669        3. PhoneC call to DUT, answer on DUT
2670        4. Swap active call on DUT.
2671        5. Drop on PhoneB.
2672        6. Drop on PhoneC.
2673
2674        Expected Results:
2675        4. Swap call succeed.
2676        5. Call between DUT and PhoneC continues.
2677        6. All participant call end.
2678
2679        Returns:
2680            True if pass; False if fail.
2681        """
2682        ads = self.android_devices
2683
2684        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2685            1)
2686        if ((call_ab_id is None) or (call_ac_id is None)
2687                or (call_conf_id is None)):
2688            self.log.error("Failed to setup 3 way call.")
2689            return False
2690
2691        self.log.info("Verify no one dropped call.")
2692        time.sleep(WAIT_TIME_IN_CALL)
2693        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2694            return False
2695
2696        self.log.info("End call on PhoneB, and end call on PhoneC.")
2697        return self._test_1x_multi_call_drop_from_participant(
2698            ads[0], ads[1], ads[2])
2699
2700    @TelephonyBaseTest.tel_test_wrap
2701    @test_tracker_info(uuid="24cd0ef0-1a69-4603-89c2-0f2b96715348")
2702    def test_1x_mo_mt_add_drop_held(self):
2703        """ Test 1x MO+MT call among three phones.
2704
2705        Steps:
2706        1. DUT in 1x idle, PhoneB and PhoneC idle.
2707        2. Call from DUT to PhoneB, accept on PhoneB.
2708        3. Call from PhoneC to DUT, accept on DUT.
2709        4. End call PhoneB, verify call continues on DUT and PhoneC.
2710        5. End call on PhoneC, verify call end on PhoneA.
2711
2712        Expected Results:
2713        4. DUT drop call, PhoneC also end. Then DUT receive callback from PhoneB.
2714        5. DUT drop call, call also end on PhoneB.
2715
2716        Returns:
2717            True if pass; False if fail.
2718        """
2719        ads = self.android_devices
2720
2721        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2722            0)
2723        if ((call_ab_id is None) or (call_ac_id is None)
2724                or (call_conf_id is None)):
2725            self.log.error("Failed to setup 3 way call.")
2726            return False
2727
2728        self.log.info("Verify no one dropped call.")
2729        time.sleep(WAIT_TIME_IN_CALL)
2730        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2731            return False
2732
2733        self.log.info("End call on PhoneB, and end call on PhoneC.")
2734        return self._test_1x_multi_call_drop_from_participant(
2735            ads[0], ads[1], ads[2])
2736
2737    @TelephonyBaseTest.tel_test_wrap
2738    @test_tracker_info(uuid="1c5c1780-84c2-4547-9e57-eeadac6569d7")
2739    def test_1x_mo_mt_add_swap_twice_drop_held(self):
2740        """ Test 1x MO+MT call among three phones.
2741
2742        Steps:
2743        1. DUT in 1x idle, PhoneB and PhoneC idle.
2744        2. DUT MO call to PhoneB, answer on PhoneB.
2745        3. PhoneC call to DUT, answer on DUT
2746        4. Swap active call on DUT.
2747        5. Swap active call on DUT.
2748        6. Drop on PhoneB.
2749        7. Drop on PhoneC.
2750
2751        Expected Results:
2752        4. Swap call succeed.
2753        5. Swap call succeed.
2754        6. Call between DUT and PhoneC continues.
2755        7. All participant call end.
2756
2757        Returns:
2758            True if pass; False if fail.
2759        """
2760        ads = self.android_devices
2761
2762        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2763            2)
2764        if ((call_ab_id is None) or (call_ac_id is None)
2765                or (call_conf_id is None)):
2766            self.log.error("Failed to setup 3 way call.")
2767            return False
2768
2769        self.log.info("Verify no one dropped call.")
2770        time.sleep(WAIT_TIME_IN_CALL)
2771        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2772            return False
2773
2774        self.log.info("End call on PhoneB, and end call on PhoneC.")
2775        return self._test_1x_multi_call_drop_from_participant(
2776            ads[0], ads[1], ads[2])
2777
2778    @TelephonyBaseTest.tel_test_wrap
2779    @test_tracker_info(uuid="928a2b21-c4ca-4553-9acc-8d3db61ed6eb")
2780    def test_1x_mo_mt_add_swap_once_drop_held(self):
2781        """ Test 1x MO+MT call among three phones.
2782
2783        Steps:
2784        1. DUT in 1x idle, PhoneB and PhoneC idle.
2785        2. DUT MO call to PhoneB, answer on PhoneB.
2786        3. PhoneC call to DUT, answer on DUT
2787        4. Swap active call on DUT.
2788        5. Drop on PhoneC.
2789        6. Drop on PhoneB.
2790
2791        Expected Results:
2792        4. Swap call succeed.
2793        5. Call between DUT and PhoneB continues.
2794        6. All participant call end.
2795
2796        Returns:
2797            True if pass; False if fail.
2798        """
2799        ads = self.android_devices
2800
2801        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2802            1)
2803        if ((call_ab_id is None) or (call_ac_id is None)
2804                or (call_conf_id is None)):
2805            self.log.error("Failed to setup 3 way call.")
2806            return False
2807
2808        self.log.info("Verify no one dropped call.")
2809        time.sleep(WAIT_TIME_IN_CALL)
2810        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2811            return False
2812
2813        self.log.info("End call on PhoneC, and end call on PhoneB.")
2814        return self._test_1x_multi_call_drop_from_participant(
2815            ads[0], ads[2], ads[1])
2816
2817    @TelephonyBaseTest.tel_test_wrap
2818    @test_tracker_info(uuid="deb57627-a717-41f0-b8f4-f3ccf9ce2e15")
2819    def test_1x_mo_mt_add_drop_on_dut(self):
2820        """ Test 1x MO+MT call among three phones.
2821
2822        Steps:
2823        1. DUT in 1x idle, PhoneB and PhoneC idle.
2824        2. Call from DUT to PhoneB, accept on PhoneB.
2825        3. Call from PhoneC to DUT, accept on DUT.
2826        4. End call on DUT.
2827        5. End call on DUT.
2828
2829        Expected Results:
2830        4. DUT drop call, PhoneC also end. Then DUT receive callback from PhoneB.
2831        5. DUT drop call, call also end on PhoneB.
2832
2833        Returns:
2834            True if pass; False if fail.
2835        """
2836        ads = self.android_devices
2837
2838        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2839            0)
2840        if ((call_ab_id is None) or (call_ac_id is None)
2841                or (call_conf_id is None)):
2842            self.log.error("Failed to setup 3 way call.")
2843            return False
2844
2845        self.log.info("Verify no one dropped call.")
2846        time.sleep(WAIT_TIME_IN_CALL)
2847        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2848            return False
2849
2850        self.log.info("End call on DUT, DUT should receive callback.")
2851        return self._test_1x_multi_call_drop_from_host(ads[0], ads[2], ads[1])
2852
2853    @TelephonyBaseTest.tel_test_wrap
2854    @test_tracker_info(uuid="9cdee9c2-98cf-40de-9396-516192e493a1")
2855    def test_1x_mo_mt_add_swap_twice_drop_on_dut(self):
2856        """ Test 1x MO+MT call among three phones.
2857
2858        Steps:
2859        1. DUT in 1x idle, PhoneB and PhoneC idle.
2860        2. DUT MO call to PhoneB, answer on PhoneB.
2861        3. PhoneC call to DUT, answer on DUT
2862        4. Swap active call on DUT.
2863        5. Swap active call on DUT.
2864        6. Drop current call on DUT.
2865        7. Drop current call on DUT.
2866
2867        Expected Results:
2868        4. Swap call succeed.
2869        5. Swap call succeed.
2870        6. DUT drop call, PhoneC also end. Then DUT receive callback from PhoneB.
2871        7. DUT drop call, call also end on PhoneB.
2872
2873        Returns:
2874            True if pass; False if fail.
2875        """
2876        ads = self.android_devices
2877
2878        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2879            2)
2880        if ((call_ab_id is None) or (call_ac_id is None)
2881                or (call_conf_id is None)):
2882            self.log.error("Failed to setup 3 way call.")
2883            return False
2884
2885        self.log.info("Verify no one dropped call.")
2886        time.sleep(WAIT_TIME_IN_CALL)
2887        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2888            return False
2889
2890        self.log.info("End call on DUT, DUT should receive callback.")
2891        return self._test_1x_multi_call_drop_from_host(ads[0], ads[2], ads[1])
2892
2893    @TelephonyBaseTest.tel_test_wrap
2894    @test_tracker_info(uuid="26187827-64c0-436e-9792-20c216aeb442")
2895    def test_1x_mo_mt_add_swap_once_drop_on_dut(self):
2896        """ Test 1x MO+MT call among three phones.
2897
2898        Steps:
2899        1. DUT in 1x idle, PhoneB and PhoneC idle.
2900        2. DUT MO call to PhoneB, answer on PhoneB.
2901        3. PhoneC call to DUT, answer on DUT
2902        4. Swap active call on DUT.
2903        5. Drop current call on DUT.
2904        6. Drop current call on DUT.
2905
2906        Expected Results:
2907        4. Swap call succeed.
2908        5. DUT drop call, PhoneB also end. Then DUT receive callback from PhoneC.
2909        6. DUT drop call, call also end on PhoneC.
2910
2911        Returns:
2912            True if pass; False if fail.
2913        """
2914        ads = self.android_devices
2915
2916        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mo_mt_add_swap_x(
2917            1)
2918        if ((call_ab_id is None) or (call_ac_id is None)
2919                or (call_conf_id is None)):
2920            self.log.error("Failed to setup 3 way call.")
2921            return False
2922
2923        self.log.info("Verify no one dropped call.")
2924        time.sleep(WAIT_TIME_IN_CALL)
2925        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2926            return False
2927
2928        self.log.info("End call on DUT, DUT should receive callback.")
2929        return self._test_1x_multi_call_drop_from_host(ads[0], ads[1], ads[2])
2930
2931    @TelephonyBaseTest.tel_test_wrap
2932    @test_tracker_info(uuid="ce590b72-b4ab-4a27-9c01-f8e3b110419f")
2933    def test_1x_mt_mt_add_drop_active(self):
2934        """ Test 1x MT+MT call among three phones.
2935
2936        Steps:
2937        1. DUT in 1x idle, PhoneB and PhoneC idle.
2938        2. Call from PhoneB to DUT, accept on DUT.
2939        3. Call from PhoneC to DUT, accept on DUT.
2940        4. End call PhoneC, verify call continues on DUT and PhoneB.
2941        5. End call on PhoneB, verify call end on PhoneA.
2942
2943        Expected Results:
2944        4. PhoneC drop call, DUT and PhoneB call continues.
2945        5. PhoneB drop call, call also end on DUT.
2946
2947        Returns:
2948            True if pass; False if fail.
2949        """
2950        ads = self.android_devices
2951
2952        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
2953            0)
2954        if ((call_ab_id is None) or (call_ac_id is None)
2955                or (call_conf_id is None)):
2956            self.log.error("Failed to setup 3 way call.")
2957            return False
2958
2959        self.log.info("Verify no one dropped call.")
2960        time.sleep(WAIT_TIME_IN_CALL)
2961        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
2962            return False
2963
2964        self.log.info("End call on PhoneC, and end call on PhoneB.")
2965        return self._test_1x_multi_call_drop_from_participant(
2966            ads[0], ads[2], ads[1])
2967
2968    @TelephonyBaseTest.tel_test_wrap
2969    @test_tracker_info(uuid="736aa74e-1d0b-4f85-b0f7-11840543cf54")
2970    def test_1x_mt_mt_add_swap_twice_drop_active(self):
2971        """ Test 1x MT+MT call among three phones.
2972
2973        Steps:
2974        1. DUT in 1x idle, PhoneB and PhoneC idle.
2975        2. PhoneB call to DUT, answer on DUT.
2976        3. PhoneC call to DUT, answer on DUT
2977        4. Swap active call on DUT.
2978        5. Swap active call on DUT.
2979        6. Drop on PhoneC.
2980        7. Drop on PhoneB.
2981
2982        Expected Results:
2983        4. Swap call succeed.
2984        5. Swap call succeed.
2985        6. Call between DUT and PhoneB continues.
2986        7. All participant call end.
2987
2988        Returns:
2989            True if pass; False if fail.
2990        """
2991        ads = self.android_devices
2992
2993        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
2994            2)
2995        if ((call_ab_id is None) or (call_ac_id is None)
2996                or (call_conf_id is None)):
2997            self.log.error("Failed to setup 3 way call.")
2998            return False
2999
3000        self.log.info("Verify no one dropped call.")
3001        time.sleep(WAIT_TIME_IN_CALL)
3002        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
3003            return False
3004
3005        self.log.info("End call on PhoneC, and end call on PhoneB.")
3006        return self._test_1x_multi_call_drop_from_participant(
3007            ads[0], ads[2], ads[1])
3008
3009    @TelephonyBaseTest.tel_test_wrap
3010    @test_tracker_info(uuid="3eee6b6e-e1b1-43ec-82d5-d298b514fc07")
3011    def test_1x_mt_mt_add_swap_once_drop_active(self):
3012        """ Test 1x MT+MT call among three phones.
3013
3014        Steps:
3015        1. DUT in 1x idle, PhoneB and PhoneC idle.
3016        2. PhoneB call to DUT, answer on DUT.
3017        3. PhoneC call to DUT, answer on DUT
3018        4. Swap active call on DUT.
3019        5. Drop on PhoneB.
3020        6. Drop on PhoneC.
3021
3022        Expected Results:
3023        4. Swap call succeed.
3024        5. Call between DUT and PhoneC continues.
3025        6. All participant call end.
3026
3027        Returns:
3028            True if pass; False if fail.
3029        """
3030        ads = self.android_devices
3031
3032        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
3033            1)
3034        if ((call_ab_id is None) or (call_ac_id is None)
3035                or (call_conf_id is None)):
3036            self.log.error("Failed to setup 3 way call.")
3037            return False
3038
3039        self.log.info("Verify no one dropped call.")
3040        time.sleep(WAIT_TIME_IN_CALL)
3041        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
3042            return False
3043
3044        self.log.info("End call on PhoneB, and end call on PhoneC.")
3045        return self._test_1x_multi_call_drop_from_participant(
3046            ads[0], ads[1], ads[2])
3047
3048    @TelephonyBaseTest.tel_test_wrap
3049    @test_tracker_info(uuid="432549a9-e4bb-44d3-bd44-befffc1af02d")
3050    def test_1x_mt_mt_add_drop_held(self):
3051        """ Test 1x MT+MT call among three phones.
3052
3053        Steps:
3054        1. DUT in 1x idle, PhoneB and PhoneC idle.
3055        2. Call from PhoneB to DUT, accept on DUT.
3056        3. Call from PhoneC to DUT, accept on DUT.
3057        4. End call PhoneB, verify call continues on DUT and PhoneC.
3058        5. End call on PhoneC, verify call end on PhoneA.
3059
3060        Expected Results:
3061        4. PhoneB drop call, DUT and PhoneC call continues.
3062        5. PhoneC drop call, call also end on DUT.
3063
3064        Returns:
3065            True if pass; False if fail.
3066        """
3067        ads = self.android_devices
3068
3069        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
3070            0)
3071        if ((call_ab_id is None) or (call_ac_id is None)
3072                or (call_conf_id is None)):
3073            self.log.error("Failed to setup 3 way call.")
3074            return False
3075
3076        self.log.info("Verify no one dropped call.")
3077        time.sleep(WAIT_TIME_IN_CALL)
3078        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
3079            return False
3080
3081        self.log.info("End call on PhoneB, and end call on PhoneC.")
3082        return self._test_1x_multi_call_drop_from_participant(
3083            ads[0], ads[1], ads[2])
3084
3085    @TelephonyBaseTest.tel_test_wrap
3086    @test_tracker_info(uuid="c8f30fc1-8586-4eb0-854e-264989fd69b8")
3087    def test_1x_mt_mt_add_swap_twice_drop_held(self):
3088        """ Test 1x MT+MT call among three phones.
3089
3090        Steps:
3091        1. DUT in 1x idle, PhoneB and PhoneC idle.
3092        2. PhoneB call to DUT, answer on DUT.
3093        3. PhoneC call to DUT, answer on DUT
3094        4. Swap active call on DUT.
3095        5. Swap active call on DUT.
3096        6. Drop on PhoneB.
3097        7. Drop on PhoneC.
3098
3099        Expected Results:
3100        4. Swap call succeed.
3101        5. Swap call succeed.
3102        6. Call between DUT and PhoneC continues.
3103        7. All participant call end.
3104
3105        Returns:
3106            True if pass; False if fail.
3107        """
3108        ads = self.android_devices
3109
3110        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
3111            2)
3112        if ((call_ab_id is None) or (call_ac_id is None)
3113                or (call_conf_id is None)):
3114            self.log.error("Failed to setup 3 way call.")
3115            return False
3116
3117        self.log.info("Verify no one dropped call.")
3118        time.sleep(WAIT_TIME_IN_CALL)
3119        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
3120            return False
3121
3122        self.log.info("End call on PhoneB, and end call on PhoneC.")
3123        return self._test_1x_multi_call_drop_from_participant(
3124            ads[0], ads[1], ads[2])
3125
3126    @TelephonyBaseTest.tel_test_wrap
3127    @test_tracker_info(uuid="065ba51e-9843-4018-8009-7fdc6590011d")
3128    def test_1x_mt_mt_add_swap_once_drop_held(self):
3129        """ Test 1x MT+MT call among three phones.
3130
3131        Steps:
3132        1. DUT in 1x idle, PhoneB and PhoneC idle.
3133        2. PhoneB call to DUT, answer on DUT.
3134        3. PhoneC call to DUT, answer on DUT
3135        4. Swap active call on DUT.
3136        5. Drop on PhoneC.
3137        6. Drop on PhoneB.
3138
3139        Expected Results:
3140        4. Swap call succeed.
3141        5. Call between DUT and PhoneB continues.
3142        6. All participant call end.
3143
3144        Returns:
3145            True if pass; False if fail.
3146        """
3147        ads = self.android_devices
3148
3149        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
3150            1)
3151        if ((call_ab_id is None) or (call_ac_id is None)
3152                or (call_conf_id is None)):
3153            self.log.error("Failed to setup 3 way call.")
3154            return False
3155
3156        self.log.info("Verify no one dropped call.")
3157        time.sleep(WAIT_TIME_IN_CALL)
3158        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
3159            return False
3160
3161        self.log.info("End call on PhoneC, and end call on PhoneB.")
3162        return self._test_1x_multi_call_drop_from_participant(
3163            ads[0], ads[2], ads[1])
3164
3165    @TelephonyBaseTest.tel_test_wrap
3166    @test_tracker_info(uuid="69c69449-d430-4f00-ae19-c51242561ac9")
3167    def test_1x_mt_mt_add_drop_on_dut(self):
3168        """ Test 1x MT+MT call among three phones.
3169
3170        Steps:
3171        1. DUT in 1x idle, PhoneB and PhoneC idle.
3172        2. Call from PhoneB to DUT, accept on DUT.
3173        3. Call from PhoneC to DUT, accept on DUT.
3174        4. End call on DUT.
3175        5. End call on DUT.
3176
3177        Expected Results:
3178        4. DUT drop call, PhoneC also end. Then DUT receive callback from PhoneB.
3179        5. DUT drop call, call also end on PhoneB.
3180
3181        Returns:
3182            True if pass; False if fail.
3183        """
3184        ads = self.android_devices
3185
3186        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
3187            0)
3188        if ((call_ab_id is None) or (call_ac_id is None)
3189                or (call_conf_id is None)):
3190            self.log.error("Failed to setup 3 way call.")
3191            return False
3192
3193        self.log.info("Verify no one dropped call.")
3194        time.sleep(WAIT_TIME_IN_CALL)
3195        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
3196            return False
3197
3198        self.log.info("End call on DUT, DUT should receive callback.")
3199        return self._test_1x_multi_call_drop_from_host(ads[0], ads[2], ads[1])
3200
3201    @TelephonyBaseTest.tel_test_wrap
3202    @test_tracker_info(uuid="282583a3-d455-4caf-a184-718f8bbccb91")
3203    def test_1x_mt_mt_add_swap_twice_drop_on_dut(self):
3204        """ Test 1x MT+MT call among three phones.
3205
3206        Steps:
3207        1. DUT in 1x idle, PhoneB and PhoneC idle.
3208        2. PhoneB call to DUT, answer on DUT.
3209        3. PhoneC call to DUT, answer on DUT
3210        4. Swap active call on DUT.
3211        5. Swap active call on DUT.
3212        6. Drop current call on DUT.
3213        7. Drop current call on DUT.
3214
3215        Expected Results:
3216        4. Swap call succeed.
3217        5. Swap call succeed.
3218        6. DUT drop call, PhoneC also end. Then DUT receive callback from PhoneB.
3219        7. DUT drop call, call also end on PhoneB.
3220
3221        Returns:
3222            True if pass; False if fail.
3223        """
3224        ads = self.android_devices
3225
3226        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
3227            2)
3228        if ((call_ab_id is None) or (call_ac_id is None)
3229                or (call_conf_id is None)):
3230            self.log.error("Failed to setup 3 way call.")
3231            return False
3232
3233        self.log.info("Verify no one dropped call.")
3234        time.sleep(WAIT_TIME_IN_CALL)
3235        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
3236            return False
3237
3238        self.log.info("End call on DUT, DUT should receive callback.")
3239        return self._test_1x_multi_call_drop_from_host(ads[0], ads[2], ads[1])
3240
3241    @TelephonyBaseTest.tel_test_wrap
3242    @test_tracker_info(uuid="1cf83159-d230-41a4-842c-064be5ef11e6")
3243    def test_1x_mt_mt_add_swap_once_drop_on_dut(self):
3244        """ Test 1x MT+MT call among three phones.
3245
3246        Steps:
3247        1. DUT in 1x idle, PhoneB and PhoneC idle.
3248        2. PhoneB call to DUT, answer on DUT.
3249        3. PhoneC call to DUT, answer on DUT
3250        4. Swap active call on DUT.
3251        5. Drop current call on DUT.
3252        6. Drop current call on DUT.
3253
3254        Expected Results:
3255        4. Swap call succeed.
3256        5. DUT drop call, PhoneB also end. Then DUT receive callback from PhoneC.
3257        6. DUT drop call, call also end on PhoneC.
3258
3259        Returns:
3260            True if pass; False if fail.
3261        """
3262        ads = self.android_devices
3263
3264        call_ab_id, call_ac_id, call_conf_id = self._test_1x_mt_mt_add_swap_x(
3265            1)
3266        if ((call_ab_id is None) or (call_ac_id is None)
3267                or (call_conf_id is None)):
3268            self.log.error("Failed to setup 3 way call.")
3269            return False
3270
3271        self.log.info("Verify no one dropped call.")
3272        time.sleep(WAIT_TIME_IN_CALL)
3273        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
3274            return False
3275
3276        self.log.info("End call on DUT, DUT should receive callback.")
3277        return self._test_1x_multi_call_drop_from_host(ads[0], ads[1], ads[2])
3278
3279    @TelephonyBaseTest.tel_test_wrap
3280    @test_tracker_info(uuid="602db3cb-e02b-4e4c-9043-338e1231f51b")
3281    def test_volte_mo_mo_add_volte_merge_drop_second_call_from_participant_no_cep(
3282            self):
3283        """ Test VoLTE Conference Call among three phones. No CEP.
3284
3285        Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3286        Call from PhoneA (VoLTE) to PhoneC (VoLTE), accept on PhoneC.
3287        On PhoneA, merge to conference call (No CEP).
3288        End call on PhoneC, verify call continues.
3289        End call on PhoneB, verify call end on PhoneA.
3290
3291        Returns:
3292            True if pass; False if fail.
3293        """
3294        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(0)
3295        if call_ab_id is None or call_ac_id is None:
3296            return False
3297
3298        return self._test_ims_conference_merge_drop_second_call_no_cep(
3299            call_ab_id, call_ac_id)
3300
3301    @TelephonyBaseTest.tel_test_wrap
3302    @test_tracker_info(uuid="7c9ae738-9031-4a77-9ff7-356a186820a5")
3303    def test_volte_mo_mo_add_volte_merge_drop_second_call_from_participant_cep(
3304            self):
3305        """ Test VoLTE Conference Call among three phones. CEP enabled.
3306
3307        1. Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3308        2. Call from PhoneA (VoLTE) to PhoneC (VoLTE), accept on PhoneC.
3309        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3310        4. End call on PhoneC, verify call continues.
3311        5. End call on PhoneB, verify call end on PhoneA.
3312
3313        Returns:
3314            True if pass; False if fail.
3315        """
3316        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(0)
3317        if call_ab_id is None or call_ac_id is None:
3318            return False
3319
3320        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
3321            call_ab_id, call_ac_id)
3322
3323    @TelephonyBaseTest.tel_test_wrap
3324    @test_tracker_info(uuid="f50e7e94-0956-41c4-b02b-384a12668f10")
3325    def test_volte_mo_mo_add_volte_merge_drop_second_call_from_host_cep(self):
3326        """ Test VoLTE Conference Call among three phones. CEP enabled.
3327
3328        1. Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3329        2. Call from PhoneA (VoLTE) to PhoneC (VoLTE), accept on PhoneC.
3330        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3331        4. On PhoneA disconnect call between A-C, verify call continues.
3332        5. On PhoneA disconnect call between A-B, verify call continues.
3333
3334        Returns:
3335            True if pass; False if fail.
3336        """
3337        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(0)
3338        if call_ab_id is None or call_ac_id is None:
3339            return False
3340
3341        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
3342            call_ab_id, call_ac_id)
3343
3344    @TelephonyBaseTest.tel_test_wrap
3345    @test_tracker_info(uuid="a6c22e39-fd7e-4bed-982a-145065572281")
3346    def test_volte_mo_mo_add_volte_merge_drop_first_call_from_participant_cep(
3347            self):
3348        """ Test VoLTE Conference Call among three phones. CEP enabled.
3349
3350        1. Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3351        2. Call from PhoneA (VoLTE) to PhoneC (VoLTE), accept on PhoneC.
3352        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3353        4. End call on PhoneB, verify call continues.
3354        5. End call on PhoneC, verify call end on PhoneA.
3355
3356        Returns:
3357            True if pass; False if fail.
3358        """
3359        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(0)
3360        if call_ab_id is None or call_ac_id is None:
3361            return False
3362
3363        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
3364            call_ab_id, call_ac_id)
3365
3366    @TelephonyBaseTest.tel_test_wrap
3367    @test_tracker_info(uuid="2188722a-31e3-4e46-8f74-6ea4cbc08476")
3368    def test_volte_mo_mo_add_volte_merge_drop_first_call_from_host_cep(self):
3369        """ Test VoLTE Conference Call among three phones. CEP enabled.
3370
3371        1. Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3372        2. Call from PhoneA (VoLTE) to PhoneC (VoLTE), accept on PhoneC.
3373        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3374        4. On PhoneA disconnect call between A-B, verify call continues.
3375        5. On PhoneA disconnect call between A-C, verify call continues.
3376
3377        Returns:
3378            True if pass; False if fail.
3379        """
3380        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(0)
3381        if call_ab_id is None or call_ac_id is None:
3382            return False
3383
3384        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
3385            call_ab_id, call_ac_id)
3386
3387    @TelephonyBaseTest.tel_test_wrap
3388    @test_tracker_info(uuid="ef5ec1c9-7771-4289-ad94-08a80145d680")
3389    def test_volte_mo_mt_add_volte_merge_drop_second_call_from_participant_no_cep(
3390            self):
3391        """ Test VoLTE Conference Call among three phones. No CEP.
3392
3393        Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3394        Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3395        On PhoneA, merge to conference call (No CEP).
3396        End call on PhoneC, verify call continues.
3397        End call on PhoneB, verify call end on PhoneA.
3398
3399        Returns:
3400            True if pass; False if fail.
3401        """
3402        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(0)
3403        if call_ab_id is None or call_ac_id is None:
3404            return False
3405
3406        return self._test_ims_conference_merge_drop_second_call_no_cep(
3407            call_ab_id, call_ac_id)
3408
3409    @TelephonyBaseTest.tel_test_wrap
3410    @test_tracker_info(uuid="2111001d-c310-4eff-a6ef-201d199796ea")
3411    def test_volte_mo_mt_add_volte_merge_drop_second_call_from_participant_cep(
3412            self):
3413        """ Test VoLTE Conference Call among three phones. CEP enabled.
3414
3415        1. Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3416        2. Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3417        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3418        4. End call on PhoneC, verify call continues.
3419        5. End call on PhoneB, verify call end on PhoneA.
3420
3421        Returns:
3422            True if pass; False if fail.
3423        """
3424        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(0)
3425        if call_ab_id is None or call_ac_id is None:
3426            return False
3427
3428        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
3429            call_ab_id, call_ac_id)
3430
3431    @TelephonyBaseTest.tel_test_wrap
3432    @test_tracker_info(uuid="eee3577b-5427-43ee-aff0-ed7f7846b41c")
3433    def test_volte_mo_mt_add_volte_merge_drop_second_call_from_host_cep(self):
3434        """ Test VoLTE Conference Call among three phones. CEP enabled.
3435
3436        1. Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3437        2. Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3438        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3439        4. On PhoneA disconnect call between A-C, verify call continues.
3440        5. On PhoneA disconnect call between A-B, verify call continues.
3441
3442        Returns:
3443            True if pass; False if fail.
3444        """
3445        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(0)
3446        if call_ab_id is None or call_ac_id is None:
3447            return False
3448
3449        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
3450            call_ab_id, call_ac_id)
3451
3452    @TelephonyBaseTest.tel_test_wrap
3453    @test_tracker_info(uuid="86faf200-be78-452d-8662-85e7f42a2d3b")
3454    def test_volte_mo_mt_add_volte_merge_drop_first_call_from_participant_cep(
3455            self):
3456        """ Test VoLTE Conference Call among three phones. CEP enabled.
3457
3458        1. Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3459        2. Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3460        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3461        4. End call on PhoneB, verify call continues.
3462        5. End call on PhoneC, verify call end on PhoneA.
3463
3464        Returns:
3465            True if pass; False if fail.
3466        """
3467        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(0)
3468        if call_ab_id is None or call_ac_id is None:
3469            return False
3470
3471        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
3472            call_ab_id, call_ac_id)
3473
3474    @TelephonyBaseTest.tel_test_wrap
3475    @test_tracker_info(uuid="d0e18f3c-71a1-49c9-b3ad-b8c24f8a43ec")
3476    def test_volte_mo_mt_add_volte_merge_drop_first_call_from_host_cep(self):
3477        """ Test VoLTE Conference Call among three phones. CEP enabled.
3478
3479        1. Call from PhoneA (VoLTE) to PhoneB (VoLTE), accept on PhoneB.
3480        2. Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3481        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3482        4. On PhoneA disconnect call between A-B, verify call continues.
3483        5. On PhoneA disconnect call between A-C, verify call continues.
3484
3485        Returns:
3486            True if pass; False if fail.
3487        """
3488        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(0)
3489        if call_ab_id is None or call_ac_id is None:
3490            return False
3491
3492        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
3493            call_ab_id, call_ac_id)
3494
3495    @TelephonyBaseTest.tel_test_wrap
3496    @test_tracker_info(uuid="b27d6b3d-b73b-4a20-a5ae-2990d73a07fe")
3497    def test_volte_mt_mt_add_volte_merge_drop_second_call_from_participant_no_cep(
3498            self):
3499        """ Test VoLTE Conference Call among three phones. No CEP.
3500
3501        Call from PhoneB (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3502        Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3503        On PhoneA, merge to conference call (No CEP).
3504        End call on PhoneC, verify call continues.
3505        End call on PhoneB, verify call end on PhoneA.
3506
3507        Returns:
3508            True if pass; False if fail.
3509        """
3510        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(0)
3511        if call_ab_id is None or call_ac_id is None:
3512            return False
3513
3514        return self._test_ims_conference_merge_drop_second_call_no_cep(
3515            call_ab_id, call_ac_id)
3516
3517    @TelephonyBaseTest.tel_test_wrap
3518    @test_tracker_info(uuid="f66e940c-30bd-48c7-b5e2-91147fa04ba2")
3519    def test_volte_mt_mt_add_volte_merge_drop_second_call_from_participant_cep(
3520            self):
3521        """ Test VoLTE Conference Call among three phones. CEP enabled.
3522
3523        1. Call from PhoneB (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3524        2. Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3525        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3526        4. End call on PhoneC, verify call continues.
3527        5. End call on PhoneB, verify call end on PhoneA.
3528
3529        Returns:
3530            True if pass; False if fail.
3531        """
3532        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(0)
3533        if call_ab_id is None or call_ac_id is None:
3534            return False
3535
3536        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
3537            call_ab_id, call_ac_id)
3538
3539    @TelephonyBaseTest.tel_test_wrap
3540    @test_tracker_info(uuid="ad313a8b-8bb0-43eb-a10e-e2c17f530ee4")
3541    def test_volte_mt_mt_add_volte_merge_drop_second_call_from_host_cep(self):
3542        """ Test VoLTE Conference Call among three phones. CEP enabled.
3543
3544        1. Call from PhoneB (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3545        2. Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3546        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3547        4. On PhoneA disconnect call between A-C, verify call continues.
3548        5. On PhoneA disconnect call between A-B, verify call continues.
3549
3550        Returns:
3551            True if pass; False if fail.
3552        """
3553        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(0)
3554        if call_ab_id is None or call_ac_id is None:
3555            return False
3556
3557        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
3558            call_ab_id, call_ac_id)
3559
3560    @TelephonyBaseTest.tel_test_wrap
3561    @test_tracker_info(uuid="18b30c14-fef1-4055-8987-ee6137609b81")
3562    def test_volte_mt_mt_add_volte_merge_drop_first_call_from_participant_cep(
3563            self):
3564        """ Test VoLTE Conference Call among three phones. CEP enabled.
3565
3566        1. Call from PhoneB (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3567        2. Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3568        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3569        4. End call on PhoneB, verify call continues.
3570        5. End call on PhoneC, verify call end on PhoneA.
3571
3572        Returns:
3573            True if pass; False if fail.
3574        """
3575        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(0)
3576        if call_ab_id is None or call_ac_id is None:
3577            return False
3578
3579        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
3580            call_ab_id, call_ac_id)
3581
3582    @TelephonyBaseTest.tel_test_wrap
3583    @test_tracker_info(uuid="7dc24162-f06e-453b-93e6-926d31e6d387")
3584    def test_volte_mt_mt_add_volte_merge_drop_first_call_from_host_cep(self):
3585        """ Test VoLTE Conference Call among three phones. CEP enabled.
3586
3587        1. Call from PhoneB (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3588        2. Call from PhoneC (VoLTE) to PhoneA (VoLTE), accept on PhoneA.
3589        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3590        4. On PhoneA disconnect call between A-B, verify call continues.
3591        5. On PhoneA disconnect call between A-C, verify call continues.
3592
3593        Returns:
3594            True if pass; False if fail.
3595        """
3596        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(0)
3597        if call_ab_id is None or call_ac_id is None:
3598            return False
3599
3600        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
3601            call_ab_id, call_ac_id)
3602
3603    @TelephonyBaseTest.tel_test_wrap
3604    @test_tracker_info(uuid="eb90a56b-2085-4fde-a156-ada3620200df")
3605    def test_volte_mo_mo_add_wcdma_merge_drop_second_call_from_participant_no_cep(
3606            self):
3607        """ Test VoLTE Conference Call among three phones. No CEP.
3608
3609        Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3610        Call from PhoneA (VOLTE) to PhoneC (WCDMA), accept on PhoneC.
3611        On PhoneA, merge to conference call (No CEP).
3612        End call on PhoneC, verify call continues.
3613        End call on PhoneB, verify call end on PhoneA.
3614
3615        Returns:
3616            True if pass; False if fail.
3617        """
3618        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(0)
3619        if call_ab_id is None or call_ac_id is None:
3620            return False
3621
3622        return self._test_ims_conference_merge_drop_second_call_no_cep(
3623            call_ab_id, call_ac_id)
3624
3625    @TelephonyBaseTest.tel_test_wrap
3626    @test_tracker_info(uuid="ae999260-7856-41cc-bf4c-67b26e18c9a3")
3627    def test_volte_mo_mo_add_wcdma_merge_drop_second_call_from_participant_cep(
3628            self):
3629        """ Test VoLTE Conference Call among three phones. CEP enabled.
3630
3631        1. Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3632        2. Call from PhoneA (VoLTE) to PhoneC (WCDMA), accept on PhoneC.
3633        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3634        4. End call on PhoneC, verify call continues.
3635        5. End call on PhoneB, verify call end on PhoneA.
3636
3637        Returns:
3638            True if pass; False if fail.
3639        """
3640        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(0)
3641        if call_ab_id is None or call_ac_id is None:
3642            return False
3643
3644        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
3645            call_ab_id, call_ac_id)
3646
3647    @TelephonyBaseTest.tel_test_wrap
3648    @test_tracker_info(uuid="cd48de00-c1e5-4716-b232-3f1f98e89510")
3649    def test_volte_mo_mo_add_wcdma_merge_drop_second_call_from_host_cep(self):
3650        """ Test VoLTE Conference Call among three phones. CEP enabled.
3651
3652        1. Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3653        2. Call from PhoneA (VoLTE) to PhoneC (WCDMA), accept on PhoneC.
3654        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3655        4. On PhoneA disconnect call between A-C, verify call continues.
3656        5. On PhoneA disconnect call between A-B, verify call continues.
3657
3658        Returns:
3659            True if pass; False if fail.
3660        """
3661        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(0)
3662        if call_ab_id is None or call_ac_id is None:
3663            return False
3664
3665        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
3666            call_ab_id, call_ac_id)
3667
3668    @TelephonyBaseTest.tel_test_wrap
3669    @test_tracker_info(uuid="a84ea6e8-dabc-4bab-b6d1-700b0a0fb9e9")
3670    def test_volte_mo_mo_add_wcdma_merge_drop_first_call_from_participant_cep(
3671            self):
3672        """ Test VoLTE Conference Call among three phones. CEP enabled.
3673
3674        1. Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3675        2. Call from PhoneA (VoLTE) to PhoneC (WCDMA), accept on PhoneC.
3676        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3677        4. End call on PhoneB, verify call continues.
3678        5. End call on PhoneC, verify call end on PhoneA.
3679
3680        Returns:
3681            True if pass; False if fail.
3682        """
3683        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(0)
3684        if call_ab_id is None or call_ac_id is None:
3685            return False
3686
3687        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
3688            call_ab_id, call_ac_id)
3689
3690    @TelephonyBaseTest.tel_test_wrap
3691    @test_tracker_info(uuid="7ac9a806-c608-42dd-a4fd-66b0ba535434")
3692    def test_volte_mo_mo_add_wcdma_merge_drop_first_call_from_host_cep(self):
3693        """ Test VoLTE Conference Call among three phones. CEP enabled.
3694
3695        1. Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3696        2. Call from PhoneA (VoLTE) to PhoneC (WCDMA), accept on PhoneC.
3697        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3698        4. On PhoneA disconnect call between A-B, verify call continues.
3699        5. On PhoneA disconnect call between A-C, verify call continues.
3700
3701        Returns:
3702            True if pass; False if fail.
3703        """
3704        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(0)
3705        if call_ab_id is None or call_ac_id is None:
3706            return False
3707
3708        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
3709            call_ab_id, call_ac_id)
3710
3711    @TelephonyBaseTest.tel_test_wrap
3712    @test_tracker_info(uuid="35f9eb31-3a77-457c-aeb0-55a73c60dda1")
3713    def test_volte_mo_mt_add_wcdma_merge_drop_second_call_from_participant_no_cep(
3714            self):
3715        """ Test VoLTE Conference Call among three phones. No CEP.
3716
3717        Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3718        Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3719        On PhoneA, merge to conference call (No CEP).
3720        End call on PhoneC, verify call continues.
3721        End call on PhoneB, verify call end on PhoneA.
3722
3723        Returns:
3724            True if pass; False if fail.
3725        """
3726        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(0)
3727        if call_ab_id is None or call_ac_id is None:
3728            return False
3729
3730        return self._test_ims_conference_merge_drop_second_call_no_cep(
3731            call_ab_id, call_ac_id)
3732
3733    @TelephonyBaseTest.tel_test_wrap
3734    @test_tracker_info(uuid="f3314f74-e929-45ed-91cb-27c1c26e240f")
3735    def test_volte_mo_mt_add_wcdma_merge_drop_second_call_from_participant_cep(
3736            self):
3737        """ Test VoLTE Conference Call among three phones. CEP enabled.
3738
3739        1. Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3740        2. Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3741        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3742        4. End call on PhoneC, verify call continues.
3743        5. End call on PhoneB, verify call end on PhoneA.
3744
3745        Returns:
3746            True if pass; False if fail.
3747        """
3748        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(0)
3749        if call_ab_id is None or call_ac_id is None:
3750            return False
3751
3752        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
3753            call_ab_id, call_ac_id)
3754
3755    @TelephonyBaseTest.tel_test_wrap
3756    @test_tracker_info(uuid="5e521ff1-505b-4d63-8b12-7b0187dea94b")
3757    def test_volte_mo_mt_add_wcdma_merge_drop_second_call_from_host_cep(self):
3758        """ Test VoLTE Conference Call among three phones. CEP enabled.
3759
3760        1. Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3761        2. Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3762        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3763        4. On PhoneA disconnect call between A-C, verify call continues.
3764        5. On PhoneA disconnect call between A-B, verify call continues.
3765
3766        Returns:
3767            True if pass; False if fail.
3768        """
3769        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(0)
3770        if call_ab_id is None or call_ac_id is None:
3771            return False
3772
3773        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
3774            call_ab_id, call_ac_id)
3775
3776    @TelephonyBaseTest.tel_test_wrap
3777    @test_tracker_info(uuid="d5732ea2-a657-40ea-bb30-151e53cf8058")
3778    def test_volte_mo_mt_add_wcdma_merge_drop_first_call_from_participant_cep(
3779            self):
3780        """ Test VoLTE Conference Call among three phones. CEP enabled.
3781
3782        1. Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3783        2. Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3784        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3785        4. End call on PhoneB, verify call continues.
3786        5. End call on PhoneC, verify call end on PhoneA.
3787
3788        Returns:
3789            True if pass; False if fail.
3790        """
3791        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(0)
3792        if call_ab_id is None or call_ac_id is None:
3793            return False
3794
3795        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
3796            call_ab_id, call_ac_id)
3797
3798    @TelephonyBaseTest.tel_test_wrap
3799    @test_tracker_info(uuid="78e73444-3dde-465f-bf5e-dc48b40a93f3")
3800    def test_volte_mo_mt_add_wcdma_merge_drop_first_call_from_host_cep(self):
3801        """ Test VoLTE Conference Call among three phones. CEP enabled.
3802
3803        1. Call from PhoneA (VoLTE) to PhoneB (WCDMA), accept on PhoneB.
3804        2. Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3805        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3806        4. On PhoneA disconnect call between A-B, verify call continues.
3807        5. On PhoneA disconnect call between A-C, verify call continues.
3808
3809        Returns:
3810            True if pass; False if fail.
3811        """
3812        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(0)
3813        if call_ab_id is None or call_ac_id is None:
3814            return False
3815
3816        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
3817            call_ab_id, call_ac_id)
3818
3819    @TelephonyBaseTest.tel_test_wrap
3820    @test_tracker_info(uuid="f4efbf04-b117-4508-ba86-0ef37481cc3a")
3821    def test_volte_mt_mt_add_wcdma_merge_drop_second_call_from_participant_no_cep(
3822            self):
3823        """ Test VoLTE Conference Call among three phones. No CEP.
3824
3825        Call from PhoneB (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3826        Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3827        On PhoneA, merge to conference call (No CEP).
3828        End call on PhoneC, verify call continues.
3829        End call on PhoneB, verify call end on PhoneA.
3830
3831        Returns:
3832            True if pass; False if fail.
3833        """
3834        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(0)
3835        if call_ab_id is None or call_ac_id is None:
3836            return False
3837
3838        return self._test_ims_conference_merge_drop_second_call_no_cep(
3839            call_ab_id, call_ac_id)
3840
3841    @TelephonyBaseTest.tel_test_wrap
3842    @test_tracker_info(uuid="064109cf-d166-448a-8655-81744ea37e05")
3843    def test_volte_mt_mt_add_wcdma_merge_drop_second_call_from_participant_cep(
3844            self):
3845        """ Test VoLTE Conference Call among three phones. CEP enabled.
3846
3847        1. Call from PhoneB (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3848        2. Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3849        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3850        4. End call on PhoneC, verify call continues.
3851        5. End call on PhoneB, verify call end on PhoneA.
3852
3853        Returns:
3854            True if pass; False if fail.
3855        """
3856        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(0)
3857        if call_ab_id is None or call_ac_id is None:
3858            return False
3859
3860        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
3861            call_ab_id, call_ac_id)
3862
3863    @TelephonyBaseTest.tel_test_wrap
3864    @test_tracker_info(uuid="bedd0576-5bb6-4fef-9700-f638cf742201")
3865    def test_volte_mt_mt_add_wcdma_merge_drop_second_call_from_host_cep(self):
3866        """ Test VoLTE Conference Call among three phones. CEP enabled.
3867
3868        1. Call from PhoneB (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3869        2. Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3870        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3871        4. On PhoneA disconnect call between A-C, verify call continues.
3872        5. On PhoneA disconnect call between A-B, verify call continues.
3873
3874        Returns:
3875            True if pass; False if fail.
3876        """
3877        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(0)
3878        if call_ab_id is None or call_ac_id is None:
3879            return False
3880
3881        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
3882            call_ab_id, call_ac_id)
3883
3884    @TelephonyBaseTest.tel_test_wrap
3885    @test_tracker_info(uuid="46178387-a0dc-4e77-8ca4-06f731e1104f")
3886    def test_volte_mt_mt_add_wcdma_merge_drop_first_call_from_participant_cep(
3887            self):
3888        """ Test VoLTE Conference Call among three phones. CEP enabled.
3889
3890        1. Call from PhoneB (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3891        2. Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3892        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3893        4. End call on PhoneB, verify call continues.
3894        5. End call on PhoneC, verify call end on PhoneA.
3895
3896        Returns:
3897            True if pass; False if fail.
3898        """
3899        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(0)
3900        if call_ab_id is None or call_ac_id is None:
3901            return False
3902
3903        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
3904            call_ab_id, call_ac_id)
3905
3906    @TelephonyBaseTest.tel_test_wrap
3907    @test_tracker_info(uuid="a1d13168-078b-47d8-89f0-0798b085502d")
3908    def test_volte_mt_mt_add_wcdma_merge_drop_first_call_from_host_cep(self):
3909        """ Test VoLTE Conference Call among three phones. CEP enabled.
3910
3911        1. Call from PhoneB (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3912        2. Call from PhoneC (WCDMA) to PhoneA (VoLTE), accept on PhoneA.
3913        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3914        4. On PhoneA disconnect call between A-B, verify call continues.
3915        5. On PhoneA disconnect call between A-C, verify call continues.
3916
3917        Returns:
3918            True if pass; False if fail.
3919        """
3920        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(0)
3921        if call_ab_id is None or call_ac_id is None:
3922            return False
3923
3924        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
3925            call_ab_id, call_ac_id)
3926
3927    @TelephonyBaseTest.tel_test_wrap
3928    @test_tracker_info(uuid="08a26dc4-78e5-47cb-af75-9695453e82bb")
3929    def test_volte_mo_mo_add_1x_merge_drop_second_call_from_participant_no_cep(
3930            self):
3931        """ Test VoLTE Conference Call among three phones. No CEP.
3932
3933        Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
3934        Call from PhoneA (VOLTE) to PhoneC (1x), accept on PhoneC.
3935        On PhoneA, merge to conference call (No CEP).
3936        End call on PhoneC, verify call continues.
3937        End call on PhoneB, verify call end on PhoneA.
3938
3939        Returns:
3940            True if pass; False if fail.
3941        """
3942        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(0)
3943        if call_ab_id is None or call_ac_id is None:
3944            return False
3945
3946        return self._test_ims_conference_merge_drop_second_call_no_cep(
3947            call_ab_id, call_ac_id)
3948
3949    @TelephonyBaseTest.tel_test_wrap
3950    @test_tracker_info(uuid="bde45028-b844-4192-89b1-8579941a03ed")
3951    def test_volte_mo_mo_add_1x_merge_drop_second_call_from_participant_cep(
3952            self):
3953        """ Test VoLTE Conference Call among three phones. CEP enabled.
3954
3955        1. Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
3956        2. Call from PhoneA (VoLTE) to PhoneC (1x), accept on PhoneC.
3957        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3958        4. End call on PhoneC, verify call continues.
3959        5. End call on PhoneB, verify call end on PhoneA.
3960
3961        Returns:
3962            True if pass; False if fail.
3963        """
3964        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(0)
3965        if call_ab_id is None or call_ac_id is None:
3966            return False
3967
3968        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
3969            call_ab_id, call_ac_id)
3970
3971    @TelephonyBaseTest.tel_test_wrap
3972    @test_tracker_info(uuid="f38d3031-d7f1-4990-bce3-9c329beb5eeb")
3973    def test_volte_mo_mo_add_1x_merge_drop_second_call_from_host_cep(self):
3974        """ Test VoLTE Conference Call among three phones. CEP enabled.
3975
3976        1. Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
3977        2. Call from PhoneA (VoLTE) to PhoneC (1x), accept on PhoneC.
3978        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
3979        4. On PhoneA disconnect call between A-C, verify call continues.
3980        5. On PhoneA disconnect call between A-B, verify call continues.
3981
3982        Returns:
3983            True if pass; False if fail.
3984        """
3985        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(0)
3986        if call_ab_id is None or call_ac_id is None:
3987            return False
3988
3989        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
3990            call_ab_id, call_ac_id)
3991
3992    @TelephonyBaseTest.tel_test_wrap
3993    @test_tracker_info(uuid="d1391513-8592-4159-81b7-16cb10c406e8")
3994    def test_volte_mo_mo_add_1x_merge_drop_first_call_from_participant_cep(
3995            self):
3996        """ Test VoLTE Conference Call among three phones. CEP enabled.
3997
3998        1. Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
3999        2. Call from PhoneA (VoLTE) to PhoneC (1x), accept on PhoneC.
4000        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4001        4. End call on PhoneB, verify call continues.
4002        5. End call on PhoneC, verify call end on PhoneA.
4003
4004        Returns:
4005            True if pass; False if fail.
4006        """
4007        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(0)
4008        if call_ab_id is None or call_ac_id is None:
4009            return False
4010
4011        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
4012            call_ab_id, call_ac_id)
4013
4014    @TelephonyBaseTest.tel_test_wrap
4015    @test_tracker_info(uuid="e05c261e-e99a-4ca7-a8db-9ad982e06913")
4016    def test_volte_mo_mo_add_1x_merge_drop_first_call_from_host_cep(self):
4017        """ Test VoLTE Conference Call among three phones. CEP enabled.
4018
4019        1. Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
4020        2. Call from PhoneA (VoLTE) to PhoneC (1x), accept on PhoneC.
4021        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4022        4. On PhoneA disconnect call between A-B, verify call continues.
4023        5. On PhoneA disconnect call between A-C, verify call continues.
4024
4025        Returns:
4026            True if pass; False if fail.
4027        """
4028        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(0)
4029        if call_ab_id is None or call_ac_id is None:
4030            return False
4031
4032        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
4033            call_ab_id, call_ac_id)
4034
4035    @TelephonyBaseTest.tel_test_wrap
4036    @test_tracker_info(uuid="f4329201-a388-4070-9225-37d4c8045096")
4037    def test_volte_mo_mt_add_1x_merge_drop_second_call_from_participant_no_cep(
4038            self):
4039        """ Test VoLTE Conference Call among three phones. No CEP.
4040
4041        Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
4042        Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4043        On PhoneA, merge to conference call (No CEP).
4044        End call on PhoneC, verify call continues.
4045        End call on PhoneB, verify call end on PhoneA.
4046
4047        Returns:
4048            True if pass; False if fail.
4049        """
4050        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(0)
4051        if call_ab_id is None or call_ac_id is None:
4052            return False
4053
4054        return self._test_ims_conference_merge_drop_second_call_no_cep(
4055            call_ab_id, call_ac_id)
4056
4057    @TelephonyBaseTest.tel_test_wrap
4058    @test_tracker_info(uuid="fafa96ef-649a-4ff7-8fed-d4bfd6d88c2e")
4059    def test_volte_mo_mt_add_1x_merge_drop_second_call_from_participant_cep(
4060            self):
4061        """ Test VoLTE Conference Call among three phones. CEP enabled.
4062
4063        1. Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
4064        2. Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4065        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4066        4. End call on PhoneC, verify call continues.
4067        5. End call on PhoneB, verify call end on PhoneA.
4068
4069        Returns:
4070            True if pass; False if fail.
4071        """
4072        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(0)
4073        if call_ab_id is None or call_ac_id is None:
4074            return False
4075
4076        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
4077            call_ab_id, call_ac_id)
4078
4079    @TelephonyBaseTest.tel_test_wrap
4080    @test_tracker_info(uuid="66d79e0b-879d-461c-bf5d-b27495f73754")
4081    def test_volte_mo_mt_add_1x_merge_drop_second_call_from_host_cep(self):
4082        """ Test VoLTE Conference Call among three phones. CEP enabled.
4083
4084        1. Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
4085        2. Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4086        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4087        4. On PhoneA disconnect call between A-C, verify call continues.
4088        5. On PhoneA disconnect call between A-B, verify call continues.
4089
4090        Returns:
4091            True if pass; False if fail.
4092        """
4093        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(0)
4094        if call_ab_id is None or call_ac_id is None:
4095            return False
4096
4097        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
4098            call_ab_id, call_ac_id)
4099
4100    @TelephonyBaseTest.tel_test_wrap
4101    @test_tracker_info(uuid="a5f2a3d0-9b00-4496-8316-ea626b1c978a")
4102    def test_volte_mo_mt_add_1x_merge_drop_first_call_from_participant_cep(
4103            self):
4104        """ Test VoLTE Conference Call among three phones. CEP enabled.
4105
4106        1. Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
4107        2. Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4108        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4109        4. End call on PhoneB, verify call continues.
4110        5. End call on PhoneC, verify call end on PhoneA.
4111
4112        Returns:
4113            True if pass; False if fail.
4114        """
4115        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(0)
4116        if call_ab_id is None or call_ac_id is None:
4117            return False
4118
4119        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
4120            call_ab_id, call_ac_id)
4121
4122    @TelephonyBaseTest.tel_test_wrap
4123    @test_tracker_info(uuid="98cfd8d8-200f-4820-94ed-1561df1ed152")
4124    def test_volte_mo_mt_add_1x_merge_drop_first_call_from_host_cep(self):
4125        """ Test VoLTE Conference Call among three phones. CEP enabled.
4126
4127        1. Call from PhoneA (VoLTE) to PhoneB (1x), accept on PhoneB.
4128        2. Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4129        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4130        4. On PhoneA disconnect call between A-B, verify call continues.
4131        5. On PhoneA disconnect call between A-C, verify call continues.
4132
4133        Returns:
4134            True if pass; False if fail.
4135        """
4136        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(0)
4137        if call_ab_id is None or call_ac_id is None:
4138            return False
4139
4140        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
4141            call_ab_id, call_ac_id)
4142
4143    @TelephonyBaseTest.tel_test_wrap
4144    @test_tracker_info(uuid="c9ee6bb1-4aee-4fc9-95b0-f899d3d31d82")
4145    def test_volte_mt_mt_add_1x_merge_drop_second_call_from_participant_no_cep(
4146            self):
4147        """ Test VoLTE Conference Call among three phones. No CEP.
4148
4149        Call from PhoneB (1x) to PhoneA (VoLTE), accept on PhoneA.
4150        Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4151        On PhoneA, merge to conference call (No CEP).
4152        End call on PhoneC, verify call continues.
4153        End call on PhoneB, verify call end on PhoneA.
4154
4155        Returns:
4156            True if pass; False if fail.
4157        """
4158        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(0)
4159        if call_ab_id is None or call_ac_id is None:
4160            return False
4161
4162        return self._test_ims_conference_merge_drop_second_call_no_cep(
4163            call_ab_id, call_ac_id)
4164
4165    @TelephonyBaseTest.tel_test_wrap
4166    @test_tracker_info(uuid="f4fb92a1-d4a0-4796-bdb4-f441b926c63c")
4167    def test_volte_mt_mt_add_1x_merge_drop_second_call_from_participant_cep(
4168            self):
4169        """ Test VoLTE Conference Call among three phones. CEP enabled.
4170
4171        1. Call from PhoneB (1x) to PhoneA (VoLTE), accept on PhoneA.
4172        2. Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4173        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4174        4. End call on PhoneC, verify call continues.
4175        5. End call on PhoneB, verify call end on PhoneA.
4176
4177        Returns:
4178            True if pass; False if fail.
4179        """
4180        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(0)
4181        if call_ab_id is None or call_ac_id is None:
4182            return False
4183
4184        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
4185            call_ab_id, call_ac_id)
4186
4187    @TelephonyBaseTest.tel_test_wrap
4188    @test_tracker_info(uuid="8ad0e672-83cc-463a-aa12-d331faa5eb17")
4189    def test_volte_mt_mt_add_1x_merge_drop_second_call_from_host_cep(self):
4190        """ Test VoLTE Conference Call among three phones. CEP enabled.
4191
4192        1. Call from PhoneB (1x) to PhoneA (VoLTE), accept on PhoneA.
4193        2. Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4194        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4195        4. On PhoneA disconnect call between A-C, verify call continues.
4196        5. On PhoneA disconnect call between A-B, verify call continues.
4197
4198        Returns:
4199            True if pass; False if fail.
4200        """
4201        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(0)
4202        if call_ab_id is None or call_ac_id is None:
4203            return False
4204
4205        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
4206            call_ab_id, call_ac_id)
4207
4208    @TelephonyBaseTest.tel_test_wrap
4209    @test_tracker_info(uuid="3dad2fd1-d2c0-477c-a758-3c054df6e92a")
4210    def test_volte_mt_mt_add_1x_merge_drop_first_call_from_participant_cep(
4211            self):
4212        """ Test VoLTE Conference Call among three phones. CEP enabled.
4213
4214        1. Call from PhoneB (1x) to PhoneA (VoLTE), accept on PhoneA.
4215        2. Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4216        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4217        4. End call on PhoneB, verify call continues.
4218        5. End call on PhoneC, verify call end on PhoneA.
4219
4220        Returns:
4221            True if pass; False if fail.
4222        """
4223        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(0)
4224        if call_ab_id is None or call_ac_id is None:
4225            return False
4226
4227        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
4228            call_ab_id, call_ac_id)
4229
4230    @TelephonyBaseTest.tel_test_wrap
4231    @test_tracker_info(uuid="e382469b-8767-47fd-b3e6-8c81d8fb45ef")
4232    def test_volte_mt_mt_add_1x_merge_drop_first_call_from_host_cep(self):
4233        """ Test VoLTE Conference Call among three phones. CEP enabled.
4234
4235        1. Call from PhoneB (1x) to PhoneA (VoLTE), accept on PhoneA.
4236        2. Call from PhoneC (1x) to PhoneA (VoLTE), accept on PhoneA.
4237        3. On PhoneA, merge to conference call (VoLTE CEP conference call).
4238        4. On PhoneA disconnect call between A-B, verify call continues.
4239        5. On PhoneA disconnect call between A-C, verify call continues.
4240
4241        Returns:
4242            True if pass; False if fail.
4243        """
4244        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(0)
4245        if call_ab_id is None or call_ac_id is None:
4246            return False
4247
4248        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
4249            call_ab_id, call_ac_id)
4250
4251    @TelephonyBaseTest.tel_test_wrap
4252    @test_tracker_info(uuid="98db2430-07c2-4ec7-8644-2aa081a3eb22")
4253    def test_volte_mo_mo_add_volte_swap_twice_drop_held(self):
4254        """Test swap feature in VoLTE call.
4255
4256        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4257        PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4258        Swap active call on PhoneA.
4259        Swap active call on PhoneA.
4260        Hangup call from PhoneB, check if call continues between AC.
4261
4262        """
4263        ads = self.android_devices
4264
4265        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(2)
4266        if call_ab_id is None or call_ac_id is None:
4267            return False
4268
4269        return self._three_phone_hangup_call_verify_call_state(
4270            ad_hangup=ads[1],
4271            ad_verify=ads[0],
4272            call_id=call_ac_id,
4273            call_state=CALL_STATE_ACTIVE,
4274            ads_active=[ads[0], ads[2]])
4275
4276    @TelephonyBaseTest.tel_test_wrap
4277    @test_tracker_info(uuid="7504958b-172b-4afc-97ea-9562b8429dfe")
4278    def test_volte_mo_mo_add_volte_swap_twice_drop_active(self):
4279        """Test swap feature in VoLTE call.
4280
4281        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4282        PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4283        Swap active call on PhoneA.
4284        Swap active call on PhoneA.
4285        Hangup call from PhoneC, check if call continues between AB.
4286
4287        """
4288        ads = self.android_devices
4289
4290        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(2)
4291        if call_ab_id is None or call_ac_id is None:
4292            return False
4293
4294        return self._three_phone_hangup_call_verify_call_state(
4295            ad_hangup=ads[2],
4296            ad_verify=ads[0],
4297            call_id=call_ab_id,
4298            call_state=self._get_expected_call_state(ads[0]),
4299            ads_active=[ads[0], ads[1]])
4300
4301    @TelephonyBaseTest.tel_test_wrap
4302    @test_tracker_info(uuid="ac02ce22-fd8c-48ba-9e68-6748d1e48c68")
4303    def test_volte_mo_mt_add_volte_swap_twice_drop_held(self):
4304        """Test swap feature in VoLTE call.
4305
4306        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4307        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
4308        Swap active call on PhoneA.
4309        Swap active call on PhoneA.
4310        Hangup call from PhoneB, check if call continues between AC.
4311
4312        """
4313        ads = self.android_devices
4314
4315        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(2)
4316        if call_ab_id is None or call_ac_id is None:
4317            return False
4318
4319        return self._three_phone_hangup_call_verify_call_state(
4320            ad_hangup=ads[1],
4321            ad_verify=ads[0],
4322            call_id=call_ac_id,
4323            call_state=CALL_STATE_ACTIVE,
4324            ads_active=[ads[0], ads[2]])
4325
4326    @TelephonyBaseTest.tel_test_wrap
4327    @test_tracker_info(uuid="2fb2c4f6-1c14-4122-bc3e-a7a6416003a3")
4328    def test_volte_mo_mt_add_volte_swap_twice_drop_active(self):
4329        """Test swap feature in VoLTE call.
4330
4331        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4332        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
4333        Swap active call on PhoneA.
4334        Swap active call on PhoneA.
4335        Hangup call from PhoneC, check if call continues between AB.
4336
4337        """
4338        ads = self.android_devices
4339
4340        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(2)
4341        if call_ab_id is None or call_ac_id is None:
4342            return False
4343
4344        return self._three_phone_hangup_call_verify_call_state(
4345            ad_hangup=ads[2],
4346            ad_verify=ads[0],
4347            call_id=call_ab_id,
4348            call_state=self._get_expected_call_state(ads[0]),
4349            ads_active=[ads[0], ads[1]])
4350
4351    @TelephonyBaseTest.tel_test_wrap
4352    @test_tracker_info(uuid="deed9c13-2e9d-464a-b8f7-62e91265451d")
4353    def test_volte_mo_mo_add_volte_swap_once_drop_held(self):
4354        """Test swap feature in VoLTE call.
4355
4356        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4357        PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4358        Swap active call on PhoneA.
4359        Hangup call from PhoneC, check if call continues between AB.
4360
4361        """
4362        ads = self.android_devices
4363
4364        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(1)
4365        if call_ab_id is None or call_ac_id is None:
4366            return False
4367
4368        return self._three_phone_hangup_call_verify_call_state(
4369            ad_hangup=ads[2],
4370            ad_verify=ads[0],
4371            call_id=call_ab_id,
4372            call_state=CALL_STATE_ACTIVE,
4373            ads_active=[ads[0], ads[1]])
4374
4375    @TelephonyBaseTest.tel_test_wrap
4376    @test_tracker_info(uuid="3324a4d3-68db-41a4-b0d0-3e8e82b84f46")
4377    def test_volte_mo_mo_add_volte_swap_once_drop_active(self):
4378        """Test swap feature in VoLTE call.
4379
4380        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4381        PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4382        Swap active call on PhoneA.
4383        Swap active call on PhoneA.
4384        Hangup call from PhoneB, check if call continues between AC.
4385
4386        """
4387        ads = self.android_devices
4388
4389        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(1)
4390        if call_ab_id is None or call_ac_id is None:
4391            return False
4392
4393        return self._three_phone_hangup_call_verify_call_state(
4394            ad_hangup=ads[1],
4395            ad_verify=ads[0],
4396            call_id=call_ac_id,
4397            call_state=self._get_expected_call_state(ads[0]),
4398            ads_active=[ads[0], ads[2]])
4399
4400    @TelephonyBaseTest.tel_test_wrap
4401    @test_tracker_info(uuid="57c8c3f6-c690-41c3-aaed-98e5548cc4b6")
4402    def test_volte_mo_mt_add_volte_swap_once_drop_held(self):
4403        """Test swap feature in VoLTE call.
4404
4405        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4406        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
4407        Swap active call on PhoneA.
4408        Hangup call from PhoneC, check if call continues between AB.
4409
4410        """
4411        ads = self.android_devices
4412
4413        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(1)
4414        if call_ab_id is None or call_ac_id is None:
4415            return False
4416        return self._three_phone_hangup_call_verify_call_state(
4417            ad_hangup=ads[2],
4418            ad_verify=ads[0],
4419            call_id=call_ab_id,
4420            call_state=CALL_STATE_ACTIVE,
4421            ads_active=[ads[0], ads[1]])
4422
4423    @TelephonyBaseTest.tel_test_wrap
4424    @test_tracker_info(uuid="96376148-f069-41f9-b22f-f5240de427f7")
4425    def test_volte_mo_mt_add_volte_swap_once_drop_active(self):
4426        """Test swap feature in VoLTE call.
4427
4428        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4429        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
4430        Swap active call on PhoneA.
4431        Hangup call from PhoneB, check if call continues between AC.
4432
4433        """
4434        ads = self.android_devices
4435
4436        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(1)
4437        if call_ab_id is None or call_ac_id is None:
4438            return False
4439
4440        return self._three_phone_hangup_call_verify_call_state(
4441            ad_hangup=ads[1],
4442            ad_verify=ads[0],
4443            call_id=call_ac_id,
4444            call_state=self._get_expected_call_state(ads[0]),
4445            ads_active=[ads[0], ads[2]])
4446
4447    @TelephonyBaseTest.tel_test_wrap
4448    @test_tracker_info(uuid="baac4ef4-198b-4a33-a09a-5507c6aa740d")
4449    def test_wcdma_mo_mo_add_swap_twice_drop_held(self):
4450        """Test swap feature in WCDMA call.
4451
4452        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
4453        PhoneA (WCDMA) call PhoneC, accept on PhoneC.
4454        Swap active call on PhoneA.
4455        Swap active call on PhoneA.
4456        Hangup call from PhoneB, check if call continues between AC.
4457
4458        """
4459        ads = self.android_devices
4460
4461        call_ab_id, call_ac_id = self._test_wcdma_mo_mo_add_swap_x(2)
4462        if call_ab_id is None or call_ac_id is None:
4463            return False
4464
4465        return self._three_phone_hangup_call_verify_call_state(
4466            ad_hangup=ads[1],
4467            ad_verify=ads[0],
4468            call_id=call_ac_id,
4469            call_state=CALL_STATE_ACTIVE,
4470            ads_active=[ads[0], ads[2]])
4471
4472    @TelephonyBaseTest.tel_test_wrap
4473    @test_tracker_info(uuid="8c2588ff-3857-49eb-8db0-9e76d7c99c68")
4474    def test_wcdma_mo_mo_add_swap_twice_drop_active(self):
4475        """Test swap feature in WCDMA call.
4476
4477        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
4478        PhoneA (WCDMA) call PhoneC, accept on PhoneC.
4479        Swap active call on PhoneA.
4480        Swap active call on PhoneA.
4481        Hangup call from PhoneC, check if call continues between AB.
4482
4483        """
4484        ads = self.android_devices
4485
4486        call_ab_id, call_ac_id = self._test_wcdma_mo_mo_add_swap_x(2)
4487        if call_ab_id is None or call_ac_id is None:
4488            return False
4489
4490        return self._three_phone_hangup_call_verify_call_state(
4491            ad_hangup=ads[2],
4492            ad_verify=ads[0],
4493            call_id=call_ab_id,
4494            call_state=self._get_expected_call_state(ads[0]),
4495            ads_active=[ads[0], ads[1]])
4496
4497    @TelephonyBaseTest.tel_test_wrap
4498    @test_tracker_info(uuid="16a6aa3c-fe68-41b4-af42-75847062d4ec")
4499    def test_wcdma_mo_mt_add_swap_twice_drop_held(self):
4500        """Test swap feature in WCDMA call.
4501
4502        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
4503        PhoneC call PhoneA (WCDMA), accept on PhoneA.
4504        Swap active call on PhoneA.
4505        Swap active call on PhoneA.
4506        Hangup call from PhoneB, check if call continues between AC.
4507
4508        """
4509        ads = self.android_devices
4510
4511        call_ab_id, call_ac_id = self._test_wcdma_mo_mt_add_swap_x(2)
4512        if call_ab_id is None or call_ac_id is None:
4513            return False
4514
4515        return self._three_phone_hangup_call_verify_call_state(
4516            ad_hangup=ads[1],
4517            ad_verify=ads[0],
4518            call_id=call_ac_id,
4519            call_state=CALL_STATE_ACTIVE,
4520            ads_active=[ads[0], ads[2]])
4521
4522    @TelephonyBaseTest.tel_test_wrap
4523    @test_tracker_info(uuid="f38c4cd5-53b4-43d0-a5fa-2a008a96cedc")
4524    def test_wcdma_mo_mt_add_swap_twice_drop_active(self):
4525        """Test swap feature in WCDMA call.
4526
4527        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
4528        PhoneC call PhoneA (WCDMA), accept on PhoneA.
4529        Swap active call on PhoneA.
4530        Swap active call on PhoneA.
4531        Hangup call from PhoneC, check if call continues between AB.
4532
4533        """
4534        ads = self.android_devices
4535
4536        call_ab_id, call_ac_id = self._test_wcdma_mo_mt_add_swap_x(2)
4537        if call_ab_id is None or call_ac_id is None:
4538            return False
4539
4540        return self._three_phone_hangup_call_verify_call_state(
4541            ad_hangup=ads[2],
4542            ad_verify=ads[0],
4543            call_id=call_ab_id,
4544            call_state=self._get_expected_call_state(ads[0]),
4545            ads_active=[ads[0], ads[1]])
4546
4547    @TelephonyBaseTest.tel_test_wrap
4548    @test_tracker_info(uuid="734689e8-2acd-405f-be93-db62e2606252")
4549    def test_wcdma_mo_mo_add_swap_once_drop_held(self):
4550        """Test swap feature in WCDMA call.
4551
4552        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
4553        PhoneA (WCDMA) call PhoneC, accept on PhoneC.
4554        Swap active call on PhoneA.
4555        Hangup call from PhoneC, check if call continues between AB.
4556
4557        """
4558        ads = self.android_devices
4559
4560        call_ab_id, call_ac_id = self._test_wcdma_mo_mo_add_swap_x(1)
4561        if call_ab_id is None or call_ac_id is None:
4562            return False
4563
4564        return self._three_phone_hangup_call_verify_call_state(
4565            ad_hangup=ads[2],
4566            ad_verify=ads[0],
4567            call_id=call_ab_id,
4568            call_state=CALL_STATE_ACTIVE,
4569            ads_active=[ads[0], ads[1]])
4570
4571    @TelephonyBaseTest.tel_test_wrap
4572    @test_tracker_info(uuid="126f294e-590a-4392-8fbd-1b826cd97214")
4573    def test_wcdma_mo_mo_add_swap_once_drop_active(self):
4574        """Test swap feature in WCDMA call.
4575
4576        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
4577        PhoneA (WCDMA) call PhoneC, accept on PhoneC.
4578        Swap active call on PhoneA.
4579        Hangup call from PhoneB, check if call continues between AC.
4580
4581        """
4582        ads = self.android_devices
4583
4584        call_ab_id, call_ac_id = self._test_wcdma_mo_mo_add_swap_x(1)
4585        if call_ab_id is None or call_ac_id is None:
4586            return False
4587
4588        return self._three_phone_hangup_call_verify_call_state(
4589            ad_hangup=ads[1],
4590            ad_verify=ads[0],
4591            call_id=call_ac_id,
4592            call_state=self._get_expected_call_state(ads[0]),
4593            ads_active=[ads[0], ads[2]])
4594
4595    @TelephonyBaseTest.tel_test_wrap
4596    @test_tracker_info(uuid="e5f36f28-ec2b-4958-8578-c0454ef2a8ad")
4597    def test_wcdma_mo_mt_add_swap_once_drop_held(self):
4598        """Test swap feature in WCDMA call.
4599
4600        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
4601        PhoneC call PhoneA (WCDMA), accept on PhoneA.
4602        Swap active call on PhoneA.
4603        Hangup call from PhoneC, check if call continues between AB.
4604
4605        """
4606        ads = self.android_devices
4607
4608        call_ab_id, call_ac_id = self._test_wcdma_mo_mt_add_swap_x(1)
4609        if call_ab_id is None or call_ac_id is None:
4610            return False
4611
4612        return self._three_phone_hangup_call_verify_call_state(
4613            ad_hangup=ads[2],
4614            ad_verify=ads[0],
4615            call_id=call_ab_id,
4616            call_state=CALL_STATE_ACTIVE,
4617            ads_active=[ads[0], ads[1]])
4618
4619    @TelephonyBaseTest.tel_test_wrap
4620    @test_tracker_info(uuid="a2252ebe-3ee2-4b9e-b76b-6be68d6b2719")
4621    def test_wcdma_mo_mt_add_swap_once_drop_active(self):
4622        """Test swap feature in WCDMA call.
4623
4624        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
4625        PhoneC call PhoneA (WCDMA), accept on PhoneA.
4626        Swap active call on PhoneA.
4627        Hangup call from PhoneB, check if call continues between AC.
4628
4629        """
4630        ads = self.android_devices
4631
4632        call_ab_id, call_ac_id = self._test_wcdma_mo_mt_add_swap_x(1)
4633        if call_ab_id is None or call_ac_id is None:
4634            return False
4635
4636        return self._three_phone_hangup_call_verify_call_state(
4637            ad_hangup=ads[1],
4638            ad_verify=ads[0],
4639            call_id=call_ac_id,
4640            call_state=self._get_expected_call_state(ads[0]),
4641            ads_active=[ads[0], ads[2]])
4642
4643    @TelephonyBaseTest.tel_test_wrap
4644    @test_tracker_info(uuid="cba48f87-4026-422d-a760-f913d2763ee9")
4645    def test_csfb_wcdma_mo_mo_add_swap_twice_drop_held(self):
4646        """Test swap feature in CSFB WCDMA call.
4647
4648        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
4649        PhoneA (CSFB WCDMA) call PhoneC, accept on PhoneC.
4650        Swap active call on PhoneA.
4651        Swap active call on PhoneA.
4652        Hangup call from PhoneB, check if call continues between AC.
4653
4654        """
4655        ads = self.android_devices
4656
4657        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mo_add_swap_x(2)
4658        if call_ab_id is None or call_ac_id is None:
4659            return False
4660
4661        return self._three_phone_hangup_call_verify_call_state(
4662            ad_hangup=ads[1],
4663            ad_verify=ads[0],
4664            call_id=call_ac_id,
4665            call_state=CALL_STATE_ACTIVE,
4666            ads_active=[ads[0], ads[2]])
4667
4668    @TelephonyBaseTest.tel_test_wrap
4669    @test_tracker_info(uuid="3e6bd083-ccae-4962-a3d7-4194ed685b64")
4670    def test_csfb_wcdma_mo_mo_add_swap_twice_drop_active(self):
4671        """Test swap feature in CSFB WCDMA call.
4672
4673        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
4674        PhoneA (CSFB WCDMA) call PhoneC, accept on PhoneC.
4675        Swap active call on PhoneA.
4676        Swap active call on PhoneA.
4677        Hangup call from PhoneC, check if call continues between AB.
4678
4679        """
4680        ads = self.android_devices
4681
4682        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mo_add_swap_x(2)
4683        if call_ab_id is None or call_ac_id is None:
4684            return False
4685
4686        return self._three_phone_hangup_call_verify_call_state(
4687            ad_hangup=ads[2],
4688            ad_verify=ads[0],
4689            call_id=call_ab_id,
4690            call_state=self._get_expected_call_state(ads[0]),
4691            ads_active=[ads[0], ads[1]])
4692
4693    @TelephonyBaseTest.tel_test_wrap
4694    @test_tracker_info(uuid="a1972846-0bca-4583-a966-11ebf0670c04")
4695    def test_csfb_wcdma_mo_mt_add_swap_twice_drop_held(self):
4696        """Test swap feature in CSFB WCDMA call.
4697
4698        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
4699        PhoneC call PhoneA (CSFB WCDMA), accept on PhoneA.
4700        Swap active call on PhoneA.
4701        Swap active call on PhoneA.
4702        Hangup call from PhoneB, check if call continues between AC.
4703
4704        """
4705        ads = self.android_devices
4706
4707        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mt_add_swap_x(2)
4708        if call_ab_id is None or call_ac_id is None:
4709            return False
4710
4711        return self._three_phone_hangup_call_verify_call_state(
4712            ad_hangup=ads[1],
4713            ad_verify=ads[0],
4714            call_id=call_ac_id,
4715            call_state=CALL_STATE_ACTIVE,
4716            ads_active=[ads[0], ads[2]])
4717
4718    @TelephonyBaseTest.tel_test_wrap
4719    @test_tracker_info(uuid="98609dfd-07fb-4414-bf6e-46144205fe70")
4720    def test_csfb_wcdma_mo_mt_add_swap_twice_drop_active(self):
4721        """Test swap feature in CSFB WCDMA call.
4722
4723        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
4724        PhoneC call PhoneA (CSFB WCDMA), accept on PhoneA.
4725        Swap active call on PhoneA.
4726        Swap active call on PhoneA.
4727        Hangup call from PhoneC, check if call continues between AB.
4728
4729        """
4730        ads = self.android_devices
4731
4732        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mt_add_swap_x(2)
4733        if call_ab_id is None or call_ac_id is None:
4734            return False
4735
4736        return self._three_phone_hangup_call_verify_call_state(
4737            ad_hangup=ads[2],
4738            ad_verify=ads[0],
4739            call_id=call_ab_id,
4740            call_state=self._get_expected_call_state(ads[0]),
4741            ads_active=[ads[0], ads[1]])
4742
4743    @TelephonyBaseTest.tel_test_wrap
4744    @test_tracker_info(uuid="0c4c9b0b-ef7a-4e3d-9d31-dde721444820")
4745    def test_csfb_wcdma_mo_mo_add_swap_once_drop_held(self):
4746        """Test swap feature in CSFB WCDMA call.
4747
4748        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
4749        PhoneA (CSFB WCDMA) call PhoneC, accept on PhoneC.
4750        Swap active call on PhoneA.
4751        Hangup call from PhoneC, check if call continues between AB.
4752
4753        """
4754        ads = self.android_devices
4755
4756        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mo_add_swap_x(1)
4757        if call_ab_id is None or call_ac_id is None:
4758            return False
4759
4760        return self._three_phone_hangup_call_verify_call_state(
4761            ad_hangup=ads[2],
4762            ad_verify=ads[0],
4763            call_id=call_ab_id,
4764            call_state=CALL_STATE_ACTIVE,
4765            ads_active=[ads[0], ads[1]])
4766
4767    @TelephonyBaseTest.tel_test_wrap
4768    @test_tracker_info(uuid="ee0f7772-9e58-4a00-8eb5-a03b3e5baf40")
4769    def test_csfb_wcdma_mo_mo_add_swap_once_drop_active(self):
4770        """Test swap feature in CSFB WCDMA call.
4771
4772        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
4773        PhoneA (CSFB WCDMA) call PhoneC, accept on PhoneC.
4774        Swap active call on PhoneA.
4775        Hangup call from PhoneB, check if call continues between AC.
4776
4777        """
4778        ads = self.android_devices
4779
4780        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mo_add_swap_x(1)
4781        if call_ab_id is None or call_ac_id is None:
4782            return False
4783
4784        return self._three_phone_hangup_call_verify_call_state(
4785            ad_hangup=ads[1],
4786            ad_verify=ads[0],
4787            call_id=call_ac_id,
4788            call_state=self._get_expected_call_state(ads[0]),
4789            ads_active=[ads[0], ads[2]])
4790
4791    @TelephonyBaseTest.tel_test_wrap
4792    @test_tracker_info(uuid="2f9e0120-c052-467b-be45-313ada433dce")
4793    def test_csfb_wcdma_mo_mt_add_swap_once_drop_held(self):
4794        """Test swap feature in CSFB WCDMA call.
4795
4796        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
4797        PhoneC call PhoneA (CSFB WCDMA), accept on PhoneA.
4798        Swap active call on PhoneA.
4799        Hangup call from PhoneC, check if call continues between AB.
4800
4801        """
4802        ads = self.android_devices
4803
4804        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mt_add_swap_x(1)
4805        if call_ab_id is None or call_ac_id is None:
4806            return False
4807
4808        return self._three_phone_hangup_call_verify_call_state(
4809            ad_hangup=ads[2],
4810            ad_verify=ads[0],
4811            call_id=call_ab_id,
4812            call_state=CALL_STATE_ACTIVE,
4813            ads_active=[ads[0], ads[1]])
4814
4815    @TelephonyBaseTest.tel_test_wrap
4816    @test_tracker_info(uuid="9110ad34-04e4-4d0f-9ac0-183ad9e6fa8a")
4817    def test_csfb_wcdma_mo_mt_add_swap_once_drop_active(self):
4818        """Test swap feature in CSFB WCDMA call.
4819
4820        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
4821        PhoneC call PhoneA (CSFB WCDMA), accept on PhoneA.
4822        Swap active call on PhoneA.
4823        Hangup call from PhoneB, check if call continues between AC.
4824
4825        """
4826        ads = self.android_devices
4827
4828        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mt_add_swap_x(1)
4829        if call_ab_id is None or call_ac_id is None:
4830            return False
4831
4832        return self._three_phone_hangup_call_verify_call_state(
4833            ad_hangup=ads[1],
4834            ad_verify=ads[0],
4835            call_id=call_ac_id,
4836            call_state=self._get_expected_call_state(ads[0]),
4837            ads_active=[ads[0], ads[2]])
4838
4839    @TelephonyBaseTest.tel_test_wrap
4840    @test_tracker_info(uuid="8cca4681-a5d4-472a-b0b5-46b79a6892a7")
4841    def test_volte_mo_mo_add_volte_swap_once_merge_drop_second_call_from_participant_no_cep(
4842            self):
4843        """ Test swap and merge features in VoLTE call. No CEP.
4844
4845        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4846        PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4847        Swap active call on PhoneA.
4848        On PhoneA, merge to conference call (No CEP).
4849        End call on PhoneC, verify call continues.
4850        End call on PhoneB, verify call end on PhoneA.
4851
4852        Returns:
4853            True if pass; False if fail.
4854        """
4855        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(1)
4856        if call_ab_id is None or call_ac_id is None:
4857            return False
4858
4859        return self._test_ims_conference_merge_drop_second_call_no_cep(
4860            call_ab_id, call_ac_id)
4861
4862    @TelephonyBaseTest.tel_test_wrap
4863    @test_tracker_info(uuid="9168698e-987a-42e3-8bc6-2a433fa4b5e3")
4864    def test_volte_mo_mo_add_volte_swap_once_merge_drop_second_call_from_participant_cep(
4865            self):
4866        """ Test swap and merge features in VoLTE call. CEP enabled.
4867
4868        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4869        2. PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4870        3. Swap active call on PhoneA.
4871        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
4872        5. End call on PhoneC, verify call continues.
4873        6. End call on PhoneB, verify call end on PhoneA.
4874
4875        Returns:
4876            True if pass; False if fail.
4877        """
4878        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(1)
4879        if call_ab_id is None or call_ac_id is None:
4880            return False
4881
4882        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
4883            call_ab_id, call_ac_id)
4884
4885    @TelephonyBaseTest.tel_test_wrap
4886    @test_tracker_info(uuid="397bfab8-6651-4438-a603-22657fd69b84")
4887    def test_volte_mo_mo_add_volte_swap_once_merge_drop_second_call_from_host_cep(
4888            self):
4889        """ Test swap and merge features in VoLTE call. CEP enabled.
4890
4891        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4892        2. PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4893        3. Swap active call on PhoneA.
4894        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
4895        5. On PhoneA disconnect call between A-C, verify call continues.
4896        6. On PhoneA disconnect call between A-B, verify call continues.
4897
4898        Returns:
4899            True if pass; False if fail.
4900        """
4901        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(1)
4902        if call_ab_id is None or call_ac_id is None:
4903            return False
4904
4905        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
4906            call_ab_id, call_ac_id)
4907
4908    @TelephonyBaseTest.tel_test_wrap
4909    @test_tracker_info(uuid="ba766c4c-690f-407b-87f8-05a91783e224")
4910    def test_volte_mo_mo_add_volte_swap_once_merge_drop_first_call_from_participant_cep(
4911            self):
4912        """ Test swap and merge features in VoLTE call. CEP enabled.
4913
4914        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4915        2. PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4916        3. Swap active call on PhoneA.
4917        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
4918        5. End call on PhoneB, verify call continues.
4919        6. End call on PhoneC, verify call end on PhoneA.
4920
4921        Returns:
4922            True if pass; False if fail.
4923        """
4924        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(1)
4925        if call_ab_id is None or call_ac_id is None:
4926            return False
4927
4928        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
4929            call_ab_id, call_ac_id)
4930
4931    @TelephonyBaseTest.tel_test_wrap
4932    @test_tracker_info(uuid="1e45c749-6d4c-4d30-b104-bfcc37e13f1d")
4933    def test_volte_mo_mo_add_volte_swap_once_merge_drop_first_call_from_host_cep(
4934            self):
4935        """ Test swap and merge features in VoLTE call. CEP enabled.
4936
4937        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4938        2. PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4939        3. Swap active call on PhoneA.
4940        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
4941        5. On PhoneA disconnect call between A-B, verify call continues.
4942        6. On PhoneA disconnect call between A-C, verify call continues.
4943
4944        Returns:
4945            True if pass; False if fail.
4946        """
4947        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(1)
4948        if call_ab_id is None or call_ac_id is None:
4949            return False
4950
4951        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
4952            call_ab_id, call_ac_id)
4953
4954    @TelephonyBaseTest.tel_test_wrap
4955    @test_tracker_info(uuid="d6648e19-8001-483a-a83b-a92b638a7650")
4956    def test_volte_mo_mo_add_volte_swap_twice_merge_drop_second_call_from_participant_no_cep(
4957            self):
4958        """ Test swap and merge features in VoLTE call. No CEP.
4959
4960        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4961        PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4962        Swap active call on PhoneA.
4963        Swap active call on PhoneA.
4964        On PhoneA, merge to conference call (No CEP).
4965        End call on PhoneC, verify call continues.
4966        End call on PhoneB, verify call end on PhoneA.
4967
4968        Returns:
4969            True if pass; False if fail.
4970        """
4971        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(2)
4972        if call_ab_id is None or call_ac_id is None:
4973            return False
4974
4975        return self._test_ims_conference_merge_drop_second_call_no_cep(
4976            call_ab_id, call_ac_id)
4977
4978    @TelephonyBaseTest.tel_test_wrap
4979    @test_tracker_info(uuid="18d3c304-ad04-409f-bfd4-fd3f01f9a51e")
4980    def test_volte_mo_mo_add_volte_swap_twice_merge_drop_second_call_from_participant_cep(
4981            self):
4982        """ Test swap and merge features in VoLTE call. CEP enabled.
4983
4984        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
4985        2. PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
4986        3. Swap active call on PhoneA.
4987        4. Swap active call on PhoneA.
4988        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
4989        6. End call on PhoneC, verify call continues.
4990        7. End call on PhoneB, verify call end on PhoneA.
4991
4992        Returns:
4993            True if pass; False if fail.
4994        """
4995        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(2)
4996        if call_ab_id is None or call_ac_id is None:
4997            return False
4998
4999        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5000            call_ab_id, call_ac_id)
5001
5002    @TelephonyBaseTest.tel_test_wrap
5003    @test_tracker_info(uuid="f1e71550-3a45-45e4-88e4-7e4da919d58e")
5004    def test_volte_mo_mo_add_volte_swap_twice_merge_drop_second_call_from_host_cep(
5005            self):
5006        """ Test swap and merge features in VoLTE call. CEP enabled.
5007
5008        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5009        2. PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
5010        3. Swap active call on PhoneA.
5011        4. Swap active call on PhoneA.
5012        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5013        6. On PhoneA disconnect call between A-C, verify call continues.
5014        7. On PhoneA disconnect call between A-B, verify call continues.
5015
5016        Returns:
5017            True if pass; False if fail.
5018        """
5019        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(2)
5020        if call_ab_id is None or call_ac_id is None:
5021            return False
5022
5023        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5024            call_ab_id, call_ac_id)
5025
5026    @TelephonyBaseTest.tel_test_wrap
5027    @test_tracker_info(uuid="60cc8bd1-4270-4b5c-9d29-9fa36a357503")
5028    def test_volte_mo_mo_add_volte_swap_twice_merge_drop_first_call_from_participant_cep(
5029            self):
5030        """ Test swap and merge features in VoLTE call. CEP enabled.
5031
5032        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5033        2. PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
5034        3. Swap active call on PhoneA.
5035        4. Swap active call on PhoneA.
5036        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5037        6. End call on PhoneB, verify call continues.
5038        7. End call on PhoneC, verify call end on PhoneA.
5039
5040        Returns:
5041            True if pass; False if fail.
5042        """
5043        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(2)
5044        if call_ab_id is None or call_ac_id is None:
5045            return False
5046
5047        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5048            call_ab_id, call_ac_id)
5049
5050    @TelephonyBaseTest.tel_test_wrap
5051    @test_tracker_info(uuid="7d81c5f8-5ee1-4ad2-b08e-3e4c97748a66")
5052    def test_volte_mo_mo_add_volte_swap_twice_merge_drop_first_call_from_host_cep(
5053            self):
5054        """ Test swap and merge features in VoLTE call. CEP enabled.
5055
5056        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5057        2. PhoneA (VoLTE) call PhoneC (VoLTE), accept on PhoneC.
5058        3. Swap active call on PhoneA.
5059        4. Swap active call on PhoneA.
5060        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5061        6. On PhoneA disconnect call between A-B, verify call continues.
5062        7. On PhoneA disconnect call between A-C, verify call continues.
5063
5064        Returns:
5065            True if pass; False if fail.
5066        """
5067        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_volte_swap_x(2)
5068        if call_ab_id is None or call_ac_id is None:
5069            return False
5070
5071        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
5072            call_ab_id, call_ac_id)
5073
5074    @TelephonyBaseTest.tel_test_wrap
5075    @test_tracker_info(uuid="5a887fde-8f9b-436b-ae8d-5ff97a884fc9")
5076    def test_volte_mo_mt_add_volte_swap_once_merge_drop_second_call_from_participant_no_cep(
5077            self):
5078        """ Test swap and merge features in VoLTE call. No CEP.
5079
5080        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5081        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5082        Swap active call on PhoneA.
5083        On PhoneA, merge to conference call (No CEP).
5084        End call on PhoneC, verify call continues.
5085        End call on PhoneB, verify call end on PhoneA.
5086
5087        Returns:
5088            True if pass; False if fail.
5089        """
5090        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(1)
5091        if call_ab_id is None or call_ac_id is None:
5092            return False
5093
5094        return self._test_ims_conference_merge_drop_second_call_no_cep(
5095            call_ab_id, call_ac_id)
5096
5097    @TelephonyBaseTest.tel_test_wrap
5098    @test_tracker_info(uuid="82574508-0d77-42cf-bf60-9fdddee24c42")
5099    def test_volte_mo_mt_add_volte_swap_once_merge_drop_second_call_from_participant_cep(
5100            self):
5101        """ Test swap and merge features in VoLTE call. CEP enabled.
5102
5103        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5104        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5105        3. Swap active call on PhoneA.
5106        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5107        5. End call on PhoneC, verify call continues.
5108        6. End call on PhoneB, verify call end on PhoneA.
5109
5110        Returns:
5111            True if pass; False if fail.
5112        """
5113        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(1)
5114        if call_ab_id is None or call_ac_id is None:
5115            return False
5116
5117        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5118            call_ab_id, call_ac_id)
5119
5120    @TelephonyBaseTest.tel_test_wrap
5121    @test_tracker_info(uuid="8f30c425-c689-43b8-84f3-f24f7d9216f6")
5122    def test_volte_mo_mt_add_volte_swap_once_merge_drop_second_call_from_host_cep(
5123            self):
5124        """ Test swap and merge features in VoLTE call. CEP enabled.
5125
5126        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5127        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5128        3. Swap active call on PhoneA.
5129        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5130        5. On PhoneA disconnect call between A-C, verify call continues.
5131        6. On PhoneA disconnect call between A-B, verify call continues.
5132
5133        Returns:
5134            True if pass; False if fail.
5135        """
5136        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(1)
5137        if call_ab_id is None or call_ac_id is None:
5138            return False
5139
5140        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5141            call_ab_id, call_ac_id)
5142
5143    @TelephonyBaseTest.tel_test_wrap
5144    @test_tracker_info(uuid="2a67845f-ccfd-4c06-aedc-9d6c1f022959")
5145    def test_volte_mo_mt_add_volte_swap_once_merge_drop_first_call_from_participant_cep(
5146            self):
5147        """ Test swap and merge features in VoLTE call. CEP enabled.
5148
5149        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5150        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5151        3. Swap active call on PhoneA.
5152        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5153        5. End call on PhoneB, verify call continues.
5154        6. End call on PhoneC, verify call end on PhoneA.
5155
5156        Returns:
5157            True if pass; False if fail.
5158        """
5159        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(1)
5160        if call_ab_id is None or call_ac_id is None:
5161            return False
5162
5163        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5164            call_ab_id, call_ac_id)
5165
5166    @TelephonyBaseTest.tel_test_wrap
5167    @test_tracker_info(uuid="0a5d1305-0890-40c4-8c7a-070876423e16")
5168    def test_volte_mo_mt_add_volte_swap_once_merge_drop_first_call_from_host_cep(
5169            self):
5170        """ Test swap and merge features in VoLTE call. CEP enabled.
5171
5172        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5173        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5174        3. Swap active call on PhoneA.
5175        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5176        5. On PhoneA disconnect call between A-B, verify call continues.
5177        6. On PhoneA disconnect call between A-C, verify call continues.
5178
5179        Returns:
5180            True if pass; False if fail.
5181        """
5182        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(1)
5183        if call_ab_id is None or call_ac_id is None:
5184            return False
5185
5186        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
5187            call_ab_id, call_ac_id)
5188
5189    @TelephonyBaseTest.tel_test_wrap
5190    @test_tracker_info(uuid="77bbb5ec-fd16-4031-b316-7f6563b79a3d")
5191    def test_volte_mo_mt_add_volte_swap_twice_merge_drop_second_call_from_participant_no_cep(
5192            self):
5193        """ Test swap and merge features in VoLTE call. No CEP.
5194
5195        PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5196        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5197        Swap active call on PhoneA.
5198        Swap active call on PhoneA.
5199        On PhoneA, merge to conference call (No CEP).
5200        End call on PhoneC, verify call continues.
5201        End call on PhoneB, verify call end on PhoneA.
5202
5203        Returns:
5204            True if pass; False if fail.
5205        """
5206        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(2)
5207        if call_ab_id is None or call_ac_id is None:
5208            return False
5209
5210        return self._test_ims_conference_merge_drop_second_call_no_cep(
5211            call_ab_id, call_ac_id)
5212
5213    @TelephonyBaseTest.tel_test_wrap
5214    @test_tracker_info(uuid="09cd41cd-821d-4d09-9b1e-7330dca77150")
5215    def test_volte_mo_mt_add_volte_swap_twice_merge_drop_second_call_from_participant_cep(
5216            self):
5217        """ Test swap and merge features in VoLTE call. CEP enabled.
5218
5219        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5220        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5221        3. Swap active call on PhoneA.
5222        4. Swap active call on PhoneA.
5223        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5224        6. End call on PhoneC, verify call continues.
5225        7. End call on PhoneB, verify call end on PhoneA.
5226
5227        Returns:
5228            True if pass; False if fail.
5229        """
5230        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(2)
5231        if call_ab_id is None or call_ac_id is None:
5232            return False
5233
5234        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5235            call_ab_id, call_ac_id)
5236
5237    @TelephonyBaseTest.tel_test_wrap
5238    @test_tracker_info(uuid="bdb2791e-92d0-44a3-aa8f-bd83e8159cb7")
5239    def test_volte_mo_mt_add_volte_swap_twice_merge_drop_second_call_from_host_cep(
5240            self):
5241        """ Test swap and merge features in VoLTE call. CEP enabled.
5242
5243        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5244        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5245        3. Swap active call on PhoneA.
5246        4. Swap active call on PhoneA.
5247        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5248        6. On PhoneA disconnect call between A-C, verify call continues.
5249        7. On PhoneA disconnect call between A-B, verify call continues.
5250
5251        Returns:
5252            True if pass; False if fail.
5253        """
5254        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(2)
5255        if call_ab_id is None or call_ac_id is None:
5256            return False
5257
5258        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5259            call_ab_id, call_ac_id)
5260
5261    @TelephonyBaseTest.tel_test_wrap
5262    @test_tracker_info(uuid="4f54e67d-7c7a-4952-ae09-f940094ec1ff")
5263    def test_volte_mo_mt_add_volte_swap_twice_merge_drop_first_call_from_participant_cep(
5264            self):
5265        """ Test swap and merge features in VoLTE call. CEP enabled.
5266
5267        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5268        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5269        3. Swap active call on PhoneA.
5270        4. Swap active call on PhoneA.
5271        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5272        6. End call on PhoneB, verify call continues.
5273        7. End call on PhoneC, verify call end on PhoneA.
5274
5275        Returns:
5276            True if pass; False if fail.
5277        """
5278        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(2)
5279        if call_ab_id is None or call_ac_id is None:
5280            return False
5281
5282        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5283            call_ab_id, call_ac_id)
5284
5285    @TelephonyBaseTest.tel_test_wrap
5286    @test_tracker_info(uuid="4ca28f9f-098f-4f71-b89c-9b2793aa2f5f")
5287    def test_volte_mo_mt_add_volte_swap_twice_merge_drop_first_call_from_host_cep(
5288            self):
5289        """ Test swap and merge features in VoLTE call. CEP enabled.
5290
5291        1. PhoneA (VoLTE) call PhoneB (VoLTE), accept on PhoneB.
5292        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5293        3. Swap active call on PhoneA.
5294        4. Swap active call on PhoneA.
5295        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5296        6. On PhoneA disconnect call between A-B, verify call continues.
5297        7. On PhoneA disconnect call between A-C, verify call continues.
5298
5299        Returns:
5300            True if pass; False if fail.
5301        """
5302        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_volte_swap_x(2)
5303        if call_ab_id is None or call_ac_id is None:
5304            return False
5305
5306        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
5307            call_ab_id, call_ac_id)
5308
5309    @TelephonyBaseTest.tel_test_wrap
5310    @test_tracker_info(uuid="f025c100-bb77-436e-b8ab-0c23a3d43318")
5311    def test_volte_mt_mt_add_volte_swap_once_merge_drop_second_call_from_participant_no_cep(
5312            self):
5313        """ Test swap and merge features in VoLTE call. No CEP.
5314
5315        PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5316        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5317        Swap active call on PhoneA.
5318        On PhoneA, merge to conference call (No CEP).
5319        End call on PhoneC, verify call continues.
5320        End call on PhoneB, verify call end on PhoneA.
5321
5322        Returns:
5323            True if pass; False if fail.
5324        """
5325        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(1)
5326        if call_ab_id is None or call_ac_id is None:
5327            return False
5328
5329        return self._test_ims_conference_merge_drop_second_call_no_cep(
5330            call_ab_id, call_ac_id)
5331
5332    @TelephonyBaseTest.tel_test_wrap
5333    @test_tracker_info(uuid="b6cd6b06-0984-4588-892e-939d332bf147")
5334    def test_volte_mt_mt_add_volte_swap_once_merge_drop_second_call_from_participant_cep(
5335            self):
5336        """ Test swap and merge features in VoLTE call. CEP enabled.
5337
5338        1. PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5339        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5340        3. Swap active call on PhoneA.
5341        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5342        5. End call on PhoneC, verify call continues.
5343        6. End call on PhoneB, verify call end on PhoneA.
5344
5345        Returns:
5346            True if pass; False if fail.
5347        """
5348        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(1)
5349        if call_ab_id is None or call_ac_id is None:
5350            return False
5351
5352        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5353            call_ab_id, call_ac_id)
5354
5355    @TelephonyBaseTest.tel_test_wrap
5356    @test_tracker_info(uuid="f7bda827-79bd-41cc-b720-140f49b381d9")
5357    def test_volte_mt_mt_add_volte_swap_once_merge_drop_second_call_from_host_cep(
5358            self):
5359        """ Test swap and merge features in VoLTE call. CEP enabled.
5360
5361        1. PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5362        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5363        3. Swap active call on PhoneA.
5364        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5365        5. On PhoneA disconnect call between A-C, verify call continues.
5366        6. On PhoneA disconnect call between A-B, verify call continues.
5367
5368        Returns:
5369            True if pass; False if fail.
5370        """
5371        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(1)
5372        if call_ab_id is None or call_ac_id is None:
5373            return False
5374
5375        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5376            call_ab_id, call_ac_id)
5377
5378    @TelephonyBaseTest.tel_test_wrap
5379    @test_tracker_info(uuid="de8aae4e-c8fc-4996-9d0b-56c3904c9bb4")
5380    def test_volte_mt_mt_add_volte_swap_once_merge_drop_first_call_from_participant_cep(
5381            self):
5382        """ Test swap and merge features in VoLTE call. CEP enabled.
5383
5384        1. PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5385        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5386        3. Swap active call on PhoneA.
5387        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5388        5. End call on PhoneB, verify call continues.
5389        6. End call on PhoneC, verify call end on PhoneA.
5390
5391        Returns:
5392            True if pass; False if fail.
5393        """
5394        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(1)
5395        if call_ab_id is None or call_ac_id is None:
5396            return False
5397
5398        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5399            call_ab_id, call_ac_id)
5400
5401    @TelephonyBaseTest.tel_test_wrap
5402    @test_tracker_info(uuid="35d72ebf-1a99-4571-8993-2899925f5489")
5403    def test_volte_mt_mt_add_volte_swap_once_merge_drop_first_call_from_host_cep(
5404            self):
5405        """ Test swap and merge features in VoLTE call. CEP enabled.
5406
5407        1. PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5408        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5409        3. Swap active call on PhoneA.
5410        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5411        5. On PhoneA disconnect call between A-B, verify call continues.
5412        6. On PhoneA disconnect call between A-C, verify call continues.
5413
5414        Returns:
5415            True if pass; False if fail.
5416        """
5417        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(1)
5418        if call_ab_id is None or call_ac_id is None:
5419            return False
5420
5421        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
5422            call_ab_id, call_ac_id)
5423
5424    @TelephonyBaseTest.tel_test_wrap
5425    @test_tracker_info(uuid="96c4c9d2-2e00-41a8-b4ce-3a9377262d36")
5426    def test_volte_mt_mt_add_volte_swap_twice_merge_drop_second_call_from_participant_no_cep(
5427            self):
5428        """ Test swap and merge features in VoLTE call. No CEP.
5429
5430        PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5431        PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5432        Swap active call on PhoneA.
5433        Swap active call on PhoneA.
5434        On PhoneA, merge to conference call (No CEP).
5435        End call on PhoneC, verify call continues.
5436        End call on PhoneB, verify call end on PhoneA.
5437
5438        Returns:
5439            True if pass; False if fail.
5440        """
5441        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(2)
5442        if call_ab_id is None or call_ac_id is None:
5443            return False
5444
5445        return self._test_ims_conference_merge_drop_second_call_no_cep(
5446            call_ab_id, call_ac_id)
5447
5448    @TelephonyBaseTest.tel_test_wrap
5449    @test_tracker_info(uuid="e1e0bb6c-c2d5-4566-80b1-46bfb0b95544")
5450    def test_volte_mt_mt_add_volte_swap_twice_merge_drop_second_call_from_participant_cep(
5451            self):
5452        """ Test swap and merge features in VoLTE call. CEP enabled.
5453
5454        1. PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5455        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5456        3. Swap active call on PhoneA.
5457        4. Swap active call on PhoneA.
5458        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5459        6. End call on PhoneC, verify call continues.
5460        7. End call on PhoneB, verify call end on PhoneA.
5461
5462        Returns:
5463            True if pass; False if fail.
5464        """
5465        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(2)
5466        if call_ab_id is None or call_ac_id is None:
5467            return False
5468
5469        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5470            call_ab_id, call_ac_id)
5471
5472    @TelephonyBaseTest.tel_test_wrap
5473    @test_tracker_info(uuid="764b5930-ba96-4901-b629-e753bc5c8d8e")
5474    def test_volte_mt_mt_add_volte_swap_twice_merge_drop_second_call_from_host_cep(
5475            self):
5476        """ Test swap and merge features in VoLTE call. CEP enabled.
5477
5478        1. PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5479        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5480        3. Swap active call on PhoneA.
5481        4. Swap active call on PhoneA.
5482        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5483        6. On PhoneA disconnect call between A-C, verify call continues.
5484        7. On PhoneA disconnect call between A-B, verify call continues.
5485
5486        Returns:
5487            True if pass; False if fail.
5488        """
5489        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(2)
5490        if call_ab_id is None or call_ac_id is None:
5491            return False
5492
5493        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5494            call_ab_id, call_ac_id)
5495
5496    @TelephonyBaseTest.tel_test_wrap
5497    @test_tracker_info(uuid="e03e52a1-7e7b-4a53-a496-3092a35153ae")
5498    def test_volte_mt_mt_add_volte_swap_twice_merge_drop_first_call_from_participant_cep(
5499            self):
5500        """ Test swap and merge features in VoLTE call. CEP enabled.
5501
5502        1. PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5503        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5504        3. Swap active call on PhoneA.
5505        4. Swap active call on PhoneA.
5506        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5507        6. End call on PhoneB, verify call continues.
5508        7. End call on PhoneC, verify call end on PhoneA.
5509
5510        Returns:
5511            True if pass; False if fail.
5512        """
5513        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(2)
5514        if call_ab_id is None or call_ac_id is None:
5515            return False
5516
5517        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5518            call_ab_id, call_ac_id)
5519
5520    @TelephonyBaseTest.tel_test_wrap
5521    @test_tracker_info(uuid="10a63692-56de-4563-b223-91e8814ddbc9")
5522    def test_volte_mt_mt_add_volte_swap_twice_merge_drop_first_call_from_host_cep(
5523            self):
5524        """ Test swap and merge features in VoLTE call. CEP enabled.
5525
5526        1. PhoneB (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5527        2. PhoneC (VoLTE) call PhoneA (VoLTE), accept on PhoneA.
5528        3. Swap active call on PhoneA.
5529        4. Swap active call on PhoneA.
5530        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5531        6. On PhoneA disconnect call between A-B, verify call continues.
5532        7. On PhoneA disconnect call between A-C, verify call continues.
5533
5534        Returns:
5535            True if pass; False if fail.
5536        """
5537        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_volte_swap_x(2)
5538        if call_ab_id is None or call_ac_id is None:
5539            return False
5540
5541        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
5542            call_ab_id, call_ac_id)
5543
5544    @TelephonyBaseTest.tel_test_wrap
5545    @test_tracker_info(uuid="cf4b1fe2-40d7-409b-a4ec-06bdb9a0d957")
5546    def test_volte_mo_mo_add_wcdma_swap_once_merge_drop_second_call_from_participant_no_cep(
5547            self):
5548        """ Test VoLTE Conference Call among three phones. No CEP.
5549
5550        PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5551        PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5552        Swap active call on PhoneA.
5553        On PhoneA, merge to conference call (No CEP).
5554        End call on PhoneC, verify call continues.
5555        End call on PhoneB, verify call end on PhoneA.
5556
5557        Returns:
5558            True if pass; False if fail.
5559        """
5560        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(1)
5561        if call_ab_id is None or call_ac_id is None:
5562            return False
5563
5564        return self._test_ims_conference_merge_drop_second_call_no_cep(
5565            call_ab_id, call_ac_id)
5566
5567    @TelephonyBaseTest.tel_test_wrap
5568    @test_tracker_info(uuid="fcc9dbd2-919d-4552-838c-2b672fb24b2b")
5569    def test_volte_mo_mo_add_wcdma_swap_once_merge_drop_second_call_from_participant_cep(
5570            self):
5571        """ Test swap and merge features in VoLTE call. CEP enabled.
5572
5573        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5574        2. PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5575        3. Swap active call on PhoneA.
5576        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5577        5. End call on PhoneC, verify call continues.
5578        6. End call on PhoneB, verify call end on PhoneA.
5579
5580        Returns:
5581            True if pass; False if fail.
5582        """
5583        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(1)
5584        if call_ab_id is None or call_ac_id is None:
5585            return False
5586
5587        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5588            call_ab_id, call_ac_id)
5589
5590    @TelephonyBaseTest.tel_test_wrap
5591    @test_tracker_info(uuid="37021d31-4242-46a2-adbf-eb7b987e4a43")
5592    def test_volte_mo_mo_add_wcdma_swap_once_merge_drop_second_call_from_host_cep(
5593            self):
5594        """ Test swap and merge features in VoLTE call. CEP enabled.
5595
5596        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5597        2. PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5598        3. Swap active call on PhoneA.
5599        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5600        5. On PhoneA disconnect call between A-C, verify call continues.
5601        6. On PhoneA disconnect call between A-B, verify call continues.
5602
5603        Returns:
5604            True if pass; False if fail.
5605        """
5606        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(1)
5607        if call_ab_id is None or call_ac_id is None:
5608            return False
5609
5610        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5611            call_ab_id, call_ac_id)
5612
5613    @TelephonyBaseTest.tel_test_wrap
5614    @test_tracker_info(uuid="cc362118-ccd1-4502-96f1-b3584b0c6bf3")
5615    def test_volte_mo_mo_add_wcdma_swap_once_merge_drop_first_call_from_participant_cep(
5616            self):
5617        """ Test swap and merge features in VoLTE call. CEP enabled.
5618
5619        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5620        2. PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5621        3. Swap active call on PhoneA.
5622        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5623        5. End call on PhoneB, verify call continues.
5624        6. End call on PhoneC, verify call end on PhoneA.
5625
5626        Returns:
5627            True if pass; False if fail.
5628        """
5629        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(1)
5630        if call_ab_id is None or call_ac_id is None:
5631            return False
5632
5633        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5634            call_ab_id, call_ac_id)
5635
5636    @TelephonyBaseTest.tel_test_wrap
5637    @test_tracker_info(uuid="be57dd4f-020f-4491-9cd0-2461dcd0806b")
5638    def test_volte_mo_mo_add_wcdma_swap_once_merge_drop_first_call_from_host_cep(
5639            self):
5640        """ Test swap and merge features in VoLTE call. CEP enabled.
5641
5642        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5643        2. PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5644        3. Swap active call on PhoneA.
5645        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5646        5. On PhoneA disconnect call between A-B, verify call continues.
5647        6. On PhoneA disconnect call between A-C, verify call continues.
5648
5649        Returns:
5650            True if pass; False if fail.
5651        """
5652        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(1)
5653        if call_ab_id is None or call_ac_id is None:
5654            return False
5655
5656        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
5657            call_ab_id, call_ac_id)
5658
5659    @TelephonyBaseTest.tel_test_wrap
5660    @test_tracker_info(uuid="058425ca-7b25-4a85-a5c7-bfdcd7920f15")
5661    def test_volte_mo_mo_add_wcdma_swap_twice_merge_drop_second_call_from_participant_no_cep(
5662            self):
5663        """ Test VoLTE Conference Call among three phones. No CEP.
5664
5665        PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5666        PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5667        Swap active call on PhoneA.
5668        Swap active call on PhoneA.
5669        On PhoneA, merge to conference call (No CEP).
5670        End call on PhoneC, verify call continues.
5671        End call on PhoneB, verify call end on PhoneA.
5672
5673        Returns:
5674            True if pass; False if fail.
5675        """
5676        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(2)
5677        if call_ab_id is None or call_ac_id is None:
5678            return False
5679
5680        return self._test_ims_conference_merge_drop_second_call_no_cep(
5681            call_ab_id, call_ac_id)
5682
5683    @TelephonyBaseTest.tel_test_wrap
5684    @test_tracker_info(uuid="5f691165-d099-419d-a50e-1547c8677f6b")
5685    def test_volte_mo_mo_add_wcdma_swap_twice_merge_drop_second_call_from_participant_cep(
5686            self):
5687        """ Test swap and merge features in VoLTE call. CEP enabled.
5688
5689        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5690        2. PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5691        3. Swap active call on PhoneA.
5692        4. Swap active call on PhoneA.
5693        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5694        6. End call on PhoneC, verify call continues.
5695        7. End call on PhoneB, verify call end on PhoneA.
5696
5697        Returns:
5698            True if pass; False if fail.
5699        """
5700        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(2)
5701        if call_ab_id is None or call_ac_id is None:
5702            return False
5703
5704        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5705            call_ab_id, call_ac_id)
5706
5707    @TelephonyBaseTest.tel_test_wrap
5708    @test_tracker_info(uuid="4fc8459e-23c6-408a-a061-e8f182086dd6")
5709    def test_volte_mo_mo_add_wcdma_swap_twice_merge_drop_second_call_from_host_cep(
5710            self):
5711        """ Test swap and merge features in VoLTE call. CEP enabled.
5712
5713        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5714        2. PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5715        3. Swap active call on PhoneA.
5716        4. Swap active call on PhoneA.
5717        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5718        6. On PhoneA disconnect call between A-C, verify call continues.
5719        7. On PhoneA disconnect call between A-B, verify call continues.
5720
5721        Returns:
5722            True if pass; False if fail.
5723        """
5724        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(2)
5725        if call_ab_id is None or call_ac_id is None:
5726            return False
5727
5728        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5729            call_ab_id, call_ac_id)
5730
5731    @TelephonyBaseTest.tel_test_wrap
5732    @test_tracker_info(uuid="3026802f-ddca-41e4-ae6f-db0c994613a7")
5733    def test_volte_mo_mo_add_wcdma_swap_twice_merge_drop_first_call_from_participant_cep(
5734            self):
5735        """ Test swap and merge features in VoLTE call. CEP enabled.
5736
5737        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5738        2. PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5739        3. Swap active call on PhoneA.
5740        4. Swap active call on PhoneA.
5741        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5742        6. End call on PhoneB, verify call continues.
5743        7. End call on PhoneC, verify call end on PhoneA.
5744
5745        Returns:
5746            True if pass; False if fail.
5747        """
5748        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(2)
5749        if call_ab_id is None or call_ac_id is None:
5750            return False
5751
5752        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5753            call_ab_id, call_ac_id)
5754
5755    @TelephonyBaseTest.tel_test_wrap
5756    @test_tracker_info(uuid="5ce98774-66b4-4710-b0da-e43bb7fa1c0f")
5757    def test_volte_mo_mo_add_wcdma_swap_twice_merge_drop_first_call_from_host_cep(
5758            self):
5759        """ Test swap and merge features in VoLTE call. CEP enabled.
5760
5761        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5762        2. PhoneA (VoLTE) call PhoneC (WCDMA), accept on PhoneC.
5763        3. Swap active call on PhoneA.
5764        4. Swap active call on PhoneA.
5765        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5766        6. On PhoneA disconnect call between A-B, verify call continues.
5767        7. On PhoneA disconnect call between A-C, verify call continues.
5768
5769        Returns:
5770            True if pass; False if fail.
5771        """
5772        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_wcdma_swap_x(2)
5773        if call_ab_id is None or call_ac_id is None:
5774            return False
5775
5776        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
5777            call_ab_id, call_ac_id)
5778
5779    @TelephonyBaseTest.tel_test_wrap
5780    @test_tracker_info(uuid="61766517-8762-4db3-9366-609c0f1a43b5")
5781    def test_volte_mo_mt_add_wcdma_swap_once_merge_drop_second_call_from_participant_no_cep(
5782            self):
5783        """ Test VoLTE Conference Call among three phones. No CEP.
5784
5785        PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5786        PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5787        Swap active call on PhoneA.
5788        On PhoneA, merge to conference call (No CEP).
5789        End call on PhoneC, verify call continues.
5790        End call on PhoneB, verify call end on PhoneA.
5791
5792        Returns:
5793            True if pass; False if fail.
5794        """
5795        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(1)
5796        if call_ab_id is None or call_ac_id is None:
5797            return False
5798
5799        return self._test_ims_conference_merge_drop_second_call_no_cep(
5800            call_ab_id, call_ac_id)
5801
5802    @TelephonyBaseTest.tel_test_wrap
5803    @test_tracker_info(uuid="9a809168-1ca4-4672-a5b3-934aeed0f06c")
5804    def test_volte_mo_mt_add_wcdma_swap_once_merge_drop_second_call_from_participant_cep(
5805            self):
5806        """ Test swap and merge features in VoLTE call. CEP enabled.
5807
5808        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5809        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5810        3. Swap active call on PhoneA.
5811        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5812        5. End call on PhoneC, verify call continues.
5813        6. End call on PhoneB, verify call end on PhoneA.
5814
5815        Returns:
5816            True if pass; False if fail.
5817        """
5818        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(1)
5819        if call_ab_id is None or call_ac_id is None:
5820            return False
5821
5822        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5823            call_ab_id, call_ac_id)
5824
5825    @TelephonyBaseTest.tel_test_wrap
5826    @test_tracker_info(uuid="4a146608-fbc7-4828-b2ee-77e08c19ddec")
5827    def test_volte_mo_mt_add_wcdma_swap_once_merge_drop_second_call_from_host_cep(
5828            self):
5829        """ Test swap and merge features in VoLTE call. CEP enabled.
5830
5831        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5832        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5833        3. Swap active call on PhoneA.
5834        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5835        5. On PhoneA disconnect call between A-C, verify call continues.
5836        6. On PhoneA disconnect call between A-B, verify call continues.
5837
5838        Returns:
5839            True if pass; False if fail.
5840        """
5841        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(1)
5842        if call_ab_id is None or call_ac_id is None:
5843            return False
5844
5845        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5846            call_ab_id, call_ac_id)
5847
5848    @TelephonyBaseTest.tel_test_wrap
5849    @test_tracker_info(uuid="4a3d4c0b-912a-4922-a4a3-f0bdf600c376")
5850    def test_volte_mo_mt_add_wcdma_swap_once_merge_drop_first_call_from_participant_cep(
5851            self):
5852        """ Test swap and merge features in VoLTE call. CEP enabled.
5853
5854        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5855        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5856        3. Swap active call on PhoneA.
5857        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5858        5. End call on PhoneB, verify call continues.
5859        6. End call on PhoneC, verify call end on PhoneA.
5860
5861        Returns:
5862            True if pass; False if fail.
5863        """
5864        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(1)
5865        if call_ab_id is None or call_ac_id is None:
5866            return False
5867
5868        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5869            call_ab_id, call_ac_id)
5870
5871    @TelephonyBaseTest.tel_test_wrap
5872    @test_tracker_info(uuid="614903e0-7091-4791-9af6-076799e43a97")
5873    def test_volte_mo_mt_add_wcdma_swap_once_merge_drop_first_call_from_host_cep(
5874            self):
5875        """ Test swap and merge features in VoLTE call. CEP enabled.
5876
5877        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5878        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5879        3. Swap active call on PhoneA.
5880        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
5881        5. On PhoneA disconnect call between A-B, verify call continues.
5882        6. On PhoneA disconnect call between A-C, verify call continues.
5883
5884        Returns:
5885            True if pass; False if fail.
5886        """
5887        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(1)
5888        if call_ab_id is None or call_ac_id is None:
5889            return False
5890
5891        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
5892            call_ab_id, call_ac_id)
5893
5894    @TelephonyBaseTest.tel_test_wrap
5895    @test_tracker_info(uuid="cea2ffc9-b8c8-46df-8f58-b606f3d352e2")
5896    def test_volte_mo_mt_add_wcdma_swap_twice_merge_drop_second_call_from_participant_no_cep(
5897            self):
5898        """ Test VoLTE Conference Call among three phones. No CEP.
5899
5900        PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5901        PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5902        Swap active call on PhoneA.
5903        Swap active call on PhoneA.
5904        On PhoneA, merge to conference call (No CEP).
5905        End call on PhoneC, verify call continues.
5906        End call on PhoneB, verify call end on PhoneA.
5907
5908        Returns:
5909            True if pass; False if fail.
5910        """
5911        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(2)
5912        if call_ab_id is None or call_ac_id is None:
5913            return False
5914
5915        return self._test_ims_conference_merge_drop_second_call_no_cep(
5916            call_ab_id, call_ac_id)
5917
5918    @TelephonyBaseTest.tel_test_wrap
5919    @test_tracker_info(uuid="4b0e040a-f199-4dc4-9f98-eb923f79814e")
5920    def test_volte_mo_mt_add_wcdma_swap_twice_merge_drop_second_call_from_participant_cep(
5921            self):
5922        """ Test swap and merge features in VoLTE call. CEP enabled.
5923
5924        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5925        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5926        3. Swap active call on PhoneA.
5927        4. Swap active call on PhoneA.
5928        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5929        6. End call on PhoneC, verify call continues.
5930        7. End call on PhoneB, verify call end on PhoneA.
5931
5932        Returns:
5933            True if pass; False if fail.
5934        """
5935        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(2)
5936        if call_ab_id is None or call_ac_id is None:
5937            return False
5938
5939        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
5940            call_ab_id, call_ac_id)
5941
5942    @TelephonyBaseTest.tel_test_wrap
5943    @test_tracker_info(uuid="56d45561-8e9b-40d4-bacc-a4c5ac4c2af0")
5944    def test_volte_mo_mt_add_wcdma_swap_twice_merge_drop_second_call_from_host_cep(
5945            self):
5946        """ Test swap and merge features in VoLTE call. CEP enabled.
5947
5948        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5949        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5950        3. Swap active call on PhoneA.
5951        4. Swap active call on PhoneA.
5952        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5953        6. On PhoneA disconnect call between A-C, verify call continues.
5954        7. On PhoneA disconnect call between A-B, verify call continues.
5955
5956        Returns:
5957            True if pass; False if fail.
5958        """
5959        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(2)
5960        if call_ab_id is None or call_ac_id is None:
5961            return False
5962
5963        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
5964            call_ab_id, call_ac_id)
5965
5966    @TelephonyBaseTest.tel_test_wrap
5967    @test_tracker_info(uuid="790ccd53-07e6-471b-a224-b7eeb3a83116")
5968    def test_volte_mo_mt_add_wcdma_swap_twice_merge_drop_first_call_from_participant_cep(
5969            self):
5970        """ Test swap and merge features in VoLTE call. CEP enabled.
5971
5972        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5973        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5974        3. Swap active call on PhoneA.
5975        4. Swap active call on PhoneA.
5976        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
5977        6. End call on PhoneB, verify call continues.
5978        7. End call on PhoneC, verify call end on PhoneA.
5979
5980        Returns:
5981            True if pass; False if fail.
5982        """
5983        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(2)
5984        if call_ab_id is None or call_ac_id is None:
5985            return False
5986
5987        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
5988            call_ab_id, call_ac_id)
5989
5990    @TelephonyBaseTest.tel_test_wrap
5991    @test_tracker_info(uuid="84083401-22af-4568-929a-4fd29e39db5c")
5992    def test_volte_mo_mt_add_wcdma_swap_twice_merge_drop_first_call_from_host_cep(
5993            self):
5994        """ Test swap and merge features in VoLTE call. CEP enabled.
5995
5996        1. PhoneA (VoLTE) call PhoneB (WCDMA), accept on PhoneB.
5997        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
5998        3. Swap active call on PhoneA.
5999        4. Swap active call on PhoneA.
6000        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6001        6. On PhoneA disconnect call between A-B, verify call continues.
6002        7. On PhoneA disconnect call between A-C, verify call continues.
6003
6004        Returns:
6005            True if pass; False if fail.
6006        """
6007        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_wcdma_swap_x(2)
6008        if call_ab_id is None or call_ac_id is None:
6009            return False
6010
6011        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6012            call_ab_id, call_ac_id)
6013
6014    @TelephonyBaseTest.tel_test_wrap
6015    @test_tracker_info(uuid="11a3d9cd-6f05-4638-9683-3ee475e41fdb")
6016    def test_volte_mt_mt_add_wcdma_swap_once_merge_drop_second_call_from_participant_no_cep(
6017            self):
6018        """ Test VoLTE Conference Call among three phones. No CEP.
6019
6020        PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6021        PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6022        Swap active call on PhoneA.
6023        On PhoneA, merge to conference call (No CEP).
6024        End call on PhoneC, verify call continues.
6025        End call on PhoneB, verify call end on PhoneA.
6026
6027        Returns:
6028            True if pass; False if fail.
6029        """
6030        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(1)
6031        if call_ab_id is None or call_ac_id is None:
6032            return False
6033
6034        return self._test_ims_conference_merge_drop_second_call_no_cep(
6035            call_ab_id, call_ac_id)
6036
6037    @TelephonyBaseTest.tel_test_wrap
6038    @test_tracker_info(uuid="ff03b64e-fccd-45e3-8245-f8c6cb328212")
6039    def test_volte_mt_mt_add_wcdma_swap_once_merge_drop_second_call_from_participant_cep(
6040            self):
6041        """ Test swap and merge features in VoLTE call. CEP enabled.
6042
6043        1. PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6044        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6045        3. Swap active call on PhoneA.
6046        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6047        5. End call on PhoneC, verify call continues.
6048        6. End call on PhoneB, verify call end on PhoneA.
6049
6050        Returns:
6051            True if pass; False if fail.
6052        """
6053        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(1)
6054        if call_ab_id is None or call_ac_id is None:
6055            return False
6056
6057        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
6058            call_ab_id, call_ac_id)
6059
6060    @TelephonyBaseTest.tel_test_wrap
6061    @test_tracker_info(uuid="c1822404-df8e-4b0c-b5d2-f70bb8c3119d")
6062    def test_volte_mt_mt_add_wcdma_swap_once_merge_drop_second_call_from_host_cep(
6063            self):
6064        """ Test swap and merge features in VoLTE call. CEP enabled.
6065
6066        1. PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6067        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6068        3. Swap active call on PhoneA.
6069        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6070        5. On PhoneA disconnect call between A-C, verify call continues.
6071        6. On PhoneA disconnect call between A-B, verify call continues.
6072
6073        Returns:
6074            True if pass; False if fail.
6075        """
6076        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(1)
6077        if call_ab_id is None or call_ac_id is None:
6078            return False
6079
6080        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
6081            call_ab_id, call_ac_id)
6082
6083    @TelephonyBaseTest.tel_test_wrap
6084    @test_tracker_info(uuid="3ebf7526-57f9-47f5-9196-b483384d6759")
6085    def test_volte_mt_mt_add_wcdma_swap_once_merge_drop_first_call_from_participant_cep(
6086            self):
6087        """ Test swap and merge features in VoLTE call. CEP enabled.
6088
6089        1. PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6090        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6091        3. Swap active call on PhoneA.
6092        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6093        5. End call on PhoneB, verify call continues.
6094        6. End call on PhoneC, verify call end on PhoneA.
6095
6096        Returns:
6097            True if pass; False if fail.
6098        """
6099        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(1)
6100        if call_ab_id is None or call_ac_id is None:
6101            return False
6102
6103        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
6104            call_ab_id, call_ac_id)
6105
6106    @TelephonyBaseTest.tel_test_wrap
6107    @test_tracker_info(uuid="8b8e664d-e872-493f-bff9-34a9500b2c25")
6108    def test_volte_mt_mt_add_wcdma_swap_once_merge_drop_first_call_from_host_cep(
6109            self):
6110        """ Test swap and merge features in VoLTE call. CEP enabled.
6111
6112        1. PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6113        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6114        3. Swap active call on PhoneA.
6115        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6116        5. On PhoneA disconnect call between A-B, verify call continues.
6117        6. On PhoneA disconnect call between A-C, verify call continues.
6118
6119        Returns:
6120            True if pass; False if fail.
6121        """
6122        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(1)
6123        if call_ab_id is None or call_ac_id is None:
6124            return False
6125
6126        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6127            call_ab_id, call_ac_id)
6128
6129    @TelephonyBaseTest.tel_test_wrap
6130    @test_tracker_info(uuid="aa4079dd-b5c6-41a3-ae0f-99f17fd0bae0")
6131    def test_volte_mt_mt_add_wcdma_swap_twice_merge_drop_second_call_from_participant_no_cep(
6132            self):
6133        """ Test VoLTE Conference Call among three phones. No CEP.
6134
6135        PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6136        PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6137        Swap active call on PhoneA.
6138        Swap active call on PhoneA.
6139        On PhoneA, merge to conference call (No CEP).
6140        End call on PhoneC, verify call continues.
6141        End call on PhoneB, verify call end on PhoneA.
6142
6143        Returns:
6144            True if pass; False if fail.
6145        """
6146        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(2)
6147        if call_ab_id is None or call_ac_id is None:
6148            return False
6149
6150        return self._test_ims_conference_merge_drop_second_call_no_cep(
6151            call_ab_id, call_ac_id)
6152
6153    @TelephonyBaseTest.tel_test_wrap
6154    @test_tracker_info(uuid="d9f32013-529c-46c3-9963-405ebbdbc537")
6155    def test_volte_mt_mt_add_wcdma_swap_twice_merge_drop_second_call_from_participant_cep(
6156            self):
6157        """ Test swap and merge features in VoLTE call. CEP enabled.
6158
6159        1. PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6160        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6161        3. Swap active call on PhoneA.
6162        4. Swap active call on PhoneA.
6163        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6164        6. End call on PhoneC, verify call continues.
6165        7. End call on PhoneB, verify call end on PhoneA.
6166
6167        Returns:
6168            True if pass; False if fail.
6169        """
6170        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(2)
6171        if call_ab_id is None or call_ac_id is None:
6172            return False
6173
6174        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
6175            call_ab_id, call_ac_id)
6176
6177    @TelephonyBaseTest.tel_test_wrap
6178    @test_tracker_info(uuid="93331954-4403-47ec-8af3-1a791ea2fc8b")
6179    def test_volte_mt_mt_add_wcdma_swap_twice_merge_drop_second_call_from_host_cep(
6180            self):
6181        """ Test swap and merge features in VoLTE call. CEP enabled.
6182
6183        1. PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6184        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6185        3. Swap active call on PhoneA.
6186        4. Swap active call on PhoneA.
6187        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6188        6. On PhoneA disconnect call between A-C, verify call continues.
6189        7. On PhoneA disconnect call between A-B, verify call continues.
6190
6191        Returns:
6192            True if pass; False if fail.
6193        """
6194        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(2)
6195        if call_ab_id is None or call_ac_id is None:
6196            return False
6197
6198        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
6199            call_ab_id, call_ac_id)
6200
6201    @TelephonyBaseTest.tel_test_wrap
6202    @test_tracker_info(uuid="c5a47e45-166b-46db-8b12-734d5d062509")
6203    def test_volte_mt_mt_add_wcdma_swap_twice_merge_drop_first_call_from_participant_cep(
6204            self):
6205        """ Test swap and merge features in VoLTE call. CEP enabled.
6206
6207        1. PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6208        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6209        3. Swap active call on PhoneA.
6210        4. Swap active call on PhoneA.
6211        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6212        6. End call on PhoneB, verify call continues.
6213        7. End call on PhoneC, verify call end on PhoneA.
6214
6215        Returns:
6216            True if pass; False if fail.
6217        """
6218        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(2)
6219        if call_ab_id is None or call_ac_id is None:
6220            return False
6221
6222        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
6223            call_ab_id, call_ac_id)
6224
6225    @TelephonyBaseTest.tel_test_wrap
6226    @test_tracker_info(uuid="05bff9cf-492d-4511-ac0e-b54f1d5fa454")
6227    def test_volte_mt_mt_add_wcdma_swap_twice_merge_drop_first_call_from_host_cep(
6228            self):
6229        """ Test swap and merge features in VoLTE call. CEP enabled.
6230
6231        1. PhoneB (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6232        2. PhoneC (WCDMA) call PhoneA (VoLTE), accept on PhoneA.
6233        3. Swap active call on PhoneA.
6234        4. Swap active call on PhoneA.
6235        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6236        6. On PhoneA disconnect call between A-B, verify call continues.
6237        7. On PhoneA disconnect call between A-C, verify call continues.
6238
6239        Returns:
6240            True if pass; False if fail.
6241        """
6242        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_wcdma_swap_x(2)
6243        if call_ab_id is None or call_ac_id is None:
6244            return False
6245
6246        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6247            call_ab_id, call_ac_id)
6248
6249    @TelephonyBaseTest.tel_test_wrap
6250    @test_tracker_info(uuid="f02add29-d61a-42f4-a1f0-271815e03c45")
6251    def test_volte_mo_mo_add_1x_swap_once_merge_drop_second_call_from_participant_no_cep(
6252            self):
6253        """ Test swap and merge features in VoLTE call. No CEP.
6254
6255        PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6256        PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6257        Swap active call on PhoneA.
6258        On PhoneA, merge to conference call (No CEP).
6259        End call on PhoneC, verify call continues.
6260        End call on PhoneB, verify call end on PhoneA.
6261
6262        Returns:
6263            True if pass; False if fail.
6264        """
6265        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(1)
6266        if call_ab_id is None or call_ac_id is None:
6267            return False
6268
6269        return self._test_ims_conference_merge_drop_second_call_no_cep(
6270            call_ab_id, call_ac_id)
6271
6272    @TelephonyBaseTest.tel_test_wrap
6273    @test_tracker_info(uuid="776821e8-259b-441e-a126-45a990e6e14d")
6274    def test_volte_mo_mo_add_1x_swap_once_merge_drop_second_call_from_participant_cep(
6275            self):
6276        """ Test swap and merge features in VoLTE call. CEP enabled.
6277
6278        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6279        2. PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6280        3. Swap active call on PhoneA.
6281        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6282        5. End call on PhoneC, verify call continues.
6283        6. End call on PhoneB, verify call end on PhoneA.
6284
6285        Returns:
6286            True if pass; False if fail.
6287        """
6288        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(1)
6289        if call_ab_id is None or call_ac_id is None:
6290            return False
6291
6292        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
6293            call_ab_id, call_ac_id)
6294
6295    @TelephonyBaseTest.tel_test_wrap
6296    @test_tracker_info(uuid="c542c999-d1c7-47f9-ba5c-50a582afa9e5")
6297    def test_volte_mo_mo_add_1x_swap_once_merge_drop_second_call_from_host_cep(
6298            self):
6299        """ Test swap and merge features in VoLTE call. CEP enabled.
6300
6301        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6302        2. PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6303        3. Swap active call on PhoneA.
6304        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6305        5. On PhoneA disconnect call between A-C, verify call continues.
6306        6. On PhoneA disconnect call between A-B, verify call continues.
6307
6308        Returns:
6309            True if pass; False if fail.
6310        """
6311        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(1)
6312        if call_ab_id is None or call_ac_id is None:
6313            return False
6314
6315        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
6316            call_ab_id, call_ac_id)
6317
6318    @TelephonyBaseTest.tel_test_wrap
6319    @test_tracker_info(uuid="d40c681a-1bce-4012-a30c-774e6698ba3a")
6320    def test_volte_mo_mo_add_1x_swap_once_merge_drop_first_call_from_participant_cep(
6321            self):
6322        """ Test swap and merge features in VoLTE call. CEP enabled.
6323
6324        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6325        2. PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6326        3. Swap active call on PhoneA.
6327        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6328        5. End call on PhoneB, verify call continues.
6329        6. End call on PhoneC, verify call end on PhoneA.
6330
6331        Returns:
6332            True if pass; False if fail.
6333        """
6334        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(1)
6335        if call_ab_id is None or call_ac_id is None:
6336            return False
6337
6338        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
6339            call_ab_id, call_ac_id)
6340
6341    @TelephonyBaseTest.tel_test_wrap
6342    @test_tracker_info(uuid="2805f272-5ada-4dd4-916a-36070905aec4")
6343    def test_volte_mo_mo_add_1x_swap_once_merge_drop_first_call_from_host_cep(
6344            self):
6345        """ Test swap and merge features in VoLTE call. CEP enabled.
6346
6347        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6348        2. PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6349        3. Swap active call on PhoneA.
6350        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6351        5. On PhoneA disconnect call between A-B, verify call continues.
6352        6. On PhoneA disconnect call between A-C, verify call continues.
6353
6354        Returns:
6355            True if pass; False if fail.
6356        """
6357        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(1)
6358        if call_ab_id is None or call_ac_id is None:
6359            return False
6360
6361        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6362            call_ab_id, call_ac_id)
6363
6364    @TelephonyBaseTest.tel_test_wrap
6365    @test_tracker_info(uuid="eb2d010c-ec32-409b-8272-5b950e0076f9")
6366    def test_volte_mo_mo_add_1x_swap_twice_merge_drop_second_call_from_participant_no_cep(
6367            self):
6368        """ Test swap and merge features in VoLTE call. No CEP.
6369
6370        PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6371        PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6372        Swap active call on PhoneA.
6373        Swap active call on PhoneA.
6374        On PhoneA, merge to conference call (No CEP).
6375        End call on PhoneC, verify call continues.
6376        End call on PhoneB, verify call end on PhoneA.
6377
6378        Returns:
6379            True if pass; False if fail.
6380        """
6381        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(2)
6382        if call_ab_id is None or call_ac_id is None:
6383            return False
6384
6385        return self._test_ims_conference_merge_drop_second_call_no_cep(
6386            call_ab_id, call_ac_id)
6387
6388    @TelephonyBaseTest.tel_test_wrap
6389    @test_tracker_info(uuid="03bb2fa3-8596-4c66-8adb-a3f9c9085420")
6390    def test_volte_mo_mo_add_1x_swap_twice_merge_drop_second_call_from_participant_cep(
6391            self):
6392        """ Test swap and merge features in VoLTE call. CEP enabled.
6393
6394        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6395        2. PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6396        3. Swap active call on PhoneA.
6397        4. Swap active call on PhoneA.
6398        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6399        6. End call on PhoneC, verify call continues.
6400        7. End call on PhoneB, verify call end on PhoneA.
6401
6402        Returns:
6403            True if pass; False if fail.
6404        """
6405        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(2)
6406        if call_ab_id is None or call_ac_id is None:
6407            return False
6408
6409        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
6410            call_ab_id, call_ac_id)
6411
6412    @TelephonyBaseTest.tel_test_wrap
6413    @test_tracker_info(uuid="df3bb0e7-7d72-487a-8cb8-fa75b86662ef")
6414    def test_volte_mo_mo_add_1x_swap_twice_merge_drop_second_call_from_host_cep(
6415            self):
6416        """ Test swap and merge features in VoLTE call. CEP enabled.
6417
6418        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6419        2. PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6420        3. Swap active call on PhoneA.
6421        4. Swap active call on PhoneA.
6422        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6423        6. On PhoneA disconnect call between A-C, verify call continues.
6424        7. On PhoneA disconnect call between A-B, verify call continues.
6425
6426        Returns:
6427            True if pass; False if fail.
6428        """
6429        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(2)
6430        if call_ab_id is None or call_ac_id is None:
6431            return False
6432
6433        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
6434            call_ab_id, call_ac_id)
6435
6436    @TelephonyBaseTest.tel_test_wrap
6437    @test_tracker_info(uuid="3893ce25-0fad-4eb8-af35-f9ebf47c0615")
6438    def test_volte_mo_mo_add_1x_swap_twice_merge_drop_first_call_from_participant_cep(
6439            self):
6440        """ Test swap and merge features in VoLTE call. CEP enabled.
6441
6442        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6443        2. PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6444        3. Swap active call on PhoneA.
6445        4. Swap active call on PhoneA.
6446        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6447        6. End call on PhoneB, verify call continues.
6448        7. End call on PhoneC, verify call end on PhoneA.
6449
6450        Returns:
6451            True if pass; False if fail.
6452        """
6453        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(2)
6454        if call_ab_id is None or call_ac_id is None:
6455            return False
6456
6457        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
6458            call_ab_id, call_ac_id)
6459
6460    @TelephonyBaseTest.tel_test_wrap
6461    @test_tracker_info(uuid="fcd0e656-4e98-40f2-b0ce-5ed90c7c4a81")
6462    def test_volte_mo_mo_add_1x_swap_twice_merge_drop_first_call_from_host_cep(
6463            self):
6464        """ Test swap and merge features in VoLTE call. CEP enabled.
6465
6466        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6467        2. PhoneA (VoLTE) call PhoneC (1x), accept on PhoneC.
6468        3. Swap active call on PhoneA.
6469        4. Swap active call on PhoneA.
6470        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6471        6. On PhoneA disconnect call between A-B, verify call continues.
6472        7. On PhoneA disconnect call between A-C, verify call continues.
6473
6474        Returns:
6475            True if pass; False if fail.
6476        """
6477        call_ab_id, call_ac_id = self._test_volte_mo_mo_add_1x_swap_x(2)
6478        if call_ab_id is None or call_ac_id is None:
6479            return False
6480
6481        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6482            call_ab_id, call_ac_id)
6483
6484    @TelephonyBaseTest.tel_test_wrap
6485    @test_tracker_info(uuid="009b5b45-d863-4891-8403-06656b542f3d")
6486    def test_volte_mo_mt_add_1x_swap_once_merge_drop_second_call_from_participant_no_cep(
6487            self):
6488        """ Test swap and merge features in VoLTE call. No CEP.
6489
6490        PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6491        PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6492        Swap active call on PhoneA.
6493        On PhoneA, merge to conference call (No CEP).
6494        End call on PhoneC, verify call continues.
6495        End call on PhoneB, verify call end on PhoneA.
6496
6497        Returns:
6498            True if pass; False if fail.
6499        """
6500        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(1)
6501        if call_ab_id is None or call_ac_id is None:
6502            return False
6503
6504        return self._test_ims_conference_merge_drop_second_call_no_cep(
6505            call_ab_id, call_ac_id)
6506
6507    @TelephonyBaseTest.tel_test_wrap
6508    @test_tracker_info(uuid="8cfe9354-70db-4dbb-8950-b02e65f9d6ba")
6509    def test_volte_mo_mt_add_1x_swap_once_merge_drop_second_call_from_participant_cep(
6510            self):
6511        """ Test swap and merge features in VoLTE call. CEP enabled.
6512
6513        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6514        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6515        3. Swap active call on PhoneA.
6516        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6517        5. End call on PhoneC, verify call continues.
6518        6. End call on PhoneB, verify call end on PhoneA.
6519
6520        Returns:
6521            True if pass; False if fail.
6522        """
6523        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(1)
6524        if call_ab_id is None or call_ac_id is None:
6525            return False
6526
6527        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
6528            call_ab_id, call_ac_id)
6529
6530    @TelephonyBaseTest.tel_test_wrap
6531    @test_tracker_info(uuid="d2502a9f-b35a-4390-b664-300b8310b55a")
6532    def test_volte_mo_mt_add_1x_swap_once_merge_drop_second_call_from_host_cep(
6533            self):
6534        """ Test swap and merge features in VoLTE call. CEP enabled.
6535
6536        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6537        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6538        3. Swap active call on PhoneA.
6539        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6540        5. On PhoneA disconnect call between A-C, verify call continues.
6541        6. On PhoneA disconnect call between A-B, verify call continues.
6542
6543        Returns:
6544            True if pass; False if fail.
6545        """
6546        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(1)
6547        if call_ab_id is None or call_ac_id is None:
6548            return False
6549
6550        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
6551            call_ab_id, call_ac_id)
6552
6553    @TelephonyBaseTest.tel_test_wrap
6554    @test_tracker_info(uuid="1fbddcd1-2268-4c2c-a737-c0bcbdc842cb")
6555    def test_volte_mo_mt_add_1x_swap_once_merge_drop_first_call_from_participant_cep(
6556            self):
6557        """ Test swap and merge features in VoLTE call. CEP enabled.
6558
6559        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6560        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6561        3. Swap active call on PhoneA.
6562        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6563        5. End call on PhoneB, verify call continues.
6564        6. End call on PhoneC, verify call end on PhoneA.
6565
6566        Returns:
6567            True if pass; False if fail.
6568        """
6569        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(1)
6570        if call_ab_id is None or call_ac_id is None:
6571            return False
6572
6573        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
6574            call_ab_id, call_ac_id)
6575
6576    @TelephonyBaseTest.tel_test_wrap
6577    @test_tracker_info(uuid="91a33ca8-508b-457e-a72f-6fabd00b2453")
6578    def test_volte_mo_mt_add_1x_swap_once_merge_drop_first_call_from_host_cep(
6579            self):
6580        """ Test swap and merge features in VoLTE call. CEP enabled.
6581
6582        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6583        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6584        3. Swap active call on PhoneA.
6585        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6586        5. On PhoneA disconnect call between A-B, verify call continues.
6587        6. On PhoneA disconnect call between A-C, verify call continues.
6588
6589        Returns:
6590            True if pass; False if fail.
6591        """
6592        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(1)
6593        if call_ab_id is None or call_ac_id is None:
6594            return False
6595
6596        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6597            call_ab_id, call_ac_id)
6598
6599    @TelephonyBaseTest.tel_test_wrap
6600    @test_tracker_info(uuid="3642995f-4de0-4327-86d6-c9e37416c7e7")
6601    def test_volte_mo_mt_add_1x_swap_twice_merge_drop_second_call_from_participant_no_cep(
6602            self):
6603        """ Test swap and merge features in VoLTE call. No CEP.
6604
6605        PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6606        PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6607        Swap active call on PhoneA.
6608        Swap active call on PhoneA.
6609        On PhoneA, merge to conference call (No CEP).
6610        End call on PhoneC, verify call continues.
6611        End call on PhoneB, verify call end on PhoneA.
6612
6613        Returns:
6614            True if pass; False if fail.
6615        """
6616        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(2)
6617        if call_ab_id is None or call_ac_id is None:
6618            return False
6619
6620        return self._test_ims_conference_merge_drop_second_call_no_cep(
6621            call_ab_id, call_ac_id)
6622
6623    @TelephonyBaseTest.tel_test_wrap
6624    @test_tracker_info(uuid="dd11f3af-09af-4fa3-9c90-8497bbd8687e")
6625    def test_volte_mo_mt_add_1x_swap_twice_merge_drop_second_call_from_participant_cep(
6626            self):
6627        """ Test swap and merge features in VoLTE call. CEP enabled.
6628
6629        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6630        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6631        3. Swap active call on PhoneA.
6632        4. Swap active call on PhoneA.
6633        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6634        6. End call on PhoneC, verify call continues.
6635        7. End call on PhoneB, verify call end on PhoneA.
6636
6637        Returns:
6638            True if pass; False if fail.
6639        """
6640        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(2)
6641        if call_ab_id is None or call_ac_id is None:
6642            return False
6643
6644        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
6645            call_ab_id, call_ac_id)
6646
6647    @TelephonyBaseTest.tel_test_wrap
6648    @test_tracker_info(uuid="172360a1-47b2-430a-8a9c-cae6d29813b6")
6649    def test_volte_mo_mt_add_1x_swap_twice_merge_drop_second_call_from_host_cep(
6650            self):
6651        """ Test swap and merge features in VoLTE call. CEP enabled.
6652
6653        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6654        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6655        3. Swap active call on PhoneA.
6656        4. Swap active call on PhoneA.
6657        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6658        6. On PhoneA disconnect call between A-C, verify call continues.
6659        7. On PhoneA disconnect call between A-B, verify call continues.
6660
6661        Returns:
6662            True if pass; False if fail.
6663        """
6664        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(2)
6665        if call_ab_id is None or call_ac_id is None:
6666            return False
6667
6668        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
6669            call_ab_id, call_ac_id)
6670
6671    @TelephonyBaseTest.tel_test_wrap
6672    @test_tracker_info(uuid="05d63cef-45b6-47df-8999-aac2e6ecfc9f")
6673    def test_volte_mo_mt_add_1x_swap_twice_merge_drop_first_call_from_participant_cep(
6674            self):
6675        """ Test swap and merge features in VoLTE call. CEP enabled.
6676
6677        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6678        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6679        3. Swap active call on PhoneA.
6680        4. Swap active call on PhoneA.
6681        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6682        6. End call on PhoneB, verify call continues.
6683        7. End call on PhoneC, verify call end on PhoneA.
6684
6685        Returns:
6686            True if pass; False if fail.
6687        """
6688        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(2)
6689        if call_ab_id is None or call_ac_id is None:
6690            return False
6691
6692        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
6693            call_ab_id, call_ac_id)
6694
6695    @TelephonyBaseTest.tel_test_wrap
6696    @test_tracker_info(uuid="e02dfbc5-ffa3-4bff-a45e-1b3f4147005e")
6697    def test_volte_mo_mt_add_1x_swap_twice_merge_drop_first_call_from_host_cep(
6698            self):
6699        """ Test swap and merge features in VoLTE call. CEP enabled.
6700
6701        1. PhoneA (VoLTE) call PhoneB (1x), accept on PhoneB.
6702        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6703        3. Swap active call on PhoneA.
6704        4. Swap active call on PhoneA.
6705        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6706        6. On PhoneA disconnect call between A-B, verify call continues.
6707        7. On PhoneA disconnect call between A-C, verify call continues.
6708
6709        Returns:
6710            True if pass; False if fail.
6711        """
6712        call_ab_id, call_ac_id = self._test_volte_mo_mt_add_1x_swap_x(2)
6713        if call_ab_id is None or call_ac_id is None:
6714            return False
6715
6716        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6717            call_ab_id, call_ac_id)
6718
6719    @TelephonyBaseTest.tel_test_wrap
6720    @test_tracker_info(uuid="55bb85a0-bfbd-4b97-bd94-871e82276875")
6721    def test_volte_mt_mt_add_1x_swap_once_merge_drop_second_call_from_participant_no_cep(
6722            self):
6723        """ Test swap and merge features in VoLTE call. No CEP.
6724
6725        PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6726        PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6727        Swap active call on PhoneA.
6728        On PhoneA, merge to conference call (No CEP).
6729        End call on PhoneC, verify call continues.
6730        End call on PhoneB, verify call end on PhoneA.
6731
6732        Returns:
6733            True if pass; False if fail.
6734        """
6735        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(1)
6736        if call_ab_id is None or call_ac_id is None:
6737            return False
6738
6739        return self._test_ims_conference_merge_drop_second_call_no_cep(
6740            call_ab_id, call_ac_id)
6741
6742    @TelephonyBaseTest.tel_test_wrap
6743    @test_tracker_info(uuid="31e71818-3522-4e04-8f26-ad26683f16d1")
6744    def test_volte_mt_mt_add_1x_swap_once_merge_drop_second_call_from_participant_cep(
6745            self):
6746        """ Test swap and merge features in VoLTE call. CEP enabled.
6747
6748        1. PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6749        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6750        3. Swap active call on PhoneA.
6751        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6752        5. End call on PhoneC, verify call continues.
6753        6. End call on PhoneB, verify call end on PhoneA.
6754
6755        Returns:
6756            True if pass; False if fail.
6757        """
6758        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(1)
6759        if call_ab_id is None or call_ac_id is None:
6760            return False
6761
6762        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
6763            call_ab_id, call_ac_id)
6764
6765    @TelephonyBaseTest.tel_test_wrap
6766    @test_tracker_info(uuid="0b51183d-3f92-4fe8-9487-64a72696a838")
6767    def test_volte_mt_mt_add_1x_swap_once_merge_drop_second_call_from_host_cep(
6768            self):
6769        """ Test swap and merge features in VoLTE call. CEP enabled.
6770
6771        1. PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6772        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6773        3. Swap active call on PhoneA.
6774        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6775        5. On PhoneA disconnect call between A-C, verify call continues.
6776        6. On PhoneA disconnect call between A-B, verify call continues.
6777
6778        Returns:
6779            True if pass; False if fail.
6780        """
6781        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(1)
6782        if call_ab_id is None or call_ac_id is None:
6783            return False
6784
6785        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
6786            call_ab_id, call_ac_id)
6787
6788    @TelephonyBaseTest.tel_test_wrap
6789    @test_tracker_info(uuid="2aee2db7-fcd0-4b0a-aaa0-b946a14e91bd")
6790    def test_volte_mt_mt_add_1x_swap_once_merge_drop_first_call_from_participant_cep(
6791            self):
6792        """ Test swap and merge features in VoLTE call. CEP enabled.
6793
6794        1. PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6795        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6796        3. Swap active call on PhoneA.
6797        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6798        5. End call on PhoneB, verify call continues.
6799        6. End call on PhoneC, verify call end on PhoneA.
6800
6801        Returns:
6802            True if pass; False if fail.
6803        """
6804        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(1)
6805        if call_ab_id is None or call_ac_id is None:
6806            return False
6807
6808        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
6809            call_ab_id, call_ac_id)
6810
6811    @TelephonyBaseTest.tel_test_wrap
6812    @test_tracker_info(uuid="d78bbe8e-6d39-4843-9eaa-47f06b6e9a95")
6813    def test_volte_mt_mt_add_1x_swap_once_merge_drop_first_call_from_host_cep(
6814            self):
6815        """ Test swap and merge features in VoLTE call. CEP enabled.
6816
6817        1. PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6818        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6819        3. Swap active call on PhoneA.
6820        4. On PhoneA, merge to conference call (VoLTE CEP conference call).
6821        5. On PhoneA disconnect call between A-B, verify call continues.
6822        6. On PhoneA disconnect call between A-C, verify call continues.
6823
6824        Returns:
6825            True if pass; False if fail.
6826        """
6827        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(1)
6828        if call_ab_id is None or call_ac_id is None:
6829            return False
6830
6831        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6832            call_ab_id, call_ac_id)
6833
6834    @TelephonyBaseTest.tel_test_wrap
6835    @test_tracker_info(uuid="bbf4dcd8-3e1d-4ad0-a4fd-bf875e409f15")
6836    def test_volte_mt_mt_add_1x_swap_twice_merge_drop_second_call_from_participant_no_cep(
6837            self):
6838        """ Test swap and merge features in VoLTE call. No CEP.
6839
6840        PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6841        PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6842        Swap active call on PhoneA.
6843        Swap active call on PhoneA.
6844        On PhoneA, merge to conference call (No CEP).
6845        End call on PhoneC, verify call continues.
6846        End call on PhoneB, verify call end on PhoneA.
6847
6848        Returns:
6849            True if pass; False if fail.
6850        """
6851        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(2)
6852        if call_ab_id is None or call_ac_id is None:
6853            return False
6854
6855        return self._test_ims_conference_merge_drop_second_call_no_cep(
6856            call_ab_id, call_ac_id)
6857
6858    @TelephonyBaseTest.tel_test_wrap
6859    @test_tracker_info(uuid="c222e199-497b-4c34-886d-b35592ccd3b2")
6860    def test_volte_mt_mt_add_1x_swap_twice_merge_drop_second_call_from_participant_cep(
6861            self):
6862        """ Test swap and merge features in VoLTE call. CEP enabled.
6863
6864        1. PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6865        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6866        3. Swap active call on PhoneA.
6867        4. Swap active call on PhoneA.
6868        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6869        6. End call on PhoneC, verify call continues.
6870        7. End call on PhoneB, verify call end on PhoneA.
6871
6872        Returns:
6873            True if pass; False if fail.
6874        """
6875        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(2)
6876        if call_ab_id is None or call_ac_id is None:
6877            return False
6878
6879        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
6880            call_ab_id, call_ac_id)
6881
6882    @TelephonyBaseTest.tel_test_wrap
6883    @test_tracker_info(uuid="d916eef5-b942-48fe-9c63-be7e283b197d")
6884    def test_volte_mt_mt_add_1x_swap_twice_merge_drop_second_call_from_host_cep(
6885            self):
6886        """ Test swap and merge features in VoLTE call. CEP enabled.
6887
6888        1. PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6889        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6890        3. Swap active call on PhoneA.
6891        4. Swap active call on PhoneA.
6892        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6893        6. On PhoneA disconnect call between A-C, verify call continues.
6894        7. On PhoneA disconnect call between A-B, verify call continues.
6895
6896        Returns:
6897            True if pass; False if fail.
6898        """
6899        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(2)
6900        if call_ab_id is None or call_ac_id is None:
6901            return False
6902
6903        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
6904            call_ab_id, call_ac_id)
6905
6906    @TelephonyBaseTest.tel_test_wrap
6907    @test_tracker_info(uuid="e34acc9d-4389-4bc3-b34d-6b7e8173cadf")
6908    def test_volte_mt_mt_add_1x_swap_twice_merge_drop_first_call_from_participant_cep(
6909            self):
6910        """ Test swap and merge features in VoLTE call. CEP enabled.
6911
6912        1. PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6913        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6914        3. Swap active call on PhoneA.
6915        4. Swap active call on PhoneA.
6916        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6917        6. End call on PhoneB, verify call continues.
6918        7. End call on PhoneC, verify call end on PhoneA.
6919
6920        Returns:
6921            True if pass; False if fail.
6922        """
6923        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(2)
6924        if call_ab_id is None or call_ac_id is None:
6925            return False
6926
6927        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
6928            call_ab_id, call_ac_id)
6929
6930    @TelephonyBaseTest.tel_test_wrap
6931    @test_tracker_info(uuid="31ddc496-03a5-407f-b925-8cea04dbdae0")
6932    def test_volte_mt_mt_add_1x_swap_twice_merge_drop_first_call_from_host_cep(
6933            self):
6934        """ Test swap and merge features in VoLTE call. CEP enabled.
6935
6936        1. PhoneB (1x) call PhoneA (VoLTE), accept on PhoneA.
6937        2. PhoneC (1x) call PhoneA (VoLTE), accept on PhoneA.
6938        3. Swap active call on PhoneA.
6939        4. Swap active call on PhoneA.
6940        5. On PhoneA, merge to conference call (VoLTE CEP conference call).
6941        6. On PhoneA disconnect call between A-B, verify call continues.
6942        7. On PhoneA disconnect call between A-C, verify call continues.
6943
6944        Returns:
6945            True if pass; False if fail.
6946        """
6947        call_ab_id, call_ac_id = self._test_volte_mt_mt_add_1x_swap_x(2)
6948        if call_ab_id is None or call_ac_id is None:
6949            return False
6950
6951        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
6952            call_ab_id, call_ac_id)
6953
6954    @TelephonyBaseTest.tel_test_wrap
6955    @test_tracker_info(uuid="35b6fa0f-780f-4436-93a0-70f9b79bc71a")
6956    def test_csfb_wcdma_mo_mo_add_swap_once_merge_drop(self):
6957        """Test swap and merge feature in CSFB WCDMA call.
6958
6959        PhoneA (CSFB_WCDMA) call PhoneB, accept on PhoneB.
6960        PhoneA (CSFB_WCDMA) call PhoneC, accept on PhoneC.
6961        Swap active call on PhoneA.
6962        Merge calls to conference on PhoneA.
6963        Hangup on PhoneC, check call continues between AB.
6964        Hangup on PhoneB, check A ends.
6965
6966        """
6967        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mo_add_swap_x(1)
6968        if call_ab_id is None or call_ac_id is None:
6969            return False
6970
6971        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
6972
6973    @TelephonyBaseTest.tel_test_wrap
6974    @test_tracker_info(uuid="9102ce81-0c17-4c7a-93df-f240245a07c5")
6975    def test_csfb_wcdma_mo_mo_add_swap_twice_merge_drop(self):
6976        """Test swap and merge feature in CSFB WCDMA call.
6977
6978        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
6979        PhoneA (CSFB WCDMA) call PhoneC, accept on PhoneC.
6980        Swap active call on PhoneA.
6981        Swap active call on PhoneA.
6982        Merge calls to conference on PhoneA.
6983        Hangup on PhoneC, check call continues between AB.
6984        Hangup on PhoneB, check A ends.
6985
6986        """
6987        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mo_add_swap_x(2)
6988        if call_ab_id is None or call_ac_id is None:
6989            return False
6990
6991        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
6992
6993    @TelephonyBaseTest.tel_test_wrap
6994    @test_tracker_info(uuid="b85ff5a7-f512-4585-a6b1-d92c9e7c25de")
6995    def test_csfb_wcdma_mo_mt_add_swap_once_merge_drop(self):
6996        """Test swap and merge feature in CSFB WCDMA call.
6997
6998        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
6999        PhoneC call PhoneA (CSFB WCDMA), accept on PhoneA.
7000        Swap active call on PhoneA.
7001        Merge calls to conference on PhoneA.
7002        Hangup on PhoneC, check call continues between AB.
7003        Hangup on PhoneB, check A ends.
7004
7005        """
7006        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mt_add_swap_x(1)
7007        if call_ab_id is None or call_ac_id is None:
7008            return False
7009
7010        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
7011
7012    @TelephonyBaseTest.tel_test_wrap
7013    @test_tracker_info(uuid="83a74ce1-9028-4e67-a417-599616ab0b2c")
7014    def test_csfb_wcdma_mo_mt_add_swap_twice_merge_drop(self):
7015        """Test swap and merge feature in CSFB WCDMA call.
7016
7017        PhoneA (CSFB WCDMA) call PhoneB, accept on PhoneB.
7018        PhoneC call PhoneA (CSFB WCDMA), accept on PhoneA.
7019        Swap active call on PhoneA.
7020        Swap active call on PhoneA.
7021        Merge calls to conference on PhoneA.
7022        Hangup on PhoneC, check call continues between AB.
7023        Hangup on PhoneB, check A ends.
7024
7025        """
7026        call_ab_id, call_ac_id = self._test_csfb_wcdma_mo_mt_add_swap_x(2)
7027        if call_ab_id is None or call_ac_id is None:
7028            return False
7029
7030        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
7031
7032    @TelephonyBaseTest.tel_test_wrap
7033    @test_tracker_info(uuid="835fe3d6-4e44-451c-9c5f-277b8842bf10")
7034    def test_wcdma_mo_mo_add_swap_once_merge_drop(self):
7035        """Test swap and merge feature in WCDMA call.
7036
7037        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
7038        PhoneA (WCDMA) call PhoneC, accept on PhoneC.
7039        Swap active call on PhoneA.
7040        Merge calls to conference on PhoneA.
7041        Hangup on PhoneC, check call continues between AB.
7042        Hangup on PhoneB, check A ends.
7043
7044        """
7045        call_ab_id, call_ac_id = self._test_wcdma_mo_mo_add_swap_x(1)
7046        if call_ab_id is None or call_ac_id is None:
7047            return False
7048
7049        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
7050
7051    @TelephonyBaseTest.tel_test_wrap
7052    @test_tracker_info(uuid="627eb239-c6f6-47dc-b4cf-8d1796599417")
7053    def test_wcdma_mo_mo_add_swap_twice_merge_drop(self):
7054        """Test swap and merge feature in WCDMA call.
7055
7056        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
7057        PhoneA (WCDMA) call PhoneC, accept on PhoneC.
7058        Swap active call on PhoneA.
7059        Swap active call on PhoneA.
7060        Merge calls to conference on PhoneA.
7061        Hangup on PhoneC, check call continues between AB.
7062        Hangup on PhoneB, check A ends.
7063
7064        """
7065        call_ab_id, call_ac_id = self._test_wcdma_mo_mo_add_swap_x(2)
7066        if call_ab_id is None or call_ac_id is None:
7067            return False
7068
7069        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
7070
7071    @TelephonyBaseTest.tel_test_wrap
7072    @test_tracker_info(uuid="571efb21-0ed5-4871-a7d8-f86d94e0ef25")
7073    def test_wcdma_mo_mt_add_swap_once_merge_drop(self):
7074        """Test swap and merge feature in WCDMA call.
7075
7076        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
7077        PhoneC call PhoneA (WCDMA), accept on PhoneA.
7078        Swap active call on PhoneA.
7079        Merge calls to conference on PhoneA.
7080        Hangup on PhoneC, check call continues between AB.
7081        Hangup on PhoneB, check A ends.
7082
7083        """
7084        call_ab_id, call_ac_id = self._test_wcdma_mo_mt_add_swap_x(1)
7085        if call_ab_id is None or call_ac_id is None:
7086            return False
7087
7088        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
7089
7090    @TelephonyBaseTest.tel_test_wrap
7091    @test_tracker_info(uuid="c981a90a-19b8-4582-a07c-1e9447fbe9ae")
7092    def test_wcdma_mo_mt_add_swap_twice_merge_drop(self):
7093        """Test swap and merge feature in WCDMA call.
7094
7095        PhoneA (WCDMA) call PhoneB, accept on PhoneB.
7096        PhoneC call PhoneA (WCDMA), accept on PhoneA.
7097        Swap active call on PhoneA.
7098        Swap active call on PhoneA.
7099        Merge calls to conference on PhoneA.
7100        Hangup on PhoneC, check call continues between AB.
7101        Hangup on PhoneB, check A ends.
7102
7103        """
7104        call_ab_id, call_ac_id = self._test_wcdma_mo_mt_add_swap_x(2)
7105        if call_ab_id is None or call_ac_id is None:
7106            return False
7107
7108        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
7109
7110    @TelephonyBaseTest.tel_test_wrap
7111    @test_tracker_info(uuid="23843881-320b-4071-bbc8-93cd1ee08408")
7112    def test_wcdma_mt_mt_add_swap_once_merge_drop(self):
7113        """Test swap and merge feature in WCDMA call.
7114
7115        PhoneB call PhoneA (WCDMA), accept on PhoneA.
7116        PhoneC call PhoneA (WCDMA), accept on PhoneA.
7117        Swap active call on PhoneA.
7118        Merge calls to conference on PhoneA.
7119        Hangup on PhoneC, check call continues between AB.
7120        Hangup on PhoneB, check A ends.
7121
7122        """
7123        call_ab_id, call_ac_id = self._test_wcdma_mt_mt_add_swap_x(1)
7124        if call_ab_id is None or call_ac_id is None:
7125            return False
7126
7127        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
7128
7129    @TelephonyBaseTest.tel_test_wrap
7130    @test_tracker_info(uuid="e447ec45-016c-4723-a954-4bde2e342cb2")
7131    def test_wcdma_mt_mt_add_swap_twice_merge_drop(self):
7132        """Test swap and merge feature in WCDMA call.
7133
7134        PhoneB call PhoneA (WCDMA), accept on PhoneA.
7135        PhoneC call PhoneA (WCDMA), accept on PhoneA.
7136        Swap active call on PhoneA.
7137        Swap active call on PhoneA.
7138        Merge calls to conference on PhoneA.
7139        Hangup on PhoneC, check call continues between AB.
7140        Hangup on PhoneB, check A ends.
7141
7142        """
7143        call_ab_id, call_ac_id = self._test_wcdma_mt_mt_add_swap_x(2)
7144        if call_ab_id is None or call_ac_id is None:
7145            return False
7146
7147        return self._test_wcdma_conference_merge_drop(call_ab_id, call_ac_id)
7148
7149    @TelephonyBaseTest.tel_test_wrap
7150    @test_tracker_info(uuid="876dc6b2-75c2-4fb5-92a0-35d3d29fbd42")
7151    def test_wcdma_mt_mt_add_merge_unmerge_swap_drop(self):
7152        """Test Conference Call Unmerge operation.
7153
7154        Phones A, B, C are in WCDMA Conference call (MT-MT-Merge)
7155        Unmerge call with B on PhoneA
7156        Check the number of Call Ids to be 2 on PhoneA
7157        Check if call AB is active since 'B' was unmerged
7158        Swap call to C
7159        Check if call AC is active
7160        Tear down calls
7161        All Phones should be in Idle
7162
7163        """
7164        call_ab_id, call_ac_id = self._test_wcdma_mt_mt_add_swap_x(0)
7165        if call_ab_id is None or call_ac_id is None:
7166            self.log.error("Either of Call AB ID or Call AC ID is None.")
7167            return False
7168
7169        ads = self.android_devices
7170
7171        self.log.info("Step4: Merge to Conf Call and verify Conf Call.")
7172        ads[0].droid.telecomCallJoinCallsInConf(call_ab_id, call_ac_id)
7173        time.sleep(WAIT_TIME_IN_CALL)
7174        calls = ads[0].droid.telecomCallGetCallIds()
7175        ads[0].log.info("Calls in PhoneA %s", calls)
7176        if num_active_calls(self.log, ads[0]) != 3:
7177            ads[0].log.error("Total number of call ids is not 3.")
7178            return False
7179        call_conf_id = None
7180        for call_id in calls:
7181            if call_id != call_ab_id and call_id != call_ac_id:
7182                call_conf_id = call_id
7183        if not call_conf_id:
7184            self.log.error("Merge call fail, no new conference call id.")
7185            return False
7186        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
7187            return False
7188
7189        # Check if Conf Call currently active
7190        if ads[0].droid.telecomCallGetCallState(
7191                call_conf_id) != CALL_STATE_ACTIVE:
7192            ads[0].log.error(
7193                "Call_id: %s, state: %s, expected: STATE_ACTIVE", call_conf_id,
7194                ads[0].droid.telecomCallGetCallState(call_conf_id))
7195            return False
7196
7197        # Unmerge
7198        self.log.info("Step5: UnMerge Conf Call into individual participants.")
7199        ads[0].droid.telecomCallSplitFromConf(call_ab_id)
7200        time.sleep(WAIT_TIME_IN_CALL)
7201        calls = ads[0].droid.telecomCallGetCallIds()
7202        ads[0].log.info("Calls in PhoneA %s", calls)
7203
7204        # Are there 2 calls?
7205        if num_active_calls(self.log, ads[0]) != 2:
7206            ads[0].log.error("Total number of call ids is not 2")
7207            return False
7208
7209        # Unmerged calls not dropped?
7210        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
7211            self.log.error("Either Call_AB or Call_AC was dropped")
7212            return False
7213
7214        # Unmerged call in call state ACTIVE?
7215        if ads[0].droid.telecomCallGetCallState(
7216                call_ab_id) != CALL_STATE_ACTIVE:
7217            ads[0].log.error("Call_id: %s, state:%s, expected: STATE_ACTIVE",
7218                             call_ab_id,
7219                             ads[0].droid.telecomCallGetCallState(call_ab_id))
7220            return False
7221
7222        # Swap call
7223        self.log.info("Step6: Swap call and see if Call_AC is ACTIVE.")
7224        num_swaps = 1
7225        if not swap_calls(self.log, ads, call_ac_id, call_ab_id, num_swaps):
7226            self.log.error("Failed to swap calls.")
7227            return False
7228
7229        # Other call in call state ACTIVE?
7230        if ads[0].droid.telecomCallGetCallState(
7231                call_ac_id) != CALL_STATE_ACTIVE:
7232            ads[0].log.error("Call_id: %s, state: %s, expected: STATE_ACTIVE",
7233                             call_ac_id,
7234                             ads[0].droid.telecomCallGetCallState(call_ac_id))
7235            return False
7236
7237        # All calls still CONNECTED?
7238        return self._three_phone_hangup_call_verify_call_state(
7239            ad_hangup=ads[2],
7240            ad_verify=ads[0],
7241            call_id=call_ab_id,
7242            call_state=self._get_expected_call_state(ads[0]),
7243            ads_active=[ads[0], ads[1]])
7244
7245    @TelephonyBaseTest.tel_test_wrap
7246    @test_tracker_info(uuid="63da439e-23f3-4c3c-9e7e-3af6500342c5")
7247    def test_epdg_mo_mo_add_epdg_merge_drop_wfc_wifi_only(self):
7248        """ Test Conf Call among three phones.
7249
7250        Call from PhoneA (epdg) to PhoneB (epdg), accept on PhoneB.
7251        Call from PhoneA (epdg) to PhoneC (epdg), accept on PhoneC.
7252        On PhoneA, merge to conference call.
7253        End call on PhoneC, verify call continues.
7254        End call on PhoneB, verify call end on PhoneA.
7255
7256        Returns:
7257            True if pass; False if fail.
7258        """
7259        ads = self.android_devices
7260
7261        tasks = [(phone_setup_iwlan,
7262                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7263                   self.wifi_network_ssid, self.wifi_network_pass)),
7264                 (phone_setup_iwlan,
7265                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
7266                   self.wifi_network_ssid, self.wifi_network_pass)),
7267                 (phone_setup_iwlan,
7268                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
7269                   self.wifi_network_ssid, self.wifi_network_pass))]
7270        if not multithread_func(self.log, tasks):
7271            self.log.error("Phone Failed to Set Up Properly.")
7272            return False
7273
7274        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(0)
7275        if call_ab_id is None or call_ac_id is None:
7276            return False
7277
7278        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7279
7280    @TelephonyBaseTest.tel_test_wrap
7281    @test_tracker_info(uuid="89b9f228-97a6-4e5c-96b9-a7f87d847c22")
7282    def test_epdg_mo_mo_add_epdg_merge_drop_wfc_wifi_preferred(self):
7283        """ Test Conf Call among three phones.
7284
7285        Call from PhoneA (epdg) to PhoneB (epdg), accept on PhoneB.
7286        Call from PhoneA (epdg) to PhoneC (epdg), accept on PhoneC.
7287        On PhoneA, merge to conference call.
7288        End call on PhoneC, verify call continues.
7289        End call on PhoneB, verify call end on PhoneA.
7290
7291        Returns:
7292            True if pass; False if fail.
7293        """
7294        ads = self.android_devices
7295
7296        tasks = [(phone_setup_iwlan,
7297                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7298                   self.wifi_network_ssid, self.wifi_network_pass)),
7299                 (phone_setup_iwlan,
7300                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
7301                   self.wifi_network_ssid, self.wifi_network_pass)),
7302                 (phone_setup_iwlan,
7303                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
7304                   self.wifi_network_ssid, self.wifi_network_pass))]
7305        if not multithread_func(self.log, tasks):
7306            self.log.error("Phone Failed to Set Up Properly.")
7307            return False
7308
7309        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(0)
7310        if call_ab_id is None or call_ac_id is None:
7311            return False
7312
7313        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7314
7315    @TelephonyBaseTest.tel_test_wrap
7316    @test_tracker_info(uuid="2c6dc281-59b0-4ea4-b811-e4c3a4d654ab")
7317    def test_epdg_mo_mt_add_epdg_merge_drop_wfc_wifi_only(self):
7318        """ Test Conf Call among three phones.
7319
7320        Call from PhoneA (epdg) to PhoneB (epdg), accept on PhoneB.
7321        Call from PhoneC (epdg) to PhoneA (epdg), accept on PhoneA.
7322        On PhoneA, merge to conference call.
7323        End call on PhoneC, verify call continues.
7324        End call on PhoneB, verify call end on PhoneA.
7325
7326        Returns:
7327            True if pass; False if fail.
7328        """
7329        ads = self.android_devices
7330
7331        tasks = [(phone_setup_iwlan,
7332                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7333                   self.wifi_network_ssid, self.wifi_network_pass)),
7334                 (phone_setup_iwlan,
7335                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
7336                   self.wifi_network_ssid, self.wifi_network_pass)),
7337                 (phone_setup_iwlan,
7338                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
7339                   self.wifi_network_ssid, self.wifi_network_pass))]
7340        if not multithread_func(self.log, tasks):
7341            self.log.error("Phone Failed to Set Up Properly.")
7342            return False
7343
7344        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(0)
7345        if call_ab_id is None or call_ac_id is None:
7346            return False
7347
7348        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7349
7350    @TelephonyBaseTest.tel_test_wrap
7351    @test_tracker_info(uuid="f6727241-b727-4eb8-8c0d-f61d3a14a635")
7352    def test_epdg_mo_mt_add_epdg_merge_drop_wfc_wifi_preferred(self):
7353        """ Test Conf Call among three phones.
7354
7355        Call from PhoneA (epdg) to PhoneB (epdg), accept on PhoneB.
7356        Call from PhoneC (epdg) to PhoneA (epdg), accept on PhoneA.
7357        On PhoneA, merge to conference call.
7358        End call on PhoneC, verify call continues.
7359        End call on PhoneB, verify call end on PhoneA.
7360
7361        Returns:
7362            True if pass; False if fail.
7363        """
7364        ads = self.android_devices
7365
7366        tasks = [(phone_setup_iwlan,
7367                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7368                   self.wifi_network_ssid, self.wifi_network_pass)),
7369                 (phone_setup_iwlan,
7370                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
7371                   self.wifi_network_ssid, self.wifi_network_pass)),
7372                 (phone_setup_iwlan,
7373                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
7374                   self.wifi_network_ssid, self.wifi_network_pass))]
7375        if not multithread_func(self.log, tasks):
7376            self.log.error("Phone Failed to Set Up Properly.")
7377            return False
7378
7379        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(0)
7380        if call_ab_id is None or call_ac_id is None:
7381            return False
7382
7383        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7384
7385    @TelephonyBaseTest.tel_test_wrap
7386    @test_tracker_info(uuid="c9e54db0-2b0b-428b-ba63-619ad0b8637b")
7387    def test_epdg_mt_mt_add_epdg_merge_drop_wfc_wifi_only(self):
7388        """ Test Conf Call among three phones.
7389
7390        Call from PhoneB (epdg) to PhoneA (epdg), accept on PhoneA.
7391        Call from PhoneC (epdg) to PhoneA (epdg), accept on PhoneA.
7392        On PhoneA, merge to conference call.
7393        End call on PhoneC, verify call continues.
7394        End call on PhoneB, verify call end on PhoneA.
7395
7396        Returns:
7397            True if pass; False if fail.
7398        """
7399        ads = self.android_devices
7400
7401        tasks = [(phone_setup_iwlan,
7402                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7403                   self.wifi_network_ssid, self.wifi_network_pass)),
7404                 (phone_setup_iwlan,
7405                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
7406                   self.wifi_network_ssid, self.wifi_network_pass)),
7407                 (phone_setup_iwlan,
7408                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
7409                   self.wifi_network_ssid, self.wifi_network_pass))]
7410        if not multithread_func(self.log, tasks):
7411            self.log.error("Phone Failed to Set Up Properly.")
7412            return False
7413
7414        call_ab_id, call_ac_id = self._test_epdg_mt_mt_add_epdg_swap_x(0)
7415        if call_ab_id is None or call_ac_id is None:
7416            return False
7417
7418        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7419
7420    @TelephonyBaseTest.tel_test_wrap
7421    @test_tracker_info(uuid="a478cc82-d95c-43fc-9735-d8333b8937e2")
7422    def test_epdg_mt_mt_add_epdg_merge_drop_wfc_wifi_preferred(self):
7423        """ Test Conf Call among three phones.
7424
7425        Call from PhoneB (epdg) to PhoneA (epdg), accept on PhoneA.
7426        Call from PhoneC (epdg) to PhoneA (epdg), accept on PhoneA.
7427        On PhoneA, merge to conference call.
7428        End call on PhoneC, verify call continues.
7429        End call on PhoneB, verify call end on PhoneA.
7430
7431        Returns:
7432            True if pass; False if fail.
7433        """
7434        ads = self.android_devices
7435
7436        tasks = [(phone_setup_iwlan,
7437                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7438                   self.wifi_network_ssid, self.wifi_network_pass)),
7439                 (phone_setup_iwlan,
7440                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
7441                   self.wifi_network_ssid, self.wifi_network_pass)),
7442                 (phone_setup_iwlan,
7443                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
7444                   self.wifi_network_ssid, self.wifi_network_pass))]
7445        if not multithread_func(self.log, tasks):
7446            self.log.error("Phone Failed to Set Up Properly.")
7447            return False
7448
7449        call_ab_id, call_ac_id = self._test_epdg_mt_mt_add_epdg_swap_x(0)
7450        if call_ab_id is None or call_ac_id is None:
7451            return False
7452
7453        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7454
7455    @TelephonyBaseTest.tel_test_wrap
7456    @test_tracker_info(uuid="b1acb263-1481-44a5-b18e-58bdeff7bc1e")
7457    def test_epdg_mo_mo_add_volte_merge_drop_wfc_wifi_only(self):
7458        """ Test Conf Call among three phones.
7459
7460        Call from PhoneA (epdg) to PhoneB (VoLTE), accept on PhoneB.
7461        Call from PhoneA (epdg) to PhoneC (VoLTE), accept on PhoneC.
7462        On PhoneA, merge to conference call.
7463        End call on PhoneC, verify call continues.
7464        End call on PhoneB, verify call end on PhoneA.
7465
7466        Returns:
7467            True if pass; False if fail.
7468        """
7469        ads = self.android_devices
7470
7471        tasks = [(phone_setup_iwlan,
7472                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7473                   self.wifi_network_ssid, self.wifi_network_pass)),
7474                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
7475                                                           (self.log, ads[2]))]
7476        if not multithread_func(self.log, tasks):
7477            self.log.error("Phone Failed to Set Up Properly.")
7478            return False
7479
7480        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_volte_swap_x(0)
7481        if call_ab_id is None or call_ac_id is None:
7482            return False
7483
7484        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7485
7486    @TelephonyBaseTest.tel_test_wrap
7487    @test_tracker_info(uuid="03b8a0d2-80dd-465a-ad14-5db94cdbcc53")
7488    def test_epdg_mo_mo_add_volte_merge_drop_wfc_wifi_preferred(self):
7489        """ Test Conf Call among three phones.
7490
7491        Call from PhoneA (epdg) to PhoneB (VoLTE), accept on PhoneB.
7492        Call from PhoneA (epdg) to PhoneC (VoLTE), accept on PhoneC.
7493        On PhoneA, merge to conference call.
7494        End call on PhoneC, verify call continues.
7495        End call on PhoneB, verify call end on PhoneA.
7496
7497        Returns:
7498            True if pass; False if fail.
7499        """
7500        ads = self.android_devices
7501
7502        tasks = [(phone_setup_iwlan,
7503                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7504                   self.wifi_network_ssid, self.wifi_network_pass)),
7505                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
7506                                                           (self.log, ads[2]))]
7507        if not multithread_func(self.log, tasks):
7508            self.log.error("Phone Failed to Set Up Properly.")
7509            return False
7510
7511        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_volte_swap_x(0)
7512        if call_ab_id is None or call_ac_id is None:
7513            return False
7514
7515        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7516
7517    @TelephonyBaseTest.tel_test_wrap
7518    @test_tracker_info(uuid="9eb1a816-1e2c-41da-b083-2026163a3893")
7519    def test_epdg_mo_mt_add_volte_merge_drop_wfc_wifi_only(self):
7520        """ Test Conf Call among three phones.
7521
7522        Call from PhoneA (epdg) to PhoneB (VoLTE), accept on PhoneB.
7523        Call from PhoneC (VoLTE) to PhoneA (epdg), accept on PhoneA.
7524        On PhoneA, merge to conference call.
7525        End call on PhoneC, verify call continues.
7526        End call on PhoneB, verify call end on PhoneA.
7527
7528        Returns:
7529            True if pass; False if fail.
7530        """
7531        ads = self.android_devices
7532
7533        tasks = [(phone_setup_iwlan,
7534                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7535                   self.wifi_network_ssid, self.wifi_network_pass)),
7536                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
7537                                                           (self.log, ads[2]))]
7538        if not multithread_func(self.log, tasks):
7539            self.log.error("Phone Failed to Set Up Properly.")
7540            return False
7541
7542        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_volte_swap_x(0)
7543        if call_ab_id is None or call_ac_id is None:
7544            return False
7545
7546        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7547
7548    @TelephonyBaseTest.tel_test_wrap
7549    @test_tracker_info(uuid="3d66a1b6-916f-4221-bd99-21ff4d40ebb8")
7550    def test_epdg_mo_mt_add_volte_merge_drop_wfc_wifi_preferred(self):
7551        """ Test Conf Call among three phones.
7552
7553        Call from PhoneA (epdg) to PhoneB (VoLTE), accept on PhoneB.
7554        Call from PhoneC (VoLTE) to PhoneA (epdg), accept on PhoneA.
7555        On PhoneA, merge to conference call.
7556        End call on PhoneC, verify call continues.
7557        End call on PhoneB, verify call end on PhoneA.
7558
7559        Returns:
7560            True if pass; False if fail.
7561        """
7562        ads = self.android_devices
7563
7564        tasks = [(phone_setup_iwlan,
7565                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7566                   self.wifi_network_ssid, self.wifi_network_pass)),
7567                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
7568                                                           (self.log, ads[2]))]
7569        if not multithread_func(self.log, tasks):
7570            self.log.error("Phone Failed to Set Up Properly.")
7571            return False
7572
7573        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_volte_swap_x(0)
7574        if call_ab_id is None or call_ac_id is None:
7575            return False
7576
7577        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7578
7579    @TelephonyBaseTest.tel_test_wrap
7580    @test_tracker_info(uuid="9d8e8b2f-e2b9-4607-8c54-6233b3096123")
7581    def test_epdg_mo_mo_add_wcdma_merge_drop_wfc_wifi_only(self):
7582        """ Test Conf Call among three phones.
7583
7584        Call from PhoneA (epdg) to PhoneB (WCDMA), accept on PhoneB.
7585        Call from PhoneA (epdg) to PhoneC (WCDMA), accept on PhoneC.
7586        On PhoneA, merge to conference call.
7587        End call on PhoneC, verify call continues.
7588        End call on PhoneB, verify call end on PhoneA.
7589
7590        Returns:
7591            True if pass; False if fail.
7592        """
7593        ads = self.android_devices
7594
7595        tasks = [(phone_setup_iwlan,
7596                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7597                   self.wifi_network_ssid, self.wifi_network_pass)),
7598                 (phone_setup_voice_3g, (self.log, ads[1])),
7599                 (phone_setup_voice_3g, (self.log, ads[2]))]
7600        if not multithread_func(self.log, tasks):
7601            self.log.error("Phone Failed to Set Up Properly.")
7602            return False
7603
7604        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_wcdma_swap_x(0)
7605        if call_ab_id is None or call_ac_id is None:
7606            return False
7607
7608        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7609
7610    @TelephonyBaseTest.tel_test_wrap
7611    @test_tracker_info(uuid="0884206b-2471-4a7e-95aa-228379416ff8")
7612    def test_epdg_mo_mo_add_wcdma_merge_drop_wfc_wifi_preferred(self):
7613        """ Test Conf Call among three phones.
7614
7615        Call from PhoneA (epdg) to PhoneB (WCDMA), accept on PhoneB.
7616        Call from PhoneA (epdg) to PhoneC (WCDMA), accept on PhoneC.
7617        On PhoneA, merge to conference call.
7618        End call on PhoneC, verify call continues.
7619        End call on PhoneB, verify call end on PhoneA.
7620
7621        Returns:
7622            True if pass; False if fail.
7623        """
7624        ads = self.android_devices
7625
7626        tasks = [(phone_setup_iwlan,
7627                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7628                   self.wifi_network_ssid, self.wifi_network_pass)),
7629                 (phone_setup_voice_3g, (self.log, ads[1])),
7630                 (phone_setup_voice_3g, (self.log, ads[2]))]
7631        if not multithread_func(self.log, tasks):
7632            self.log.error("Phone Failed to Set Up Properly.")
7633            return False
7634
7635        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_wcdma_swap_x(0)
7636        if call_ab_id is None or call_ac_id is None:
7637            return False
7638
7639        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7640
7641    @TelephonyBaseTest.tel_test_wrap
7642    @test_tracker_info(uuid="c7706af6-dc77-4002-b295-66c60aeace6b")
7643    def test_epdg_mo_mt_add_wcdma_merge_drop_wfc_wifi_only(self):
7644        """ Test Conf Call among three phones.
7645
7646        Call from PhoneA (epdg) to PhoneB (WCDMA), accept on PhoneB.
7647        Call from PhoneC (WCDMA) to PhoneA (epdg), accept on PhoneA.
7648        On PhoneA, merge to conference call.
7649        End call on PhoneC, verify call continues.
7650        End call on PhoneB, verify call end on PhoneA.
7651
7652        Returns:
7653            True if pass; False if fail.
7654        """
7655        ads = self.android_devices
7656
7657        tasks = [(phone_setup_iwlan,
7658                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7659                   self.wifi_network_ssid, self.wifi_network_pass)),
7660                 (phone_setup_voice_3g, (self.log, ads[1])),
7661                 (phone_setup_voice_3g, (self.log, ads[2]))]
7662        if not multithread_func(self.log, tasks):
7663            self.log.error("Phone Failed to Set Up Properly.")
7664            return False
7665
7666        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_wcdma_swap_x(0)
7667        if call_ab_id is None or call_ac_id is None:
7668            return False
7669
7670        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7671
7672    @TelephonyBaseTest.tel_test_wrap
7673    @test_tracker_info(uuid="b079618f-e32b-4ba0-9009-06e013805c39")
7674    def test_epdg_mo_mt_add_wcdma_merge_drop_wfc_wifi_preferred(self):
7675        """ Test Conf Call among three phones.
7676
7677        Call from PhoneA (epdg) to PhoneB (WCDMA), accept on PhoneB.
7678        Call from PhoneC (WCDMA) to PhoneA (epdg), accept on PhoneA.
7679        On PhoneA, merge to conference call.
7680        End call on PhoneC, verify call continues.
7681        End call on PhoneB, verify call end on PhoneA.
7682
7683        Returns:
7684            True if pass; False if fail.
7685        """
7686        ads = self.android_devices
7687
7688        tasks = [(phone_setup_iwlan,
7689                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7690                   self.wifi_network_ssid, self.wifi_network_pass)),
7691                 (phone_setup_voice_3g, (self.log, ads[1])),
7692                 (phone_setup_voice_3g, (self.log, ads[2]))]
7693        if not multithread_func(self.log, tasks):
7694            self.log.error("Phone Failed to Set Up Properly.")
7695            return False
7696
7697        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_wcdma_swap_x(0)
7698        if call_ab_id is None or call_ac_id is None:
7699            return False
7700
7701        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7702
7703    @TelephonyBaseTest.tel_test_wrap
7704    @test_tracker_info(uuid="571fe98b-354f-4038-8441-0e4b1840eb7a")
7705    def test_epdg_mo_mo_add_1x_merge_drop_wfc_wifi_only(self):
7706        """ Test Conf Call among three phones.
7707
7708        Call from PhoneA (epdg) to PhoneB (1x), accept on PhoneB.
7709        Call from PhoneA (epdg) to PhoneC (1x), accept on PhoneC.
7710        On PhoneA, merge to conference call.
7711        End call on PhoneC, verify call continues.
7712        End call on PhoneB, verify call end on PhoneA.
7713
7714        Returns:
7715            True if pass; False if fail.
7716        """
7717        ads = self.android_devices
7718
7719        tasks = [(phone_setup_iwlan,
7720                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7721                   self.wifi_network_ssid, self.wifi_network_pass)),
7722                 (phone_setup_voice_3g, (self.log, ads[1])),
7723                 (phone_setup_voice_3g, (self.log, ads[2]))]
7724        if not multithread_func(self.log, tasks):
7725            self.log.error("Phone Failed to Set Up Properly.")
7726            return False
7727
7728        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_1x_swap_x(0)
7729        if call_ab_id is None or call_ac_id is None:
7730            return False
7731
7732        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7733
7734    @TelephonyBaseTest.tel_test_wrap
7735    @test_tracker_info(uuid="8f531f3c-493e-43d6-9d6d-f4990b5feba4")
7736    def test_epdg_mo_mo_add_1x_merge_drop_wfc_wifi_preferred(self):
7737        """ Test Conf Call among three phones.
7738
7739        Call from PhoneA (epdg) to PhoneB (1x), accept on PhoneB.
7740        Call from PhoneA (epdg) to PhoneC (1x), accept on PhoneC.
7741        On PhoneA, merge to conference call.
7742        End call on PhoneC, verify call continues.
7743        End call on PhoneB, verify call end on PhoneA.
7744
7745        Returns:
7746            True if pass; False if fail.
7747        """
7748        ads = self.android_devices
7749
7750        tasks = [(phone_setup_iwlan,
7751                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7752                   self.wifi_network_ssid, self.wifi_network_pass)),
7753                 (phone_setup_voice_3g, (self.log, ads[1])),
7754                 (phone_setup_voice_3g, (self.log, ads[2]))]
7755        if not multithread_func(self.log, tasks):
7756            self.log.error("Phone Failed to Set Up Properly.")
7757            return False
7758
7759        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_1x_swap_x(0)
7760        if call_ab_id is None or call_ac_id is None:
7761            return False
7762
7763        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7764
7765    @TelephonyBaseTest.tel_test_wrap
7766    @test_tracker_info(uuid="00e1194b-3c06-46c4-8764-0339c0aa9f9e")
7767    def test_epdg_mo_mt_add_1x_merge_drop_wfc_wifi_only(self):
7768        """ Test Conf Call among three phones.
7769
7770        Call from PhoneA (epdg) to PhoneB (1x), accept on PhoneB.
7771        Call from PhoneC (1x) to PhoneA (epdg), accept on PhoneA.
7772        On PhoneA, merge to conference call.
7773        End call on PhoneC, verify call continues.
7774        End call on PhoneB, verify call end on PhoneA.
7775
7776        Returns:
7777            True if pass; False if fail.
7778        """
7779        ads = self.android_devices
7780
7781        tasks = [(phone_setup_iwlan,
7782                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7783                   self.wifi_network_ssid, self.wifi_network_pass)),
7784                 (phone_setup_voice_3g, (self.log, ads[1])),
7785                 (phone_setup_voice_3g, (self.log, ads[2]))]
7786        if not multithread_func(self.log, tasks):
7787            self.log.error("Phone Failed to Set Up Properly.")
7788            return False
7789
7790        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_1x_swap_x(0)
7791        if call_ab_id is None or call_ac_id is None:
7792            return False
7793
7794        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7795
7796    @TelephonyBaseTest.tel_test_wrap
7797    @test_tracker_info(uuid="c94f6444-d265-4277-9555-57041e3c4ff4")
7798    def test_epdg_mo_mt_add_1x_merge_drop_wfc_wifi_preferred(self):
7799        """ Test Conf Call among three phones.
7800
7801        Call from PhoneA (epdg) to PhoneB (1x), accept on PhoneB.
7802        Call from PhoneC (1x) to PhoneA (epdg), accept on PhoneA.
7803        On PhoneA, merge to conference call.
7804        End call on PhoneC, verify call continues.
7805        End call on PhoneB, verify call end on PhoneA.
7806
7807        Returns:
7808            True if pass; False if fail.
7809        """
7810        ads = self.android_devices
7811
7812        tasks = [(phone_setup_iwlan,
7813                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7814                   self.wifi_network_ssid, self.wifi_network_pass)),
7815                 (phone_setup_voice_3g, (self.log, ads[1])),
7816                 (phone_setup_voice_3g, (self.log, ads[2]))]
7817        if not multithread_func(self.log, tasks):
7818            self.log.error("Phone Failed to Set Up Properly.")
7819            return False
7820
7821        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_1x_swap_x(0)
7822        if call_ab_id is None or call_ac_id is None:
7823            return False
7824
7825        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7826
7827    @TelephonyBaseTest.tel_test_wrap
7828    @test_tracker_info(uuid="0980745e-dcdc-4c56-84e3-e2ee076059ee")
7829    def test_epdg_mo_mo_add_epdg_swap_once_merge_drop_wfc_wifi_only(self):
7830        """Test swap and merge feature in epdg call.
7831
7832        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
7833        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
7834        Swap active call on PhoneA.
7835        Merge calls to conference on PhoneA.
7836        Hangup on PhoneC, check call continues between AB.
7837        Hangup on PhoneB, check A ends.
7838
7839        """
7840        ads = self.android_devices
7841
7842        tasks = [(phone_setup_iwlan,
7843                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7844                   self.wifi_network_ssid, self.wifi_network_pass)),
7845                 (phone_setup_iwlan,
7846                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
7847                   self.wifi_network_ssid, self.wifi_network_pass)),
7848                 (phone_setup_iwlan,
7849                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
7850                   self.wifi_network_ssid, self.wifi_network_pass))]
7851        if not multithread_func(self.log, tasks):
7852            self.log.error("Phone Failed to Set Up Properly.")
7853            return False
7854
7855        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(1)
7856        if call_ab_id is None or call_ac_id is None:
7857            return False
7858
7859        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7860
7861    @TelephonyBaseTest.tel_test_wrap
7862    @test_tracker_info(uuid="6bf0b152-fb1c-4edc-9525-b39e8640b967")
7863    def test_epdg_mo_mo_add_epdg_swap_once_merge_drop_wfc_wifi_preferred(self):
7864        """Test swap and merge feature in epdg call.
7865
7866        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
7867        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
7868        Swap active call on PhoneA.
7869        Merge calls to conference on PhoneA.
7870        Hangup on PhoneC, check call continues between AB.
7871        Hangup on PhoneB, check A ends.
7872
7873        """
7874        ads = self.android_devices
7875
7876        tasks = [(phone_setup_iwlan,
7877                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7878                   self.wifi_network_ssid, self.wifi_network_pass)),
7879                 (phone_setup_iwlan,
7880                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
7881                   self.wifi_network_ssid, self.wifi_network_pass)),
7882                 (phone_setup_iwlan,
7883                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
7884                   self.wifi_network_ssid, self.wifi_network_pass))]
7885        if not multithread_func(self.log, tasks):
7886            self.log.error("Phone Failed to Set Up Properly.")
7887            return False
7888
7889        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(1)
7890        if call_ab_id is None or call_ac_id is None:
7891            return False
7892
7893        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7894
7895    @TelephonyBaseTest.tel_test_wrap
7896    @test_tracker_info(uuid="e3013df6-98ca-4318-85ba-04011ba0a24f")
7897    def test_epdg_mo_mo_add_epdg_swap_twice_merge_drop_wfc_wifi_only(self):
7898        """Test swap and merge feature in epdg call.
7899
7900        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
7901        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
7902        Swap active call on PhoneA.
7903        Swap active call on PhoneA.
7904        Merge calls to conference on PhoneA.
7905        Hangup on PhoneC, check call continues between AB.
7906        Hangup on PhoneB, check A ends.
7907
7908        """
7909        ads = self.android_devices
7910
7911        tasks = [(phone_setup_iwlan,
7912                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7913                   self.wifi_network_ssid, self.wifi_network_pass)),
7914                 (phone_setup_iwlan,
7915                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
7916                   self.wifi_network_ssid, self.wifi_network_pass)),
7917                 (phone_setup_iwlan,
7918                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
7919                   self.wifi_network_ssid, self.wifi_network_pass))]
7920        if not multithread_func(self.log, tasks):
7921            self.log.error("Phone Failed to Set Up Properly.")
7922            return False
7923
7924        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(2)
7925        if call_ab_id is None or call_ac_id is None:
7926            return False
7927
7928        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7929
7930    @TelephonyBaseTest.tel_test_wrap
7931    @test_tracker_info(uuid="e88bf042-8799-44c7-bc50-66ac1e1fb2ac")
7932    def test_epdg_mo_mo_add_epdg_swap_twice_merge_drop_wfc_wifi_preferred(
7933            self):
7934        """Test swap and merge feature in epdg call.
7935
7936        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
7937        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
7938        Swap active call on PhoneA.
7939        Swap active call on PhoneA.
7940        Merge calls to conference on PhoneA.
7941        Hangup on PhoneC, check call continues between AB.
7942        Hangup on PhoneB, check A ends.
7943
7944        """
7945        ads = self.android_devices
7946
7947        tasks = [(phone_setup_iwlan,
7948                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
7949                   self.wifi_network_ssid, self.wifi_network_pass)),
7950                 (phone_setup_iwlan,
7951                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
7952                   self.wifi_network_ssid, self.wifi_network_pass)),
7953                 (phone_setup_iwlan,
7954                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
7955                   self.wifi_network_ssid, self.wifi_network_pass))]
7956        if not multithread_func(self.log, tasks):
7957            self.log.error("Phone Failed to Set Up Properly.")
7958            return False
7959
7960        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(2)
7961        if call_ab_id is None or call_ac_id is None:
7962            return False
7963
7964        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7965
7966    @TelephonyBaseTest.tel_test_wrap
7967    @test_tracker_info(uuid="a8302e73-82a4-4409-b038-5c604fb4c66c")
7968    def test_epdg_mo_mt_add_epdg_swap_once_merge_drop_wfc_wifi_only(self):
7969        """Test swap and merge feature in epdg call.
7970
7971        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
7972        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
7973        Swap active call on PhoneA.
7974        Merge calls to conference on PhoneA.
7975        Hangup on PhoneC, check call continues between AB.
7976        Hangup on PhoneB, check A ends.
7977
7978        """
7979        ads = self.android_devices
7980
7981        tasks = [(phone_setup_iwlan,
7982                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
7983                   self.wifi_network_ssid, self.wifi_network_pass)),
7984                 (phone_setup_iwlan,
7985                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
7986                   self.wifi_network_ssid, self.wifi_network_pass)),
7987                 (phone_setup_iwlan,
7988                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
7989                   self.wifi_network_ssid, self.wifi_network_pass))]
7990        if not multithread_func(self.log, tasks):
7991            self.log.error("Phone Failed to Set Up Properly.")
7992            return False
7993
7994        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
7995        if call_ab_id is None or call_ac_id is None:
7996            return False
7997
7998        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
7999
8000    @TelephonyBaseTest.tel_test_wrap
8001    @test_tracker_info(uuid="80f69baf-1649-4858-b35c-b25baf79b42c")
8002    def test_epdg_mo_mt_add_epdg_swap_once_merge_drop_wfc_wifi_preferred(self):
8003        """Test swap and merge feature in epdg call.
8004
8005        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
8006        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
8007        Swap active call on PhoneA.
8008        Merge calls to conference on PhoneA.
8009        Hangup on PhoneC, check call continues between AB.
8010        Hangup on PhoneB, check A ends.
8011
8012        """
8013        ads = self.android_devices
8014
8015        tasks = [(phone_setup_iwlan,
8016                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8017                   self.wifi_network_ssid, self.wifi_network_pass)),
8018                 (phone_setup_iwlan,
8019                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
8020                   self.wifi_network_ssid, self.wifi_network_pass)),
8021                 (phone_setup_iwlan,
8022                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
8023                   self.wifi_network_ssid, self.wifi_network_pass))]
8024        if not multithread_func(self.log, tasks):
8025            self.log.error("Phone Failed to Set Up Properly.")
8026            return False
8027
8028        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
8029        if call_ab_id is None or call_ac_id is None:
8030            return False
8031
8032        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8033
8034    @TelephonyBaseTest.tel_test_wrap
8035    @test_tracker_info(uuid="1ac0c067-49fb-41d9-8649-cc709bdd8926")
8036    def test_epdg_mo_mt_add_epdg_swap_twice_merge_drop_wfc_wifi_only(self):
8037        """Test swap and merge feature in epdg call.
8038
8039        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
8040        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
8041        Swap active call on PhoneA.
8042        Swap active call on PhoneA.
8043        Merge calls to conference on PhoneA.
8044        Hangup on PhoneC, check call continues between AB.
8045        Hangup on PhoneB, check A ends.
8046
8047        """
8048        ads = self.android_devices
8049
8050        tasks = [(phone_setup_iwlan,
8051                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8052                   self.wifi_network_ssid, self.wifi_network_pass)),
8053                 (phone_setup_iwlan,
8054                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
8055                   self.wifi_network_ssid, self.wifi_network_pass)),
8056                 (phone_setup_iwlan,
8057                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
8058                   self.wifi_network_ssid, self.wifi_network_pass))]
8059        if not multithread_func(self.log, tasks):
8060            self.log.error("Phone Failed to Set Up Properly.")
8061            return False
8062
8063        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(2)
8064        if call_ab_id is None or call_ac_id is None:
8065            return False
8066
8067        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8068
8069    @TelephonyBaseTest.tel_test_wrap
8070    @test_tracker_info(uuid="b20b1a94-048c-4f10-9261-dde79e1edb00")
8071    def test_epdg_mo_mt_add_epdg_swap_twice_merge_drop_wfc_wifi_preferred(
8072            self):
8073        """Test swap and merge feature in epdg call.
8074
8075        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
8076        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
8077        Swap active call on PhoneA.
8078        Swap active call on PhoneA.
8079        Merge calls to conference on PhoneA.
8080        Hangup on PhoneC, check call continues between AB.
8081        Hangup on PhoneB, check A ends.
8082
8083        """
8084        ads = self.android_devices
8085
8086        tasks = [(phone_setup_iwlan,
8087                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8088                   self.wifi_network_ssid, self.wifi_network_pass)),
8089                 (phone_setup_iwlan,
8090                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
8091                   self.wifi_network_ssid, self.wifi_network_pass)),
8092                 (phone_setup_iwlan,
8093                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
8094                   self.wifi_network_ssid, self.wifi_network_pass))]
8095        if not multithread_func(self.log, tasks):
8096            self.log.error("Phone Failed to Set Up Properly.")
8097            return False
8098
8099        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(2)
8100        if call_ab_id is None or call_ac_id is None:
8101            return False
8102
8103        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8104
8105    @TelephonyBaseTest.tel_test_wrap
8106    @test_tracker_info(uuid="402b175f-1510-4e2a-97c2-7c9ea5ce40f6")
8107    def test_epdg_mo_mo_add_volte_swap_once_merge_drop_wfc_wifi_only(self):
8108        """Test swap and merge feature in epdg call.
8109
8110        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
8111        PhoneA (epdg) call PhoneC (VoLTE), accept on PhoneC.
8112        Swap active call on PhoneA.
8113        Merge calls to conference on PhoneA.
8114        Hangup on PhoneC, check call continues between AB.
8115        Hangup on PhoneB, check A ends.
8116
8117        """
8118        ads = self.android_devices
8119
8120        tasks = [(phone_setup_iwlan,
8121                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8122                   self.wifi_network_ssid, self.wifi_network_pass)),
8123                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
8124                                                           (self.log, ads[2]))]
8125        if not multithread_func(self.log, tasks):
8126            self.log.error("Phone Failed to Set Up Properly.")
8127            return False
8128
8129        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_volte_swap_x(1)
8130        if call_ab_id is None or call_ac_id is None:
8131            return False
8132
8133        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8134
8135    @TelephonyBaseTest.tel_test_wrap
8136    @test_tracker_info(uuid="7c710fbf-4b77-4b46-9719-e17b3d047cfc")
8137    def test_epdg_mo_mo_add_volte_swap_once_merge_drop_wfc_wifi_preferred(
8138            self):
8139        """Test swap and merge feature in epdg call.
8140
8141        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
8142        PhoneA (epdg) call PhoneC (VoLTE), accept on PhoneC.
8143        Swap active call on PhoneA.
8144        Merge calls to conference on PhoneA.
8145        Hangup on PhoneC, check call continues between AB.
8146        Hangup on PhoneB, check A ends.
8147
8148        """
8149        ads = self.android_devices
8150
8151        tasks = [(phone_setup_iwlan,
8152                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8153                   self.wifi_network_ssid, self.wifi_network_pass)),
8154                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
8155                                                           (self.log, ads[2]))]
8156        if not multithread_func(self.log, tasks):
8157            self.log.error("Phone Failed to Set Up Properly.")
8158            return False
8159
8160        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_volte_swap_x(1)
8161        if call_ab_id is None or call_ac_id is None:
8162            return False
8163
8164        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8165
8166    @TelephonyBaseTest.tel_test_wrap
8167    @test_tracker_info(uuid="642afbac-30c1-4dbf-bf3e-758ab6c3a306")
8168    def test_epdg_mo_mo_add_volte_swap_twice_merge_drop_wfc_wifi_only(self):
8169        """Test swap and merge feature in epdg call.
8170
8171        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
8172        PhoneA (epdg) call PhoneC (VoLTE), accept on PhoneC.
8173        Swap active call on PhoneA.
8174        Swap active call on PhoneA.
8175        Merge calls to conference on PhoneA.
8176        Hangup on PhoneC, check call continues between AB.
8177        Hangup on PhoneB, check A ends.
8178
8179        """
8180        ads = self.android_devices
8181
8182        tasks = [(phone_setup_iwlan,
8183                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8184                   self.wifi_network_ssid, self.wifi_network_pass)),
8185                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
8186                                                           (self.log, ads[2]))]
8187        if not multithread_func(self.log, tasks):
8188            self.log.error("Phone Failed to Set Up Properly.")
8189            return False
8190
8191        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_volte_swap_x(2)
8192        if call_ab_id is None or call_ac_id is None:
8193            return False
8194
8195        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8196
8197    @TelephonyBaseTest.tel_test_wrap
8198    @test_tracker_info(uuid="a4ae1e39-ed6d-412e-b821-321c715a5d47")
8199    def test_epdg_mo_mo_add_volte_swap_twice_merge_drop_wfc_wifi_preferred(
8200            self):
8201        """Test swap and merge feature in epdg call.
8202
8203        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
8204        PhoneA (epdg) call PhoneC (VoLTE), accept on PhoneC.
8205        Swap active call on PhoneA.
8206        Swap active call on PhoneA.
8207        Merge calls to conference on PhoneA.
8208        Hangup on PhoneC, check call continues between AB.
8209        Hangup on PhoneB, check A ends.
8210
8211        """
8212        ads = self.android_devices
8213
8214        tasks = [(phone_setup_iwlan,
8215                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8216                   self.wifi_network_ssid, self.wifi_network_pass)),
8217                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
8218                                                           (self.log, ads[2]))]
8219        if not multithread_func(self.log, tasks):
8220            self.log.error("Phone Failed to Set Up Properly.")
8221            return False
8222
8223        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_volte_swap_x(2)
8224        if call_ab_id is None or call_ac_id is None:
8225            return False
8226
8227        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8228
8229    @TelephonyBaseTest.tel_test_wrap
8230    @test_tracker_info(uuid="7b8431f2-8a49-4aa9-b84d-77f16a6a2c30")
8231    def test_epdg_mo_mt_add_volte_swap_once_merge_drop_wfc_wifi_only(self):
8232        """Test swap and merge feature in epdg call.
8233
8234        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
8235        PhoneC (VoLTE) call PhoneA (epdg), accept on PhoneA.
8236        Swap active call on PhoneA.
8237        Merge calls to conference on PhoneA.
8238        Hangup on PhoneC, check call continues between AB.
8239        Hangup on PhoneB, check A ends.
8240
8241        """
8242        ads = self.android_devices
8243
8244        tasks = [(phone_setup_iwlan,
8245                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8246                   self.wifi_network_ssid, self.wifi_network_pass)),
8247                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
8248                                                           (self.log, ads[2]))]
8249        if not multithread_func(self.log, tasks):
8250            self.log.error("Phone Failed to Set Up Properly.")
8251            return False
8252
8253        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_volte_swap_x(1)
8254        if call_ab_id is None or call_ac_id is None:
8255            return False
8256
8257        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8258
8259    @TelephonyBaseTest.tel_test_wrap
8260    @test_tracker_info(uuid="5b4d7444-32a1-4e82-8847-1c4ae002edca")
8261    def test_epdg_mo_mt_add_volte_swap_once_merge_drop_wfc_wifi_preferred(
8262            self):
8263        """Test swap and merge feature in epdg call.
8264
8265        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
8266        PhoneC (VoLTE) call PhoneA (epdg), accept on PhoneA.
8267        Swap active call on PhoneA.
8268        Merge calls to conference on PhoneA.
8269        Hangup on PhoneC, check call continues between AB.
8270        Hangup on PhoneB, check A ends.
8271
8272        """
8273        ads = self.android_devices
8274
8275        tasks = [(phone_setup_iwlan,
8276                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8277                   self.wifi_network_ssid, self.wifi_network_pass)),
8278                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
8279                                                           (self.log, ads[2]))]
8280        if not multithread_func(self.log, tasks):
8281            self.log.error("Phone Failed to Set Up Properly.")
8282            return False
8283
8284        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_volte_swap_x(1)
8285        if call_ab_id is None or call_ac_id is None:
8286            return False
8287
8288        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8289
8290    @TelephonyBaseTest.tel_test_wrap
8291    @test_tracker_info(uuid="88c6c179-0b56-4d03-b5e4-76a147a40995")
8292    def test_epdg_mo_mt_add_volte_swap_twice_merge_drop_wfc_wifi_only(self):
8293        """Test swap and merge feature in epdg call.
8294
8295        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
8296        PhoneC (VoLTE) call PhoneA (epdg), accept on PhoneA.
8297        Swap active call on PhoneA.
8298        Swap active call on PhoneA.
8299        Merge calls to conference on PhoneA.
8300        Hangup on PhoneC, check call continues between AB.
8301        Hangup on PhoneB, check A ends.
8302
8303        """
8304        ads = self.android_devices
8305
8306        tasks = [(phone_setup_iwlan,
8307                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8308                   self.wifi_network_ssid, self.wifi_network_pass)),
8309                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
8310                                                           (self.log, ads[2]))]
8311        if not multithread_func(self.log, tasks):
8312            self.log.error("Phone Failed to Set Up Properly.")
8313            return False
8314
8315        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_volte_swap_x(2)
8316        if call_ab_id is None or call_ac_id is None:
8317            return False
8318
8319        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8320
8321    @TelephonyBaseTest.tel_test_wrap
8322    @test_tracker_info(uuid="7f744ab3-f919-4a7a-83ce-e38487d619cc")
8323    def test_epdg_mo_mt_add_volte_swap_twice_merge_drop_wfc_wifi_preferred(
8324            self):
8325        """Test swap and merge feature in epdg call.
8326
8327        PhoneA (epdg) call PhoneB (VoLTE), accept on PhoneB.
8328        PhoneC (VoLTE) call PhoneA (epdg), accept on PhoneA.
8329        Swap active call on PhoneA.
8330        Swap active call on PhoneA.
8331        Merge calls to conference on PhoneA.
8332        Hangup on PhoneC, check call continues between AB.
8333        Hangup on PhoneB, check A ends.
8334
8335        """
8336        ads = self.android_devices
8337
8338        tasks = [(phone_setup_iwlan,
8339                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8340                   self.wifi_network_ssid, self.wifi_network_pass)),
8341                 (phone_setup_volte, (self.log, ads[1])), (phone_setup_volte,
8342                                                           (self.log, ads[2]))]
8343        if not multithread_func(self.log, tasks):
8344            self.log.error("Phone Failed to Set Up Properly.")
8345            return False
8346
8347        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_volte_swap_x(2)
8348        if call_ab_id is None or call_ac_id is None:
8349            return False
8350
8351        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8352
8353    @TelephonyBaseTest.tel_test_wrap
8354    @test_tracker_info(uuid="5c861a99-a1b8-45fc-ba67-f8fde4575efc")
8355    def test_epdg_mo_mo_add_wcdma_swap_once_merge_drop_wfc_wifi_only(self):
8356        """Test swap and merge feature in epdg call.
8357
8358        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
8359        PhoneA (epdg) call PhoneC (WCDMA), accept on PhoneC.
8360        Swap active call on PhoneA.
8361        Merge calls to conference on PhoneA.
8362        Hangup on PhoneC, check call continues between AB.
8363        Hangup on PhoneB, check A ends.
8364
8365        """
8366        ads = self.android_devices
8367
8368        tasks = [(phone_setup_iwlan,
8369                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8370                   self.wifi_network_ssid, self.wifi_network_pass)),
8371                 (phone_setup_voice_3g, (self.log, ads[1])),
8372                 (phone_setup_voice_3g, (self.log, ads[2]))]
8373        if not multithread_func(self.log, tasks):
8374            self.log.error("Phone Failed to Set Up Properly.")
8375            return False
8376
8377        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_wcdma_swap_x(1)
8378        if call_ab_id is None or call_ac_id is None:
8379            return False
8380
8381        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8382
8383    @TelephonyBaseTest.tel_test_wrap
8384    @test_tracker_info(uuid="fdb32a13-302c-4c1c-a77e-f78ed7e90911")
8385    def test_epdg_mo_mo_add_wcdma_swap_once_merge_drop_wfc_wifi_preferred(
8386            self):
8387        """Test swap and merge feature in epdg call.
8388
8389        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
8390        PhoneA (epdg) call PhoneC (WCDMA), accept on PhoneC.
8391        Swap active call on PhoneA.
8392        Merge calls to conference on PhoneA.
8393        Hangup on PhoneC, check call continues between AB.
8394        Hangup on PhoneB, check A ends.
8395
8396        """
8397        ads = self.android_devices
8398
8399        tasks = [(phone_setup_iwlan,
8400                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8401                   self.wifi_network_ssid, self.wifi_network_pass)),
8402                 (phone_setup_voice_3g, (self.log, ads[1])),
8403                 (phone_setup_voice_3g, (self.log, ads[2]))]
8404        if not multithread_func(self.log, tasks):
8405            self.log.error("Phone Failed to Set Up Properly.")
8406            return False
8407
8408        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_wcdma_swap_x(1)
8409        if call_ab_id is None or call_ac_id is None:
8410            return False
8411
8412        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8413
8414    @TelephonyBaseTest.tel_test_wrap
8415    @test_tracker_info(uuid="a2cf3366-ae66-4e8f-a682-df506173f282")
8416    def test_epdg_mo_mo_add_wcdma_swap_twice_merge_drop_wfc_wifi_only(self):
8417        """Test swap and merge feature in epdg call.
8418
8419        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
8420        PhoneA (epdg) call PhoneC (WCDMA), accept on PhoneC.
8421        Swap active call on PhoneA.
8422        Swap active call on PhoneA.
8423        Merge calls to conference on PhoneA.
8424        Hangup on PhoneC, check call continues between AB.
8425        Hangup on PhoneB, check A ends.
8426
8427        """
8428        ads = self.android_devices
8429
8430        tasks = [(phone_setup_iwlan,
8431                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8432                   self.wifi_network_ssid, self.wifi_network_pass)),
8433                 (phone_setup_voice_3g, (self.log, ads[1])),
8434                 (phone_setup_voice_3g, (self.log, ads[2]))]
8435        if not multithread_func(self.log, tasks):
8436            self.log.error("Phone Failed to Set Up Properly.")
8437            return False
8438
8439        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_wcdma_swap_x(2)
8440        if call_ab_id is None or call_ac_id is None:
8441            return False
8442
8443        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8444
8445    @TelephonyBaseTest.tel_test_wrap
8446    @test_tracker_info(uuid="fc5f0f1c-9610-4d0f-adce-9c8db351e7da")
8447    def test_epdg_mo_mo_add_wcdma_swap_twice_merge_drop_wfc_wifi_preferred(
8448            self):
8449        """Test swap and merge feature in epdg call.
8450
8451        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
8452        PhoneA (epdg) call PhoneC (WCDMA), accept on PhoneC.
8453        Swap active call on PhoneA.
8454        Swap active call on PhoneA.
8455        Merge calls to conference on PhoneA.
8456        Hangup on PhoneC, check call continues between AB.
8457        Hangup on PhoneB, check A ends.
8458
8459        """
8460        ads = self.android_devices
8461
8462        tasks = [(phone_setup_iwlan,
8463                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8464                   self.wifi_network_ssid, self.wifi_network_pass)),
8465                 (phone_setup_voice_3g, (self.log, ads[1])),
8466                 (phone_setup_voice_3g, (self.log, ads[2]))]
8467        if not multithread_func(self.log, tasks):
8468            self.log.error("Phone Failed to Set Up Properly.")
8469            return False
8470
8471        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_wcdma_swap_x(2)
8472        if call_ab_id is None or call_ac_id is None:
8473            return False
8474
8475        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8476
8477    @TelephonyBaseTest.tel_test_wrap
8478    @test_tracker_info(uuid="05332b1e-c36b-4874-b13b-f8e49d0d9bca")
8479    def test_epdg_mo_mt_add_wcdma_swap_once_merge_drop_wfc_wifi_only(self):
8480        """Test swap and merge feature in epdg call.
8481
8482        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
8483        PhoneC (WCDMA) call PhoneA (epdg), accept on PhoneA.
8484        Swap active call on PhoneA.
8485        Merge calls to conference on PhoneA.
8486        Hangup on PhoneC, check call continues between AB.
8487        Hangup on PhoneB, check A ends.
8488
8489        """
8490        ads = self.android_devices
8491
8492        tasks = [(phone_setup_iwlan,
8493                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8494                   self.wifi_network_ssid, self.wifi_network_pass)),
8495                 (phone_setup_voice_3g, (self.log, ads[1])),
8496                 (phone_setup_voice_3g, (self.log, ads[2]))]
8497        if not multithread_func(self.log, tasks):
8498            self.log.error("Phone Failed to Set Up Properly.")
8499            return False
8500
8501        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_wcdma_swap_x(1)
8502        if call_ab_id is None or call_ac_id is None:
8503            return False
8504
8505        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8506
8507    @TelephonyBaseTest.tel_test_wrap
8508    @test_tracker_info(uuid="2421d340-f9cb-47e7-ac3e-8581e141a6d0")
8509    def test_epdg_mo_mt_add_wcdma_swap_once_merge_drop_wfc_wifi_preferred(
8510            self):
8511        """Test swap and merge feature in epdg call.
8512
8513        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
8514        PhoneC (WCDMA) call PhoneA (epdg), accept on PhoneA.
8515        Swap active call on PhoneA.
8516        Merge calls to conference on PhoneA.
8517        Hangup on PhoneC, check call continues between AB.
8518        Hangup on PhoneB, check A ends.
8519
8520        """
8521        ads = self.android_devices
8522
8523        tasks = [(phone_setup_iwlan,
8524                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8525                   self.wifi_network_ssid, self.wifi_network_pass)),
8526                 (phone_setup_voice_3g, (self.log, ads[1])),
8527                 (phone_setup_voice_3g, (self.log, ads[2]))]
8528        if not multithread_func(self.log, tasks):
8529            self.log.error("Phone Failed to Set Up Properly.")
8530            return False
8531
8532        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_wcdma_swap_x(1)
8533        if call_ab_id is None or call_ac_id is None:
8534            return False
8535
8536        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8537
8538    @TelephonyBaseTest.tel_test_wrap
8539    @test_tracker_info(uuid="7c1f6008-cf59-4e63-9285-3cf1c26bc0aa")
8540    def test_epdg_mo_mt_add_wcdma_swap_twice_merge_drop_wfc_wifi_only(self):
8541        """Test swap and merge feature in epdg call.
8542
8543        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
8544        PhoneC (WCDMA) call PhoneA (epdg), accept on PhoneA.
8545        Swap active call on PhoneA.
8546        Swap active call on PhoneA.
8547        Merge calls to conference on PhoneA.
8548        Hangup on PhoneC, check call continues between AB.
8549        Hangup on PhoneB, check A ends.
8550
8551        """
8552        ads = self.android_devices
8553
8554        tasks = [(phone_setup_iwlan,
8555                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8556                   self.wifi_network_ssid, self.wifi_network_pass)),
8557                 (phone_setup_voice_3g, (self.log, ads[1])),
8558                 (phone_setup_voice_3g, (self.log, ads[2]))]
8559        if not multithread_func(self.log, tasks):
8560            self.log.error("Phone Failed to Set Up Properly.")
8561            return False
8562
8563        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_wcdma_swap_x(2)
8564        if call_ab_id is None or call_ac_id is None:
8565            return False
8566
8567        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8568
8569    @TelephonyBaseTest.tel_test_wrap
8570    @test_tracker_info(uuid="be153f3d-0707-45d0-9ddd-4aa696e0e536")
8571    def test_epdg_mo_mt_add_wcdma_swap_twice_merge_drop_wfc_wifi_preferred(
8572            self):
8573        """Test swap and merge feature in epdg call.
8574
8575        PhoneA (epdg) call PhoneB (WCDMA), accept on PhoneB.
8576        PhoneC (WCDMA) call PhoneA (epdg), accept on PhoneA.
8577        Swap active call on PhoneA.
8578        Swap active call on PhoneA.
8579        Merge calls to conference on PhoneA.
8580        Hangup on PhoneC, check call continues between AB.
8581        Hangup on PhoneB, check A ends.
8582
8583        """
8584        ads = self.android_devices
8585
8586        tasks = [(phone_setup_iwlan,
8587                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8588                   self.wifi_network_ssid, self.wifi_network_pass)),
8589                 (phone_setup_voice_3g, (self.log, ads[1])),
8590                 (phone_setup_voice_3g, (self.log, ads[2]))]
8591        if not multithread_func(self.log, tasks):
8592            self.log.error("Phone Failed to Set Up Properly.")
8593            return False
8594
8595        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_wcdma_swap_x(2)
8596        if call_ab_id is None or call_ac_id is None:
8597            return False
8598
8599        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8600
8601    @TelephonyBaseTest.tel_test_wrap
8602    @test_tracker_info(uuid="7235c917-a2d4-4561-bda5-630171053f8f")
8603    def test_epdg_mo_mo_add_1x_swap_once_merge_drop_wfc_wifi_only(self):
8604        """Test swap and merge feature in epdg call.
8605
8606        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
8607        PhoneA (epdg) call PhoneC (1x), accept on PhoneC.
8608        Swap active call on PhoneA.
8609        Merge calls to conference on PhoneA.
8610        Hangup on PhoneC, check call continues between AB.
8611        Hangup on PhoneB, check A ends.
8612
8613        """
8614        ads = self.android_devices
8615
8616        tasks = [(phone_setup_iwlan,
8617                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8618                   self.wifi_network_ssid, self.wifi_network_pass)),
8619                 (phone_setup_voice_3g, (self.log, ads[1])),
8620                 (phone_setup_voice_3g, (self.log, ads[2]))]
8621        if not multithread_func(self.log, tasks):
8622            self.log.error("Phone Failed to Set Up Properly.")
8623            return False
8624
8625        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_1x_swap_x(1)
8626        if call_ab_id is None or call_ac_id is None:
8627            return False
8628
8629        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8630
8631    @TelephonyBaseTest.tel_test_wrap
8632    @test_tracker_info(uuid="8e52b9a4-c0d1-4dcd-9359-746354124763")
8633    def test_epdg_mo_mo_add_1x_swap_once_merge_drop_wfc_wifi_preferred(self):
8634        """Test swap and merge feature in epdg call.
8635
8636        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
8637        PhoneA (epdg) call PhoneC (1x), accept on PhoneC.
8638        Swap active call on PhoneA.
8639        Merge calls to conference on PhoneA.
8640        Hangup on PhoneC, check call continues between AB.
8641        Hangup on PhoneB, check A ends.
8642
8643        """
8644        ads = self.android_devices
8645
8646        tasks = [(phone_setup_iwlan,
8647                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8648                   self.wifi_network_ssid, self.wifi_network_pass)),
8649                 (phone_setup_voice_3g, (self.log, ads[1])),
8650                 (phone_setup_voice_3g, (self.log, ads[2]))]
8651        if not multithread_func(self.log, tasks):
8652            self.log.error("Phone Failed to Set Up Properly.")
8653            return False
8654
8655        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_1x_swap_x(1)
8656        if call_ab_id is None or call_ac_id is None:
8657            return False
8658
8659        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8660
8661    @TelephonyBaseTest.tel_test_wrap
8662    @test_tracker_info(uuid="49a4440f-40a1-4518-810a-6ba9f1fbc243")
8663    def test_epdg_mo_mo_add_1x_swap_twice_merge_drop_wfc_wifi_only(self):
8664        """Test swap and merge feature in epdg call.
8665
8666        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
8667        PhoneA (epdg) call PhoneC (1x), accept on PhoneC.
8668        Swap active call on PhoneA.
8669        Swap active call on PhoneA.
8670        Merge calls to conference on PhoneA.
8671        Hangup on PhoneC, check call continues between AB.
8672        Hangup on PhoneB, check A ends.
8673
8674        """
8675        ads = self.android_devices
8676
8677        tasks = [(phone_setup_iwlan,
8678                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8679                   self.wifi_network_ssid, self.wifi_network_pass)),
8680                 (phone_setup_voice_3g, (self.log, ads[1])),
8681                 (phone_setup_voice_3g, (self.log, ads[2]))]
8682        if not multithread_func(self.log, tasks):
8683            self.log.error("Phone Failed to Set Up Properly.")
8684            return False
8685
8686        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_1x_swap_x(2)
8687        if call_ab_id is None or call_ac_id is None:
8688            return False
8689
8690        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8691
8692    @TelephonyBaseTest.tel_test_wrap
8693    @test_tracker_info(uuid="9d05bde3-50ac-4a49-a0db-2181c9b5a10f")
8694    def test_epdg_mo_mo_add_1x_swap_twice_merge_drop_wfc_wifi_preferred(self):
8695        """Test swap and merge feature in epdg call.
8696
8697        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
8698        PhoneA (epdg) call PhoneC (1x), accept on PhoneC.
8699        Swap active call on PhoneA.
8700        Swap active call on PhoneA.
8701        Merge calls to conference on PhoneA.
8702        Hangup on PhoneC, check call continues between AB.
8703        Hangup on PhoneB, check A ends.
8704
8705        """
8706        ads = self.android_devices
8707
8708        tasks = [(phone_setup_iwlan,
8709                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8710                   self.wifi_network_ssid, self.wifi_network_pass)),
8711                 (phone_setup_voice_3g, (self.log, ads[1])),
8712                 (phone_setup_voice_3g, (self.log, ads[2]))]
8713        if not multithread_func(self.log, tasks):
8714            self.log.error("Phone Failed to Set Up Properly.")
8715            return False
8716
8717        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_1x_swap_x(2)
8718        if call_ab_id is None or call_ac_id is None:
8719            return False
8720
8721        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8722
8723    @TelephonyBaseTest.tel_test_wrap
8724    @test_tracker_info(uuid="5c44eb64-b184-417a-97c9-8c22c48fb731")
8725    def test_epdg_mo_mt_add_1x_swap_once_merge_drop_wfc_wifi_only(self):
8726        """Test swap and merge feature in epdg call.
8727
8728        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
8729        PhoneC (1x) call PhoneA (epdg), accept on PhoneA.
8730        Swap active call on PhoneA.
8731        Merge calls to conference on PhoneA.
8732        Hangup on PhoneC, check call continues between AB.
8733        Hangup on PhoneB, check A ends.
8734
8735        """
8736        ads = self.android_devices
8737
8738        tasks = [(phone_setup_iwlan,
8739                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8740                   self.wifi_network_ssid, self.wifi_network_pass)),
8741                 (phone_setup_voice_3g, (self.log, ads[1])),
8742                 (phone_setup_voice_3g, (self.log, ads[2]))]
8743        if not multithread_func(self.log, tasks):
8744            self.log.error("Phone Failed to Set Up Properly.")
8745            return False
8746
8747        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_1x_swap_x(1)
8748        if call_ab_id is None or call_ac_id is None:
8749            return False
8750
8751        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8752
8753    @TelephonyBaseTest.tel_test_wrap
8754    @test_tracker_info(uuid="e16e2e81-1b59-4b02-b601-bb27b62d6468")
8755    def test_epdg_mo_mt_add_1x_swap_once_merge_drop_wfc_wifi_preferred(self):
8756        """Test swap and merge feature in epdg call.
8757
8758        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
8759        PhoneC (1x) call PhoneA (epdg), accept on PhoneA.
8760        Swap active call on PhoneA.
8761        Merge calls to conference on PhoneA.
8762        Hangup on PhoneC, check call continues between AB.
8763        Hangup on PhoneB, check A ends.
8764
8765        """
8766        ads = self.android_devices
8767
8768        tasks = [(phone_setup_iwlan,
8769                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8770                   self.wifi_network_ssid, self.wifi_network_pass)),
8771                 (phone_setup_voice_3g, (self.log, ads[1])),
8772                 (phone_setup_voice_3g, (self.log, ads[2]))]
8773        if not multithread_func(self.log, tasks):
8774            self.log.error("Phone Failed to Set Up Properly.")
8775            return False
8776
8777        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_1x_swap_x(1)
8778        if call_ab_id is None or call_ac_id is None:
8779            return False
8780
8781        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8782
8783    @TelephonyBaseTest.tel_test_wrap
8784    @test_tracker_info(uuid="fd4c3b72-ea2d-4cd4-af79-b93635eda8b8")
8785    def test_epdg_mo_mt_add_1x_swap_twice_merge_drop_wfc_wifi_only(self):
8786        """Test swap and merge feature in epdg call.
8787
8788        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
8789        PhoneC (1x) call PhoneA (epdg), accept on PhoneA.
8790        Swap active call on PhoneA.
8791        Swap active call on PhoneA.
8792        Merge calls to conference on PhoneA.
8793        Hangup on PhoneC, check call continues between AB.
8794        Hangup on PhoneB, check A ends.
8795
8796        """
8797        ads = self.android_devices
8798
8799        tasks = [(phone_setup_iwlan,
8800                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8801                   self.wifi_network_ssid, self.wifi_network_pass)),
8802                 (phone_setup_voice_3g, (self.log, ads[1])),
8803                 (phone_setup_voice_3g, (self.log, ads[2]))]
8804        if not multithread_func(self.log, tasks):
8805            self.log.error("Phone Failed to Set Up Properly.")
8806            return False
8807
8808        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_1x_swap_x(2)
8809        if call_ab_id is None or call_ac_id is None:
8810            return False
8811
8812        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8813
8814    @TelephonyBaseTest.tel_test_wrap
8815    @test_tracker_info(uuid="a33d7b2b-cc22-40c3-9689-a2a14642396d")
8816    def test_epdg_mo_mt_add_1x_swap_twice_merge_drop_wfc_wifi_preferred(self):
8817        """Test swap and merge feature in epdg call.
8818
8819        PhoneA (epdg) call PhoneB (1x), accept on PhoneB.
8820        PhoneC (1x) call PhoneA (epdg), accept on PhoneA.
8821        Swap active call on PhoneA.
8822        Swap active call on PhoneA.
8823        Merge calls to conference on PhoneA.
8824        Hangup on PhoneC, check call continues between AB.
8825        Hangup on PhoneB, check A ends.
8826
8827        """
8828        ads = self.android_devices
8829
8830        tasks = [(phone_setup_iwlan,
8831                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8832                   self.wifi_network_ssid, self.wifi_network_pass)),
8833                 (phone_setup_voice_3g, (self.log, ads[1])),
8834                 (phone_setup_voice_3g, (self.log, ads[2]))]
8835        if not multithread_func(self.log, tasks):
8836            self.log.error("Phone Failed to Set Up Properly.")
8837            return False
8838
8839        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_1x_swap_x(2)
8840        if call_ab_id is None or call_ac_id is None:
8841            return False
8842
8843        return self._test_epdg_conference_merge_drop(call_ab_id, call_ac_id)
8844
8845    @TelephonyBaseTest.tel_test_wrap
8846    @test_tracker_info(uuid="7839c6a3-6797-4cd0-a918-c7d317881e3d")
8847    def test_epdg_mo_mo_add_epdg_swap_twice_drop_held_wfc_wifi_only(self):
8848        """Test swap feature in epdg call.
8849
8850        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
8851        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
8852        Swap active call on PhoneA.
8853        Swap active call on PhoneA.
8854        Hangup call from PhoneB, check if call continues between AC.
8855
8856        """
8857        ads = self.android_devices
8858
8859        tasks = [(phone_setup_iwlan,
8860                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8861                   self.wifi_network_ssid, self.wifi_network_pass)),
8862                 (phone_setup_iwlan,
8863                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
8864                   self.wifi_network_ssid, self.wifi_network_pass)),
8865                 (phone_setup_iwlan,
8866                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
8867                   self.wifi_network_ssid, self.wifi_network_pass))]
8868        if not multithread_func(self.log, tasks):
8869            self.log.error("Phone Failed to Set Up Properly.")
8870            return False
8871
8872        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(2)
8873        if call_ab_id is None or call_ac_id is None:
8874            return False
8875
8876        return self._three_phone_hangup_call_verify_call_state(
8877            ad_hangup=ads[1],
8878            ad_verify=ads[0],
8879            call_id=call_ac_id,
8880            call_state=CALL_STATE_ACTIVE,
8881            ads_active=[ads[0], ads[2]])
8882
8883    @TelephonyBaseTest.tel_test_wrap
8884    @test_tracker_info(uuid="3f4e761e-8fa2-4b85-bc11-8150532b7686")
8885    def test_epdg_mo_mo_add_epdg_swap_twice_drop_held_wfc_wifi_preferred(self):
8886        """Test swap feature in epdg call.
8887
8888        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
8889        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
8890        Swap active call on PhoneA.
8891        Swap active call on PhoneA.
8892        Hangup call from PhoneB, check if call continues between AC.
8893
8894        """
8895        ads = self.android_devices
8896
8897        tasks = [(phone_setup_iwlan,
8898                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8899                   self.wifi_network_ssid, self.wifi_network_pass)),
8900                 (phone_setup_iwlan,
8901                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
8902                   self.wifi_network_ssid, self.wifi_network_pass)),
8903                 (phone_setup_iwlan,
8904                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
8905                   self.wifi_network_ssid, self.wifi_network_pass))]
8906        if not multithread_func(self.log, tasks):
8907            self.log.error("Phone Failed to Set Up Properly.")
8908            return False
8909
8910        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(2)
8911        if call_ab_id is None or call_ac_id is None:
8912            return False
8913
8914        return self._three_phone_hangup_call_verify_call_state(
8915            ad_hangup=ads[1],
8916            ad_verify=ads[0],
8917            call_id=call_ac_id,
8918            call_state=CALL_STATE_ACTIVE,
8919            ads_active=[ads[0], ads[2]])
8920
8921    @TelephonyBaseTest.tel_test_wrap
8922    @test_tracker_info(uuid="9fd4f171-9eea-4fc7-91f1-d3c7f08a5fad")
8923    def test_epdg_mo_mo_add_epdg_swap_twice_drop_active_wfc_wifi_only(self):
8924        """Test swap feature in epdg call.
8925
8926        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
8927        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
8928        Swap active call on PhoneA.
8929        Swap active call on PhoneA.
8930        Hangup call from PhoneC, check if call continues between AB.
8931
8932        """
8933        ads = self.android_devices
8934
8935        tasks = [(phone_setup_iwlan,
8936                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
8937                   self.wifi_network_ssid, self.wifi_network_pass)),
8938                 (phone_setup_iwlan,
8939                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
8940                   self.wifi_network_ssid, self.wifi_network_pass)),
8941                 (phone_setup_iwlan,
8942                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
8943                   self.wifi_network_ssid, self.wifi_network_pass))]
8944        if not multithread_func(self.log, tasks):
8945            self.log.error("Phone Failed to Set Up Properly.")
8946            return False
8947
8948        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(2)
8949        if call_ab_id is None or call_ac_id is None:
8950            return False
8951
8952        return self._three_phone_hangup_call_verify_call_state(
8953            ad_hangup=ads[2],
8954            ad_verify=ads[0],
8955            call_id=call_ab_id,
8956            call_state=self._get_expected_call_state(ads[0]),
8957            ads_active=[ads[0], ads[1]])
8958
8959    @TelephonyBaseTest.tel_test_wrap
8960    @test_tracker_info(uuid="8b97d6b9-253a-4ab7-8afb-126df71fee41")
8961    def test_epdg_mo_mo_add_epdg_swap_twice_drop_active_wfc_wifi_preferred(
8962            self):
8963        """Test swap feature in epdg call.
8964
8965        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
8966        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
8967        Swap active call on PhoneA.
8968        Swap active call on PhoneA.
8969        Hangup call from PhoneC, check if call continues between AB.
8970
8971        """
8972        ads = self.android_devices
8973
8974        tasks = [(phone_setup_iwlan,
8975                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
8976                   self.wifi_network_ssid, self.wifi_network_pass)),
8977                 (phone_setup_iwlan,
8978                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
8979                   self.wifi_network_ssid, self.wifi_network_pass)),
8980                 (phone_setup_iwlan,
8981                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
8982                   self.wifi_network_ssid, self.wifi_network_pass))]
8983        if not multithread_func(self.log, tasks):
8984            self.log.error("Phone Failed to Set Up Properly.")
8985            return False
8986
8987        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(2)
8988        if call_ab_id is None or call_ac_id is None:
8989            return False
8990
8991        return self._three_phone_hangup_call_verify_call_state(
8992            ad_hangup=ads[2],
8993            ad_verify=ads[0],
8994            call_id=call_ab_id,
8995            call_state=self._get_expected_call_state(ads[0]),
8996            ads_active=[ads[0], ads[1]])
8997
8998    @TelephonyBaseTest.tel_test_wrap
8999    @test_tracker_info(uuid="6617e779-c987-41dd-acda-ff132662ccf0")
9000    def test_epdg_mo_mo_add_epdg_swap_twice_drop_active_apm_wifi_preferred(
9001            self):
9002        """Test swap feature in epdg call.
9003
9004        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9005        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
9006        Swap active call on PhoneA.
9007        Swap active call on PhoneA.
9008        Hangup call from PhoneC, check if call continues between AB.
9009
9010        """
9011        ads = self.android_devices
9012
9013        tasks = [(phone_setup_iwlan,
9014                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
9015                   self.wifi_network_ssid, self.wifi_network_pass)),
9016                 (phone_setup_iwlan,
9017                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
9018                   self.wifi_network_ssid, self.wifi_network_pass)),
9019                 (phone_setup_iwlan,
9020                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
9021                   self.wifi_network_ssid, self.wifi_network_pass))]
9022        if not multithread_func(self.log, tasks):
9023            self.log.error("Phone Failed to Set Up Properly.")
9024            return False
9025
9026        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(2)
9027        if call_ab_id is None or call_ac_id is None:
9028            return False
9029
9030        return self._three_phone_hangup_call_verify_call_state(
9031            ad_hangup=ads[2],
9032            ad_verify=ads[0],
9033            call_id=call_ab_id,
9034            call_state=self._get_expected_call_state(ads[0]),
9035            ads_active=[ads[0], ads[1]])
9036
9037    @TelephonyBaseTest.tel_test_wrap
9038    @test_tracker_info(uuid="f8b61289-ccc5-4adf-b291-94c73925edb3")
9039    def test_epdg_mo_mt_add_epdg_swap_twice_drop_held_wfc_wifi_only(self):
9040        """Test swap feature in epdg call.
9041
9042        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9043        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9044        Swap active call on PhoneA.
9045        Swap active call on PhoneA.
9046        Hangup call from PhoneB, check if call continues between AC.
9047
9048        """
9049        ads = self.android_devices
9050
9051        tasks = [(phone_setup_iwlan,
9052                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
9053                   self.wifi_network_ssid, self.wifi_network_pass)),
9054                 (phone_setup_iwlan,
9055                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
9056                   self.wifi_network_ssid, self.wifi_network_pass)),
9057                 (phone_setup_iwlan,
9058                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
9059                   self.wifi_network_ssid, self.wifi_network_pass))]
9060        if not multithread_func(self.log, tasks):
9061            self.log.error("Phone Failed to Set Up Properly.")
9062            return False
9063
9064        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(2)
9065        if call_ab_id is None or call_ac_id is None:
9066            return False
9067
9068        return self._three_phone_hangup_call_verify_call_state(
9069            ad_hangup=ads[1],
9070            ad_verify=ads[0],
9071            call_id=call_ac_id,
9072            call_state=CALL_STATE_ACTIVE,
9073            ads_active=[ads[0], ads[2]])
9074
9075    @TelephonyBaseTest.tel_test_wrap
9076    @test_tracker_info(uuid="bb975203-7cee-4fbc-ad4a-da473413e410")
9077    def test_epdg_mo_mt_add_epdg_swap_twice_drop_held_wfc_wifi_preferred(self):
9078        """Test swap feature in epdg call.
9079
9080        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9081        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9082        Swap active call on PhoneA.
9083        Swap active call on PhoneA.
9084        Hangup call from PhoneB, check if call continues between AC.
9085
9086        """
9087        ads = self.android_devices
9088
9089        tasks = [(phone_setup_iwlan,
9090                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
9091                   self.wifi_network_ssid, self.wifi_network_pass)),
9092                 (phone_setup_iwlan,
9093                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
9094                   self.wifi_network_ssid, self.wifi_network_pass)),
9095                 (phone_setup_iwlan,
9096                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
9097                   self.wifi_network_ssid, self.wifi_network_pass))]
9098        if not multithread_func(self.log, tasks):
9099            self.log.error("Phone Failed to Set Up Properly.")
9100            return False
9101
9102        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(2)
9103        if call_ab_id is None or call_ac_id is None:
9104            return False
9105
9106        return self._three_phone_hangup_call_verify_call_state(
9107            ad_hangup=ads[1],
9108            ad_verify=ads[0],
9109            call_id=call_ac_id,
9110            call_state=CALL_STATE_ACTIVE,
9111            ads_active=[ads[0], ads[2]])
9112
9113    @TelephonyBaseTest.tel_test_wrap
9114    @test_tracker_info(uuid="593f6034-fd15-4b1d-a9fe-c4331e6a7f72")
9115    def test_epdg_mo_mt_add_epdg_swap_twice_drop_active_wfc_wifi_only(self):
9116        """Test swap feature in epdg call.
9117
9118        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9119        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9120        Swap active call on PhoneA.
9121        Swap active call on PhoneA.
9122        Hangup call from PhoneC, check if call continues between AB.
9123
9124        """
9125        ads = self.android_devices
9126
9127        tasks = [(phone_setup_iwlan,
9128                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
9129                   self.wifi_network_ssid, self.wifi_network_pass)),
9130                 (phone_setup_iwlan,
9131                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
9132                   self.wifi_network_ssid, self.wifi_network_pass)),
9133                 (phone_setup_iwlan,
9134                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
9135                   self.wifi_network_ssid, self.wifi_network_pass))]
9136        if not multithread_func(self.log, tasks):
9137            self.log.error("Phone Failed to Set Up Properly.")
9138            return False
9139
9140        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(2)
9141        if call_ab_id is None or call_ac_id is None:
9142            return False
9143
9144        return self._three_phone_hangup_call_verify_call_state(
9145            ad_hangup=ads[2],
9146            ad_verify=ads[0],
9147            call_id=call_ab_id,
9148            call_state=self._get_expected_call_state(ads[0]),
9149            ads_active=[ads[0], ads[1]])
9150
9151    @TelephonyBaseTest.tel_test_wrap
9152    @test_tracker_info(uuid="adc3fb00-543e-44ec-905b-0eea52790896")
9153    def test_epdg_mo_mt_add_epdg_swap_twice_drop_active_wfc_wifi_preferred(
9154            self):
9155        """Test swap feature in epdg call.
9156
9157        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9158        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9159        Swap active call on PhoneA.
9160        Swap active call on PhoneA.
9161        Hangup call from PhoneC, check if call continues between AB.
9162
9163        """
9164        ads = self.android_devices
9165
9166        tasks = [(phone_setup_iwlan,
9167                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
9168                   self.wifi_network_ssid, self.wifi_network_pass)),
9169                 (phone_setup_iwlan,
9170                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
9171                   self.wifi_network_ssid, self.wifi_network_pass)),
9172                 (phone_setup_iwlan,
9173                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
9174                   self.wifi_network_ssid, self.wifi_network_pass))]
9175        if not multithread_func(self.log, tasks):
9176            self.log.error("Phone Failed to Set Up Properly.")
9177            return False
9178
9179        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(2)
9180        if call_ab_id is None or call_ac_id is None:
9181            return False
9182
9183        return self._three_phone_hangup_call_verify_call_state(
9184            ad_hangup=ads[2],
9185            ad_verify=ads[0],
9186            call_id=call_ab_id,
9187            call_state=self._get_expected_call_state(ads[0]),
9188            ads_active=[ads[0], ads[1]])
9189
9190    @TelephonyBaseTest.tel_test_wrap
9191    @test_tracker_info(uuid="e96aac52-c536-4a08-9e6a-8bf598db9267")
9192    def test_epdg_mo_mo_add_epdg_swap_once_drop_held_wfc_wifi_only(self):
9193        """Test swap feature in epdg call.
9194
9195        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9196        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
9197        Swap active call on PhoneA.
9198        Hangup call from PhoneC, check if call continues between AB.
9199
9200        """
9201        ads = self.android_devices
9202
9203        tasks = [(phone_setup_iwlan,
9204                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
9205                   self.wifi_network_ssid, self.wifi_network_pass)),
9206                 (phone_setup_iwlan,
9207                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
9208                   self.wifi_network_ssid, self.wifi_network_pass)),
9209                 (phone_setup_iwlan,
9210                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
9211                   self.wifi_network_ssid, self.wifi_network_pass))]
9212        if not multithread_func(self.log, tasks):
9213            self.log.error("Phone Failed to Set Up Properly.")
9214            return False
9215
9216        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(1)
9217        if call_ab_id is None or call_ac_id is None:
9218            return False
9219
9220        return self._three_phone_hangup_call_verify_call_state(
9221            ad_hangup=ads[2],
9222            ad_verify=ads[0],
9223            call_id=call_ab_id,
9224            call_state=CALL_STATE_ACTIVE,
9225            ads_active=[ads[0], ads[1]])
9226
9227    @TelephonyBaseTest.tel_test_wrap
9228    @test_tracker_info(uuid="74efa176-1ff2-4b06-9739-06f67009cb5d")
9229    def test_epdg_mo_mo_add_epdg_swap_once_drop_held_wfc_wifi_preferred(self):
9230        """Test swap feature in epdg call.
9231
9232        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9233        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
9234        Swap active call on PhoneA.
9235        Hangup call from PhoneC, check if call continues between AB.
9236
9237        """
9238        ads = self.android_devices
9239
9240        tasks = [(phone_setup_iwlan,
9241                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
9242                   self.wifi_network_ssid, self.wifi_network_pass)),
9243                 (phone_setup_iwlan,
9244                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
9245                   self.wifi_network_ssid, self.wifi_network_pass)),
9246                 (phone_setup_iwlan,
9247                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
9248                   self.wifi_network_ssid, self.wifi_network_pass))]
9249        if not multithread_func(self.log, tasks):
9250            self.log.error("Phone Failed to Set Up Properly.")
9251            return False
9252
9253        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(1)
9254        if call_ab_id is None or call_ac_id is None:
9255            return False
9256
9257        return self._three_phone_hangup_call_verify_call_state(
9258            ad_hangup=ads[2],
9259            ad_verify=ads[0],
9260            call_id=call_ab_id,
9261            call_state=CALL_STATE_ACTIVE,
9262            ads_active=[ads[0], ads[1]])
9263
9264    @TelephonyBaseTest.tel_test_wrap
9265    @test_tracker_info(uuid="dfcdeebe-dada-4722-8880-5b3877d0809b")
9266    def test_epdg_mo_mo_add_epdg_swap_once_drop_active_wfc_wifi_only(self):
9267        """Test swap feature in epdg call.
9268
9269        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9270        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
9271        Swap active call on PhoneA.
9272        Hangup call from PhoneB, check if call continues between AC.
9273
9274        """
9275        ads = self.android_devices
9276
9277        tasks = [(phone_setup_iwlan,
9278                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
9279                   self.wifi_network_ssid, self.wifi_network_pass)),
9280                 (phone_setup_iwlan,
9281                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
9282                   self.wifi_network_ssid, self.wifi_network_pass)),
9283                 (phone_setup_iwlan,
9284                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
9285                   self.wifi_network_ssid, self.wifi_network_pass))]
9286        if not multithread_func(self.log, tasks):
9287            self.log.error("Phone Failed to Set Up Properly.")
9288            return False
9289
9290        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(1)
9291        if call_ab_id is None or call_ac_id is None:
9292            return False
9293
9294        return self._three_phone_hangup_call_verify_call_state(
9295            ad_hangup=ads[1],
9296            ad_verify=ads[0],
9297            call_id=call_ac_id,
9298            call_state=self._get_expected_call_state(ads[0]),
9299            ads_active=[ads[0], ads[2]])
9300
9301    @TelephonyBaseTest.tel_test_wrap
9302    @test_tracker_info(uuid="b9658029-90da-4df8-bbb2-9c08eb3a3a8c")
9303    def test_epdg_mo_mo_add_epdg_swap_once_drop_active_wfc_wifi_preferred(
9304            self):
9305        """Test swap feature in epdg call.
9306
9307        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9308        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
9309        Swap active call on PhoneA.
9310        Hangup call from PhoneB, check if call continues between AC.
9311
9312        """
9313        ads = self.android_devices
9314
9315        tasks = [(phone_setup_iwlan,
9316                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
9317                   self.wifi_network_ssid, self.wifi_network_pass)),
9318                 (phone_setup_iwlan,
9319                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
9320                   self.wifi_network_ssid, self.wifi_network_pass)),
9321                 (phone_setup_iwlan,
9322                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
9323                   self.wifi_network_ssid, self.wifi_network_pass))]
9324        if not multithread_func(self.log, tasks):
9325            self.log.error("Phone Failed to Set Up Properly.")
9326            return False
9327
9328        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(1)
9329        if call_ab_id is None or call_ac_id is None:
9330            return False
9331
9332        return self._three_phone_hangup_call_verify_call_state(
9333            ad_hangup=ads[1],
9334            ad_verify=ads[0],
9335            call_id=call_ac_id,
9336            call_state=self._get_expected_call_state(ads[0]),
9337            ads_active=[ads[0], ads[2]])
9338
9339    @TelephonyBaseTest.tel_test_wrap
9340    @test_tracker_info(uuid="3381c8e0-cdf1-47d1-8a17-58592f3cd6e6")
9341    def test_epdg_mo_mo_add_epdg_swap_once_drop_active_apm_wfc_wifi_preferred(
9342            self):
9343        """Test swap feature in epdg call.
9344
9345        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9346        PhoneA (epdg) call PhoneC (epdg), accept on PhoneC.
9347        Swap active call on PhoneA.
9348        Hangup call from PhoneB, check if call continues between AC.
9349
9350        """
9351        ads = self.android_devices
9352
9353        tasks = [(phone_setup_iwlan,
9354                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
9355                   self.wifi_network_ssid, self.wifi_network_pass)),
9356                 (phone_setup_iwlan,
9357                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
9358                   self.wifi_network_ssid, self.wifi_network_pass)),
9359                 (phone_setup_iwlan,
9360                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
9361                   self.wifi_network_ssid, self.wifi_network_pass))]
9362        if not multithread_func(self.log, tasks):
9363            self.log.error("Phone Failed to Set Up Properly.")
9364            return False
9365
9366        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(1)
9367        if call_ab_id is None or call_ac_id is None:
9368            return False
9369
9370        return self._three_phone_hangup_call_verify_call_state(
9371            ad_hangup=ads[1],
9372            ad_verify=ads[0],
9373            call_id=call_ac_id,
9374            call_state=self._get_expected_call_state(ads[0]),
9375            ads_active=[ads[0], ads[2]])
9376
9377    @TelephonyBaseTest.tel_test_wrap
9378    @test_tracker_info(uuid="fb655f12-aabe-45bf-8020-61c21ada9440")
9379    def test_epdg_mo_mt_add_epdg_swap_once_drop_held_wfc_wifi_only(self):
9380        """Test swap feature in epdg call.
9381
9382        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9383        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9384        Swap active call on PhoneA.
9385        Hangup call from PhoneC, check if call continues between AB.
9386
9387        """
9388        ads = self.android_devices
9389
9390        tasks = [(phone_setup_iwlan,
9391                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
9392                   self.wifi_network_ssid, self.wifi_network_pass)),
9393                 (phone_setup_iwlan,
9394                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
9395                   self.wifi_network_ssid, self.wifi_network_pass)),
9396                 (phone_setup_iwlan,
9397                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
9398                   self.wifi_network_ssid, self.wifi_network_pass))]
9399        if not multithread_func(self.log, tasks):
9400            self.log.error("Phone Failed to Set Up Properly.")
9401            return False
9402
9403        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
9404        if call_ab_id is None or call_ac_id is None:
9405            return False
9406        return self._three_phone_hangup_call_verify_call_state(
9407            ad_hangup=ads[2],
9408            ad_verify=ads[0],
9409            call_id=call_ab_id,
9410            call_state=CALL_STATE_ACTIVE,
9411            ads_active=[ads[0], ads[1]])
9412
9413    @TelephonyBaseTest.tel_test_wrap
9414    @test_tracker_info(uuid="35e7b36d-e2d5-42bd-99d9-dbc7986ef93a")
9415    def test_epdg_mo_mt_add_epdg_swap_once_drop_held_wfc_wifi_preferred(self):
9416        """Test swap feature in epdg call.
9417
9418        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9419        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9420        Swap active call on PhoneA.
9421        Hangup call from PhoneC, check if call continues between AB.
9422
9423        """
9424        ads = self.android_devices
9425
9426        tasks = [(phone_setup_iwlan,
9427                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
9428                   self.wifi_network_ssid, self.wifi_network_pass)),
9429                 (phone_setup_iwlan,
9430                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
9431                   self.wifi_network_ssid, self.wifi_network_pass)),
9432                 (phone_setup_iwlan,
9433                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
9434                   self.wifi_network_ssid, self.wifi_network_pass))]
9435        if not multithread_func(self.log, tasks):
9436            self.log.error("Phone Failed to Set Up Properly.")
9437            return False
9438
9439        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
9440        if call_ab_id is None or call_ac_id is None:
9441            return False
9442        return self._three_phone_hangup_call_verify_call_state(
9443            ad_hangup=ads[2],
9444            ad_verify=ads[0],
9445            call_id=call_ab_id,
9446            call_state=CALL_STATE_ACTIVE,
9447            ads_active=[ads[0], ads[1]])
9448
9449    @TelephonyBaseTest.tel_test_wrap
9450    @test_tracker_info(uuid="e959e668-8150-46c1-bf49-a1ab2a9f45a5")
9451    def test_epdg_mo_mt_add_epdg_swap_once_drop_held_apm_wifi_preferred(self):
9452        """Test swap feature in epdg call.
9453
9454        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9455        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9456        Swap active call on PhoneA.
9457        Hangup call from PhoneC, check if call continues between AB.
9458
9459        """
9460        ads = self.android_devices
9461
9462        tasks = [(phone_setup_iwlan,
9463                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
9464                   self.wifi_network_ssid, self.wifi_network_pass)),
9465                 (phone_setup_iwlan,
9466                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
9467                   self.wifi_network_ssid, self.wifi_network_pass)),
9468                 (phone_setup_iwlan,
9469                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
9470                   self.wifi_network_ssid, self.wifi_network_pass))]
9471        if not multithread_func(self.log, tasks):
9472            self.log.error("Phone Failed to Set Up Properly.")
9473            return False
9474
9475        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
9476        if call_ab_id is None or call_ac_id is None:
9477            return False
9478        return self._three_phone_hangup_call_verify_call_state(
9479            ad_hangup=ads[2],
9480            ad_verify=ads[0],
9481            call_id=call_ab_id,
9482            call_state=CALL_STATE_ACTIVE,
9483            ads_active=[ads[0], ads[1]])
9484
9485    @TelephonyBaseTest.tel_test_wrap
9486    @test_tracker_info(uuid="b9c47ccd-cc84-42cc-83f4-0a98c22c1d7a")
9487    def test_epdg_mo_mt_add_epdg_swap_once_drop_active_wfc_wifi_only(self):
9488        """Test swap feature in epdg call.
9489
9490        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9491        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9492        Swap active call on PhoneA.
9493        Hangup call from PhoneB, check if call continues between AC.
9494
9495        """
9496        ads = self.android_devices
9497
9498        tasks = [(phone_setup_iwlan,
9499                  (self.log, ads[0], False, WFC_MODE_WIFI_ONLY,
9500                   self.wifi_network_ssid, self.wifi_network_pass)),
9501                 (phone_setup_iwlan,
9502                  (self.log, ads[1], False, WFC_MODE_WIFI_ONLY,
9503                   self.wifi_network_ssid, self.wifi_network_pass)),
9504                 (phone_setup_iwlan,
9505                  (self.log, ads[2], False, WFC_MODE_WIFI_ONLY,
9506                   self.wifi_network_ssid, self.wifi_network_pass))]
9507        if not multithread_func(self.log, tasks):
9508            self.log.error("Phone Failed to Set Up Properly.")
9509            return False
9510
9511        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
9512        if call_ab_id is None or call_ac_id is None:
9513            return False
9514
9515        return self._three_phone_hangup_call_verify_call_state(
9516            ad_hangup=ads[1],
9517            ad_verify=ads[0],
9518            call_id=call_ac_id,
9519            call_state=self._get_expected_call_state(ads[0]),
9520            ads_active=[ads[0], ads[2]])
9521
9522    @TelephonyBaseTest.tel_test_wrap
9523    @test_tracker_info(uuid="273d521f-d11c-4956-ae51-33f69de87663")
9524    def test_epdg_mo_mt_add_epdg_swap_once_drop_active_wfc_wifi_preferred(
9525            self):
9526        """Test swap feature in epdg call.
9527
9528        PhoneA (epdg) call PhoneB (epdg), accept on PhoneB.
9529        PhoneC (epdg) call PhoneA (epdg), accept on PhoneA.
9530        Swap active call on PhoneA.
9531        Hangup call from PhoneB, check if call continues between AC.
9532
9533        """
9534        ads = self.android_devices
9535
9536        tasks = [(phone_setup_iwlan,
9537                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
9538                   self.wifi_network_ssid, self.wifi_network_pass)),
9539                 (phone_setup_iwlan,
9540                  (self.log, ads[1], False, WFC_MODE_WIFI_PREFERRED,
9541                   self.wifi_network_ssid, self.wifi_network_pass)),
9542                 (phone_setup_iwlan,
9543                  (self.log, ads[2], False, WFC_MODE_WIFI_PREFERRED,
9544                   self.wifi_network_ssid, self.wifi_network_pass))]
9545        if not multithread_func(self.log, tasks):
9546            self.log.error("Phone Failed to Set Up Properly.")
9547            return False
9548
9549        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
9550        if call_ab_id is None or call_ac_id is None:
9551            return False
9552
9553        return self._three_phone_hangup_call_verify_call_state(
9554            ad_hangup=ads[1],
9555            ad_verify=ads[0],
9556            call_id=call_ac_id,
9557            call_state=self._get_expected_call_state(ads[0]),
9558            ads_active=[ads[0], ads[2]])
9559
9560    def _test_gsm_mo_mo_add_swap_x(self, num_swaps):
9561        """Test swap feature in GSM call.
9562
9563        PhoneA (GSM) call PhoneB, accept on PhoneB.
9564        PhoneA (GSM) call PhoneC, accept on PhoneC.
9565        Swap active call on PhoneA. (N times)
9566
9567        Args:
9568            num_swaps: do swap for 'num_swaps' times.
9569                This value can be 0 (no swap operation).
9570
9571        Returns:
9572            call_ab_id, call_ac_id if succeed;
9573            None, None if failed.
9574
9575        """
9576        ads = self.android_devices
9577
9578        # make sure PhoneA is GSM phone before proceed.
9579        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
9580            ads[0].log.error("not GSM phone, abort wcdma swap test.")
9581            return None, None
9582
9583        call_ab_id = self._three_phone_call_mo_add_mo(
9584            [ads[0], ads[1], ads[2]], [
9585                phone_setup_voice_2g, phone_setup_voice_general,
9586                phone_setup_voice_general
9587            ], [is_phone_in_call_2g, None, None])
9588        if call_ab_id is None:
9589            self.log.error("Failed to get call_ab_id")
9590            return None, None
9591
9592        calls = ads[0].droid.telecomCallGetCallIds()
9593        ads[0].log.info("Calls in PhoneA %s", calls)
9594        if num_active_calls(self.log, ads[0]) != 2:
9595            return None, None
9596        if calls[0] == call_ab_id:
9597            call_ac_id = calls[1]
9598        else:
9599            call_ac_id = calls[0]
9600
9601        if num_swaps > 0:
9602            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
9603            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
9604                              num_swaps):
9605                self.log.error("Swap test failed.")
9606                return None, None
9607
9608        return call_ab_id, call_ac_id
9609
9610    def _test_gsm_mt_mt_add_swap_x(self, num_swaps):
9611        """Test swap feature in GSM call.
9612
9613        PhoneB call PhoneA (GSM), accept on PhoneA.
9614        PhoneC call PhoneA (GSM), accept on PhoneA.
9615        Swap active call on PhoneA. (N times)
9616
9617        Args:
9618            num_swaps: do swap for 'num_swaps' times.
9619                This value can be 0 (no swap operation).
9620
9621        Returns:
9622            call_ab_id, call_ac_id if succeed;
9623            None, None if failed.
9624
9625        """
9626        ads = self.android_devices
9627
9628        # make sure PhoneA is GSM phone before proceed.
9629        if (ads[0].droid.telephonyGetPhoneType() != PHONE_TYPE_GSM):
9630            ads[0].log.error("not GSM phone, abort wcdma swap test.")
9631            return None, None
9632
9633        call_ab_id = self._three_phone_call_mt_add_mt(
9634            [ads[0], ads[1], ads[2]], [
9635                phone_setup_voice_2g, phone_setup_voice_general,
9636                phone_setup_voice_general
9637            ], [is_phone_in_call_2g, None, None])
9638        if call_ab_id is None:
9639            self.log.error("Failed to get call_ab_id")
9640            return None, None
9641
9642        calls = ads[0].droid.telecomCallGetCallIds()
9643        ads[0].log.info("Calls in PhoneA %s", calls)
9644        if num_active_calls(self.log, ads[0]) != 2:
9645            return None, None
9646        if calls[0] == call_ab_id:
9647            call_ac_id = calls[1]
9648        else:
9649            call_ac_id = calls[0]
9650
9651        if num_swaps > 0:
9652            self.log.info("Step3: Begin Swap x%s test.", num_swaps)
9653            if not swap_calls(self.log, ads, call_ab_id, call_ac_id,
9654                              num_swaps):
9655                self.log.error("Swap test failed.")
9656                return None, None
9657
9658        return call_ab_id, call_ac_id
9659
9660    def _test_gsm_conference_merge_drop(self, call_ab_id, call_ac_id):
9661        """Test conference merge and drop in GSM call.
9662
9663        PhoneA in GSM call with PhoneB.
9664        PhoneA in GSM call with PhoneC.
9665        Merge calls to conference on PhoneA.
9666        Hangup on PhoneC, check call continues between AB.
9667        Hangup on PhoneB, check A ends.
9668
9669        Args:
9670            call_ab_id: call id for call_AB on PhoneA.
9671            call_ac_id: call id for call_AC on PhoneA.
9672
9673        Returns:
9674            True if succeed;
9675            False if failed.
9676        """
9677        ads = self.android_devices
9678
9679        self.log.info("Step4: Merge to Conf Call and verify Conf Call.")
9680        ads[0].droid.telecomCallJoinCallsInConf(call_ab_id, call_ac_id)
9681        time.sleep(WAIT_TIME_IN_CALL)
9682        calls = ads[0].droid.telecomCallGetCallIds()
9683        ads[0].log.info("Calls in PhoneA %s", calls)
9684        if num_active_calls(self.log, ads[0]) != 3:
9685            ads[0].log.error("Total number of call ids is not 3.")
9686            return False
9687        call_conf_id = None
9688        for call_id in calls:
9689            if call_id != call_ab_id and call_id != call_ac_id:
9690                call_conf_id = call_id
9691        if not call_conf_id:
9692            self.log.error("Merge call fail, no new conference call id.")
9693            return False
9694        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], True):
9695            return False
9696
9697        # Check if Conf Call is currently active
9698        if ads[0].droid.telecomCallGetCallState(
9699                call_conf_id) != CALL_STATE_ACTIVE:
9700            ads[0].log.error(
9701                "Call_id: %s, state: %s, expected: STATE_ACTIVE", call_conf_id,
9702                ads[0].droid.telecomCallGetCallState(call_conf_id))
9703            return False
9704
9705        self.log.info("Step5: End call on PhoneC and verify call continues.")
9706        if not self._hangup_call(ads[2], "PhoneC"):
9707            return False
9708        time.sleep(WAIT_TIME_IN_CALL)
9709        calls = ads[0].droid.telecomCallGetCallIds()
9710        ads[0].log.info("Calls in PhoneA %s", calls)
9711        if num_active_calls(self.log, ads[0]) != 1:
9712            return False
9713        if not verify_incall_state(self.log, [ads[0], ads[1]], True):
9714            return False
9715        if not verify_incall_state(self.log, [ads[2]], False):
9716            return False
9717
9718        self.log.info("Step6: End call on PhoneB and verify PhoneA end.")
9719        if not self._hangup_call(ads[1], "PhoneB"):
9720            return False
9721        time.sleep(WAIT_TIME_IN_CALL)
9722        if not verify_incall_state(self.log, [ads[0], ads[1], ads[2]], False):
9723            return False
9724        return True
9725
9726    @TelephonyBaseTest.tel_test_wrap
9727    @test_tracker_info(uuid="03eb38b1-bd7f-457e-8b80-d58651d82741")
9728    def test_gsm_mo_mo_add_merge_drop(self):
9729        """ Test Conf Call among three phones.
9730
9731        Call from PhoneA to PhoneB, accept on PhoneB.
9732        Call from PhoneA to PhoneC, accept on PhoneC.
9733        On PhoneA, merge to conference call.
9734        End call on PhoneC, verify call continues.
9735        End call on PhoneB, verify call end on PhoneA.
9736
9737        Returns:
9738            True if pass; False if fail.
9739        """
9740        call_ab_id, call_ac_id = self._test_gsm_mo_mo_add_swap_x(0)
9741        if call_ab_id is None or call_ac_id is None:
9742            return False
9743
9744        return self._test_gsm_conference_merge_drop(call_ab_id, call_ac_id)
9745
9746    @TelephonyBaseTest.tel_test_wrap
9747    @test_tracker_info(uuid="3286306f-4d66-48c4-9303-f691c53bcfe0")
9748    def test_gsm_mo_mo_add_swap_once_drop_held(self):
9749        """ Test Conf Call among three phones.
9750
9751        Call from PhoneA to PhoneB, accept on PhoneB.
9752        Call from PhoneA to PhoneC, accept on PhoneC.
9753        On PhoneA, swap active call.
9754        End call on PhoneB, verify call continues.
9755        End call on PhoneC, verify call end on PhoneA.
9756
9757        Returns:
9758            True if pass; False if fail.
9759        """
9760        ads = self.android_devices
9761        call_ab_id, call_ac_id = self._test_gsm_mo_mo_add_swap_x(1)
9762        if call_ab_id is None or call_ac_id is None:
9763            return False
9764
9765        return self._three_phone_hangup_call_verify_call_state(
9766            ad_hangup=ads[2],
9767            ad_verify=ads[0],
9768            call_id=call_ab_id,
9769            call_state=CALL_STATE_ACTIVE,
9770            ads_active=[ads[0], ads[1]])
9771
9772    @TelephonyBaseTest.tel_test_wrap
9773    @test_tracker_info(uuid="af4ff690-be2a-42d8-930a-8258fe81c77e")
9774    def test_gsm_mt_mt_add_merge_drop(self):
9775        """ Test Conf Call among three phones.
9776
9777        Call from PhoneB to PhoneA, accept on PhoneA.
9778        Call from PhoneC to PhoneA, accept on PhoneA.
9779        On PhoneA, merge to conference call.
9780        End call on PhoneC, verify call continues.
9781        End call on PhoneB, verify call end on PhoneA.
9782
9783        Returns:
9784            True if pass; False if fail.
9785        """
9786        call_ab_id, call_ac_id = self._test_gsm_mt_mt_add_swap_x(0)
9787        if call_ab_id is None or call_ac_id is None:
9788            return False
9789
9790        return self._test_gsm_conference_merge_drop(call_ab_id, call_ac_id)
9791
9792    @TelephonyBaseTest.tel_test_wrap
9793    @test_tracker_info(uuid="6b70902e-ca59-4d92-9bfe-2116dcc91213")
9794    def test_gsm_mo_mo_add_swap_twice_drop_active(self):
9795        """Test swap feature in GSM call.
9796
9797        PhoneA (GSM) call PhoneB, accept on PhoneB.
9798        PhoneA (GSM) call PhoneC, accept on PhoneC.
9799        Swap active call on PhoneA.
9800        Swap active call on PhoneA.
9801        Hangup call from PhoneC, check if call continues between AB.
9802
9803        """
9804        ads = self.android_devices
9805
9806        call_ab_id, call_ac_id = self._test_gsm_mo_mo_add_swap_x(1)
9807        if call_ab_id is None or call_ac_id is None:
9808            return False
9809
9810        return self._three_phone_hangup_call_verify_call_state(
9811            ad_hangup=ads[2],
9812            ad_verify=ads[0],
9813            call_id=call_ab_id,
9814            call_state=self._get_expected_call_state(ads[0]),
9815            ads_active=[ads[0], ads[1]])
9816
9817    @TelephonyBaseTest.tel_test_wrap
9818    @test_tracker_info(uuid="a9ddf5a7-8399-4a8c-abc9-b9235b0153b0")
9819    def test_epdg_mo_mo_add_epdg_merge_drop_second_call_from_participant_wfc_apm_wifi_preferred_no_cep(
9820            self):
9821        """ Test WFC Conference Call among three phones. No CEP.
9822
9823        Steps:
9824        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
9825        2. PhoneA (WFC APM WiFi Preferred) call PhoneC (WFC APM WiFi Preferred), accept on PhoneC.
9826        3. On PhoneA, merge to conference call (No CEP).
9827        4. End call on PhoneC, verify call continues.
9828        5. End call on PhoneB, verify call end on PhoneA.
9829
9830        Expected Results:
9831        3. Conference merged successfully.
9832        4. Drop calls succeeded. Call between A-B continues.
9833        5. Drop calls succeeded, all call participants drop.
9834
9835        Returns:
9836            True if pass; False if fail.
9837
9838        TAGS: Telephony, WFC, Conference, No_CEP
9839        Priority: 1
9840        """
9841        ads = self.android_devices
9842
9843        tasks = [(phone_setup_iwlan,
9844                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
9845                   self.wifi_network_ssid, self.wifi_network_pass)),
9846                 (phone_setup_iwlan,
9847                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
9848                   self.wifi_network_ssid, self.wifi_network_pass)),
9849                 (phone_setup_iwlan,
9850                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
9851                   self.wifi_network_ssid, self.wifi_network_pass))]
9852        if not multithread_func(self.log, tasks):
9853            self.log.error("Phone Failed to Set Up Properly.")
9854            return False
9855
9856        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(0)
9857        if call_ab_id is None or call_ac_id is None:
9858            return False
9859
9860        return self._test_ims_conference_merge_drop_second_call_no_cep(
9861            call_ab_id, call_ac_id)
9862
9863    @TelephonyBaseTest.tel_test_wrap
9864    @test_tracker_info(uuid="5aaff055-3329-4077-91e8-5707a0f6a309")
9865    def test_epdg_mo_mo_add_epdg_merge_drop_second_call_from_participant_wfc_apm_wifi_preferred_cep(
9866            self):
9867        """ Test WFC Conference Call among three phones. CEP enabled.
9868
9869        Steps
9870        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
9871        2. PhoneA (WFC APM WiFi Preferred) call PhoneC (WFC APM WiFi Preferred), accept on PhoneC.
9872        3. On PhoneA, merge to conference call (WFC CEP conference call).
9873        4. End call on PhoneC, verify call continues.
9874        5. End call on PhoneB, verify call end on PhoneA.
9875
9876        Expected Results:
9877        3. Conference merged successfully.
9878        4. Drop calls succeeded. Call between A-B continues.
9879        5. Drop calls succeeded, all call participants drop.
9880
9881        Returns:
9882            True if pass; False if fail.
9883
9884        TAGS: Telephony, WFC, Conference, CEP
9885        Priority: 1
9886        """
9887        ads = self.android_devices
9888
9889        tasks = [(phone_setup_iwlan,
9890                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
9891                   self.wifi_network_ssid, self.wifi_network_pass)),
9892                 (phone_setup_iwlan,
9893                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
9894                   self.wifi_network_ssid, self.wifi_network_pass)),
9895                 (phone_setup_iwlan,
9896                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
9897                   self.wifi_network_ssid, self.wifi_network_pass))]
9898        if not multithread_func(self.log, tasks):
9899            self.log.error("Phone Failed to Set Up Properly.")
9900            return False
9901
9902        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(0)
9903        if call_ab_id is None or call_ac_id is None:
9904            return False
9905
9906        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
9907            call_ab_id, call_ac_id)
9908
9909    @TelephonyBaseTest.tel_test_wrap
9910    @test_tracker_info(uuid="d3624dd8-20bd-4f6b-8a81-0c8671987b84")
9911    def test_epdg_mo_mo_add_epdg_merge_drop_second_call_from_host_wfc_apm_wifi_preferred_cep(
9912            self):
9913        """ Test WFC Conference Call among three phones. CEP enabled.
9914
9915        Steps:
9916        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
9917        2. PhoneA (WFC APM WiFi Preferred) call PhoneC (WFC APM WiFi Preferred), accept on PhoneC.
9918        3. On PhoneA, merge to conference call (WFC CEP conference call).
9919        4. On PhoneA disconnect call between A-C, verify call continues.
9920        5. On PhoneA disconnect call between A-B, verify call continues.
9921
9922        Expected Results:
9923        3. Conference merged successfully.
9924        4. Drop calls succeeded. Call between A-B continues.
9925        5. Drop calls succeeded, all call participants drop.
9926
9927        Returns:
9928            True if pass; False if fail.
9929
9930        TAGS: Telephony, WFC, Conference, CEP
9931        Priority: 1
9932        """
9933        ads = self.android_devices
9934
9935        tasks = [(phone_setup_iwlan,
9936                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
9937                   self.wifi_network_ssid, self.wifi_network_pass)),
9938                 (phone_setup_iwlan,
9939                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
9940                   self.wifi_network_ssid, self.wifi_network_pass)),
9941                 (phone_setup_iwlan,
9942                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
9943                   self.wifi_network_ssid, self.wifi_network_pass))]
9944        if not multithread_func(self.log, tasks):
9945            self.log.error("Phone Failed to Set Up Properly.")
9946            return False
9947
9948        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(0)
9949        if call_ab_id is None or call_ac_id is None:
9950            return False
9951
9952        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
9953            call_ab_id, call_ac_id)
9954
9955    @TelephonyBaseTest.tel_test_wrap
9956    @test_tracker_info(uuid="ba43d88c-1347-4570-92d0-ebfa6404788f")
9957    def test_epdg_mo_mo_add_epdg_merge_drop_first_call_from_participant_wfc_apm_wifi_preferred_cep(
9958            self):
9959        """ Test WFC Conference Call among three phones. CEP enabled.
9960
9961        Steps:
9962        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
9963        2. PhoneA (WFC APM WiFi Preferred) call PhoneC (WFC APM WiFi Preferred), accept on PhoneC.
9964        3. On PhoneA, merge to conference call (WFC CEP conference call).
9965        4. End call on PhoneB, verify call continues.
9966        5. End call on PhoneC, verify call end on PhoneA.
9967
9968        Expected Results:
9969        3. Conference merged successfully.
9970        4. Drop calls succeeded. Call between A-C continues.
9971        5. Drop calls succeeded, all call participants drop.
9972
9973        Returns:
9974            True if pass; False if fail.
9975
9976        TAGS: Telephony, WFC, Conference, CEP
9977        Priority: 1
9978        """
9979        ads = self.android_devices
9980
9981        tasks = [(phone_setup_iwlan,
9982                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
9983                   self.wifi_network_ssid, self.wifi_network_pass)),
9984                 (phone_setup_iwlan,
9985                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
9986                   self.wifi_network_ssid, self.wifi_network_pass)),
9987                 (phone_setup_iwlan,
9988                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
9989                   self.wifi_network_ssid, self.wifi_network_pass))]
9990        if not multithread_func(self.log, tasks):
9991            self.log.error("Phone Failed to Set Up Properly.")
9992            return False
9993
9994        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(0)
9995        if call_ab_id is None or call_ac_id is None:
9996            return False
9997
9998        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
9999            call_ab_id, call_ac_id)
10000
10001    @TelephonyBaseTest.tel_test_wrap
10002    @test_tracker_info(uuid="fbcd20ec-ebac-45c2-b228-30fdec42752f")
10003    def test_epdg_mo_mo_add_epdg_merge_drop_first_call_from_host_wfc_apm_wifi_preferred_cep(
10004            self):
10005        """ Test WFC Conference Call among three phones. CEP enabled.
10006
10007        Steps:
10008        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10009        2. PhoneA (WFC APM WiFi Preferred) call PhoneC (WFC APM WiFi Preferred), accept on PhoneC.
10010        3. On PhoneA, merge to conference call (WFC CEP conference call).
10011        4. On PhoneA disconnect call between A-B, verify call continues.
10012        5. On PhoneA disconnect call between A-C, verify call continues.
10013
10014        Expected Results:
10015        3. Conference merged successfully.
10016        4. Drop calls succeeded. Call between A-C continues.
10017        5. Drop calls succeeded, all call participants drop.
10018
10019        Returns:
10020            True if pass; False if fail.
10021
10022        TAGS: Telephony, WFC, Conference, CEP
10023        Priority: 1
10024        """
10025        ads = self.android_devices
10026
10027        tasks = [(phone_setup_iwlan,
10028                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10029                   self.wifi_network_ssid, self.wifi_network_pass)),
10030                 (phone_setup_iwlan,
10031                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10032                   self.wifi_network_ssid, self.wifi_network_pass)),
10033                 (phone_setup_iwlan,
10034                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10035                   self.wifi_network_ssid, self.wifi_network_pass))]
10036        if not multithread_func(self.log, tasks):
10037            self.log.error("Phone Failed to Set Up Properly.")
10038            return False
10039
10040        call_ab_id, call_ac_id = self._test_epdg_mo_mo_add_epdg_swap_x(0)
10041        if call_ab_id is None or call_ac_id is None:
10042            return False
10043
10044        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
10045            call_ab_id, call_ac_id)
10046
10047    @TelephonyBaseTest.tel_test_wrap
10048    @test_tracker_info(uuid="fc54b329-4ec6-45b2-8f91-0a5789542596")
10049    def test_epdg_mo_mt_add_epdg_merge_drop_second_call_from_participant_wfc_apm_wifi_preferred_no_cep(
10050            self):
10051        """ Test WFC Conference Call among three phones. No CEP.
10052
10053        Steps:
10054        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10055        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10056        3. On PhoneA, merge to conference call (No CEP).
10057        4. End call on PhoneC, verify call continues.
10058        5. End call on PhoneB, verify call end on PhoneA.
10059
10060        Expected Results:
10061        3. Conference merged successfully.
10062        4. Drop calls succeeded. Call between A-B continues.
10063        5. Drop calls succeeded, all call participants drop.
10064
10065        Returns:
10066            True if pass; False if fail.
10067
10068        TAGS: Telephony, WFC, Conference, No_CEP
10069        Priority: 1
10070        """
10071        ads = self.android_devices
10072
10073        tasks = [(phone_setup_iwlan,
10074                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10075                   self.wifi_network_ssid, self.wifi_network_pass)),
10076                 (phone_setup_iwlan,
10077                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10078                   self.wifi_network_ssid, self.wifi_network_pass)),
10079                 (phone_setup_iwlan,
10080                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10081                   self.wifi_network_ssid, self.wifi_network_pass))]
10082        if not multithread_func(self.log, tasks):
10083            self.log.error("Phone Failed to Set Up Properly.")
10084            return False
10085
10086        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(0)
10087        if call_ab_id is None or call_ac_id is None:
10088            return False
10089
10090        return self._test_ims_conference_merge_drop_second_call_no_cep(
10091            call_ab_id, call_ac_id)
10092
10093    @TelephonyBaseTest.tel_test_wrap
10094    @test_tracker_info(uuid="64096e42-1fb2-4eb4-9f60-3e22c7ad5c83")
10095    def test_epdg_mo_mt_add_epdg_merge_drop_second_call_from_participant_wfc_apm_wifi_preferred_cep(
10096            self):
10097        """ Test WFC Conference Call among three phones. CEP enabled.
10098
10099        Steps
10100        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10101        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10102        3. On PhoneA, merge to conference call (WFC CEP conference call).
10103        4. End call on PhoneC, verify call continues.
10104        5. End call on PhoneB, verify call end on PhoneA.
10105
10106        Expected Results:
10107        3. Conference merged successfully.
10108        4. Drop calls succeeded. Call between A-B continues.
10109        5. Drop calls succeeded, all call participants drop.
10110
10111        Returns:
10112            True if pass; False if fail.
10113
10114        TAGS: Telephony, WFC, Conference, CEP
10115        Priority: 1
10116        """
10117        ads = self.android_devices
10118
10119        tasks = [(phone_setup_iwlan,
10120                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10121                   self.wifi_network_ssid, self.wifi_network_pass)),
10122                 (phone_setup_iwlan,
10123                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10124                   self.wifi_network_ssid, self.wifi_network_pass)),
10125                 (phone_setup_iwlan,
10126                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10127                   self.wifi_network_ssid, self.wifi_network_pass))]
10128        if not multithread_func(self.log, tasks):
10129            self.log.error("Phone Failed to Set Up Properly.")
10130            return False
10131
10132        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(0)
10133        if call_ab_id is None or call_ac_id is None:
10134            return False
10135
10136        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
10137            call_ab_id, call_ac_id)
10138
10139    @TelephonyBaseTest.tel_test_wrap
10140    @test_tracker_info(uuid="24b6abb4-03c8-464c-a584-ca597bd67b46")
10141    def test_epdg_mo_mt_add_epdg_merge_drop_second_call_from_host_wfc_apm_wifi_preferred_cep(
10142            self):
10143        """ Test WFC Conference Call among three phones. CEP enabled.
10144
10145        Steps:
10146        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10147        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10148        3. On PhoneA, merge to conference call (WFC CEP conference call).
10149        4. On PhoneA disconnect call between A-C, verify call continues.
10150        5. On PhoneA disconnect call between A-B, verify call continues.
10151
10152        Expected Results:
10153        3. Conference merged successfully.
10154        4. Drop calls succeeded. Call between A-B continues.
10155        5. Drop calls succeeded, all call participants drop.
10156
10157        Returns:
10158            True if pass; False if fail.
10159
10160        TAGS: Telephony, WFC, Conference, CEP
10161        Priority: 1
10162        """
10163        ads = self.android_devices
10164
10165        tasks = [(phone_setup_iwlan,
10166                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10167                   self.wifi_network_ssid, self.wifi_network_pass)),
10168                 (phone_setup_iwlan,
10169                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10170                   self.wifi_network_ssid, self.wifi_network_pass)),
10171                 (phone_setup_iwlan,
10172                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10173                   self.wifi_network_ssid, self.wifi_network_pass))]
10174        if not multithread_func(self.log, tasks):
10175            self.log.error("Phone Failed to Set Up Properly.")
10176            return False
10177
10178        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(0)
10179        if call_ab_id is None or call_ac_id is None:
10180            return False
10181
10182        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
10183            call_ab_id, call_ac_id)
10184
10185    @TelephonyBaseTest.tel_test_wrap
10186    @test_tracker_info(uuid="f54776e4-84c0-43db-8724-f012ef551ebd")
10187    def test_epdg_mo_mt_add_epdg_merge_drop_first_call_from_participant_wfc_apm_wifi_preferred_cep(
10188            self):
10189        """ Test WFC Conference Call among three phones. CEP enabled.
10190
10191        Steps:
10192        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10193        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10194        3. On PhoneA, merge to conference call (WFC CEP conference call).
10195        4. End call on PhoneB, verify call continues.
10196        5. End call on PhoneC, verify call end on PhoneA.
10197
10198        Expected Results:
10199        3. Conference merged successfully.
10200        4. Drop calls succeeded. Call between A-C continues.
10201        5. Drop calls succeeded, all call participants drop.
10202
10203        Returns:
10204            True if pass; False if fail.
10205
10206        TAGS: Telephony, WFC, Conference, CEP
10207        Priority: 1
10208        """
10209        ads = self.android_devices
10210
10211        tasks = [(phone_setup_iwlan,
10212                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10213                   self.wifi_network_ssid, self.wifi_network_pass)),
10214                 (phone_setup_iwlan,
10215                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10216                   self.wifi_network_ssid, self.wifi_network_pass)),
10217                 (phone_setup_iwlan,
10218                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10219                   self.wifi_network_ssid, self.wifi_network_pass))]
10220        if not multithread_func(self.log, tasks):
10221            self.log.error("Phone Failed to Set Up Properly.")
10222            return False
10223
10224        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(0)
10225        if call_ab_id is None or call_ac_id is None:
10226            return False
10227
10228        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
10229            call_ab_id, call_ac_id)
10230
10231    @TelephonyBaseTest.tel_test_wrap
10232    @test_tracker_info(uuid="6635aeff-f10a-4fb0-b658-4f1e7f2d9a68")
10233    def test_epdg_mo_mt_add_epdg_merge_drop_first_call_from_host_wfc_apm_wifi_preferred_cep(
10234            self):
10235        """ Test WFC Conference Call among three phones. CEP enabled.
10236
10237        Steps:
10238        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10239        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10240        3. On PhoneA, merge to conference call (WFC CEP conference call).
10241        4. On PhoneA disconnect call between A-B, verify call continues.
10242        5. On PhoneA disconnect call between A-C, verify call continues.
10243
10244        Expected Results:
10245        3. Conference merged successfully.
10246        4. Drop calls succeeded. Call between A-C continues.
10247        5. Drop calls succeeded, all call participants drop.
10248
10249        Returns:
10250            True if pass; False if fail.
10251
10252        TAGS: Telephony, WFC, Conference, CEP
10253        Priority: 1
10254        """
10255        ads = self.android_devices
10256
10257        tasks = [(phone_setup_iwlan,
10258                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10259                   self.wifi_network_ssid, self.wifi_network_pass)),
10260                 (phone_setup_iwlan,
10261                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10262                   self.wifi_network_ssid, self.wifi_network_pass)),
10263                 (phone_setup_iwlan,
10264                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10265                   self.wifi_network_ssid, self.wifi_network_pass))]
10266        if not multithread_func(self.log, tasks):
10267            self.log.error("Phone Failed to Set Up Properly.")
10268            return False
10269
10270        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(0)
10271        if call_ab_id is None or call_ac_id is None:
10272            return False
10273
10274        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
10275            call_ab_id, call_ac_id)
10276
10277    @TelephonyBaseTest.tel_test_wrap
10278    @test_tracker_info(uuid="c2534477-74ff-43ca-920a-48238928f344")
10279    def test_epdg_mt_mt_add_epdg_merge_drop_second_call_from_participant_wfc_apm_wifi_preferred_no_cep(
10280            self):
10281        """ Test WFC Conference Call among three phones. No CEP.
10282
10283        Steps:
10284        1. PhoneB (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10285        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10286        3. On PhoneA, merge to conference call (No CEP).
10287        4. End call on PhoneC, verify call continues.
10288        5. End call on PhoneB, verify call end on PhoneA.
10289
10290        Expected Results:
10291        3. Conference merged successfully.
10292        4. Drop calls succeeded. Call between A-B continues.
10293        5. Drop calls succeeded, all call participants drop.
10294
10295        Returns:
10296            True if pass; False if fail.
10297
10298        TAGS: Telephony, WFC, Conference, No_CEP
10299        Priority: 1
10300        """
10301        ads = self.android_devices
10302
10303        tasks = [(phone_setup_iwlan,
10304                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10305                   self.wifi_network_ssid, self.wifi_network_pass)),
10306                 (phone_setup_iwlan,
10307                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10308                   self.wifi_network_ssid, self.wifi_network_pass)),
10309                 (phone_setup_iwlan,
10310                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10311                   self.wifi_network_ssid, self.wifi_network_pass))]
10312        if not multithread_func(self.log, tasks):
10313            self.log.error("Phone Failed to Set Up Properly.")
10314            return False
10315
10316        call_ab_id, call_ac_id = self._test_epdg_mt_mt_add_epdg_swap_x(0)
10317        if call_ab_id is None or call_ac_id is None:
10318            return False
10319
10320        return self._test_ims_conference_merge_drop_second_call_no_cep(
10321            call_ab_id, call_ac_id)
10322
10323    @TelephonyBaseTest.tel_test_wrap
10324    @test_tracker_info(uuid="ef5ea03d-1c1b-4c9a-a72d-14b2ba7e87cb")
10325    def test_epdg_mt_mt_add_epdg_merge_drop_second_call_from_participant_wfc_apm_wifi_preferred_cep(
10326            self):
10327        """ Test WFC Conference Call among three phones. CEP enabled.
10328
10329        Steps
10330        1. PhoneB (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10331        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10332        3. On PhoneA, merge to conference call (WFC CEP conference call).
10333        4. End call on PhoneC, verify call continues.
10334        5. End call on PhoneB, verify call end on PhoneA.
10335
10336        Expected Results:
10337        3. Conference merged successfully.
10338        4. Drop calls succeeded. Call between A-B continues.
10339        5. Drop calls succeeded, all call participants drop.
10340
10341        Returns:
10342            True if pass; False if fail.
10343
10344        TAGS: Telephony, WFC, Conference, CEP
10345        Priority: 1
10346        """
10347        ads = self.android_devices
10348
10349        tasks = [(phone_setup_iwlan,
10350                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10351                   self.wifi_network_ssid, self.wifi_network_pass)),
10352                 (phone_setup_iwlan,
10353                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10354                   self.wifi_network_ssid, self.wifi_network_pass)),
10355                 (phone_setup_iwlan,
10356                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10357                   self.wifi_network_ssid, self.wifi_network_pass))]
10358        if not multithread_func(self.log, tasks):
10359            self.log.error("Phone Failed to Set Up Properly.")
10360            return False
10361
10362        call_ab_id, call_ac_id = self._test_epdg_mt_mt_add_epdg_swap_x(0)
10363        if call_ab_id is None or call_ac_id is None:
10364            return False
10365
10366        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
10367            call_ab_id, call_ac_id)
10368
10369    @TelephonyBaseTest.tel_test_wrap
10370    @test_tracker_info(uuid="b0df507f-2adf-45fe-a174-44f62718296e")
10371    def test_epdg_mt_mt_add_epdg_merge_drop_second_call_from_host_wfc_apm_wifi_preferred_cep(
10372            self):
10373        """ Test WFC Conference Call among three phones. CEP enabled.
10374
10375        Steps:
10376        1. PhoneB (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10377        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10378        3. On PhoneA, merge to conference call (WFC CEP conference call).
10379        4. On PhoneA disconnect call between A-C, verify call continues.
10380        5. On PhoneA disconnect call between A-B, verify call continues.
10381
10382        Expected Results:
10383        3. Conference merged successfully.
10384        4. Drop calls succeeded. Call between A-B continues.
10385        5. Drop calls succeeded, all call participants drop.
10386
10387        Returns:
10388            True if pass; False if fail.
10389
10390        TAGS: Telephony, WFC, Conference, CEP
10391        Priority: 1
10392        """
10393        ads = self.android_devices
10394
10395        tasks = [(phone_setup_iwlan,
10396                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10397                   self.wifi_network_ssid, self.wifi_network_pass)),
10398                 (phone_setup_iwlan,
10399                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10400                   self.wifi_network_ssid, self.wifi_network_pass)),
10401                 (phone_setup_iwlan,
10402                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10403                   self.wifi_network_ssid, self.wifi_network_pass))]
10404        if not multithread_func(self.log, tasks):
10405            self.log.error("Phone Failed to Set Up Properly.")
10406            return False
10407
10408        call_ab_id, call_ac_id = self._test_epdg_mt_mt_add_epdg_swap_x(0)
10409        if call_ab_id is None or call_ac_id is None:
10410            return False
10411
10412        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
10413            call_ab_id, call_ac_id)
10414
10415    @TelephonyBaseTest.tel_test_wrap
10416    @test_tracker_info(uuid="278c6bec-7065-4f54-9834-33d8a6172f58")
10417    def test_epdg_mt_mt_add_epdg_merge_drop_first_call_from_participant_wfc_apm_wifi_preferred_cep(
10418            self):
10419        """ Test WFC Conference Call among three phones. CEP enabled.
10420
10421        Steps:
10422        1. PhoneB (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10423        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10424        3. On PhoneA, merge to conference call (WFC CEP conference call).
10425        4. End call on PhoneB, verify call continues.
10426        5. End call on PhoneC, verify call end on PhoneA.
10427
10428        Expected Results:
10429        3. Conference merged successfully.
10430        4. Drop calls succeeded. Call between A-C continues.
10431        5. Drop calls succeeded, all call participants drop.
10432
10433        Returns:
10434            True if pass; False if fail.
10435
10436        TAGS: Telephony, WFC, Conference, CEP
10437        Priority: 1
10438        """
10439        ads = self.android_devices
10440
10441        tasks = [(phone_setup_iwlan,
10442                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10443                   self.wifi_network_ssid, self.wifi_network_pass)),
10444                 (phone_setup_iwlan,
10445                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10446                   self.wifi_network_ssid, self.wifi_network_pass)),
10447                 (phone_setup_iwlan,
10448                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10449                   self.wifi_network_ssid, self.wifi_network_pass))]
10450        if not multithread_func(self.log, tasks):
10451            self.log.error("Phone Failed to Set Up Properly.")
10452            return False
10453
10454        call_ab_id, call_ac_id = self._test_epdg_mt_mt_add_epdg_swap_x(0)
10455        if call_ab_id is None or call_ac_id is None:
10456            return False
10457
10458        return self._test_ims_conference_merge_drop_first_call_from_participant_cep(
10459            call_ab_id, call_ac_id)
10460
10461    @TelephonyBaseTest.tel_test_wrap
10462    @test_tracker_info(uuid="1ffceadc-8bd1-489d-bb66-4b3081df3a64")
10463    def test_epdg_mt_mt_add_epdg_merge_drop_first_call_from_host_wfc_apm_wifi_preferred_cep(
10464            self):
10465        """ Test WFC Conference Call among three phones. CEP enabled.
10466
10467        Steps:
10468        1. PhoneB (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10469        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10470        3. On PhoneA, merge to conference call (WFC CEP conference call).
10471        4. On PhoneA disconnect call between A-B, verify call continues.
10472        5. On PhoneA disconnect call between A-C, verify call continues.
10473
10474        Expected Results:
10475        3. Conference merged successfully.
10476        4. Drop calls succeeded. Call between A-C continues.
10477        5. Drop calls succeeded, all call participants drop.
10478
10479        Returns:
10480            True if pass; False if fail.
10481
10482        TAGS: Telephony, WFC, Conference, CEP
10483        Priority: 1
10484        """
10485        ads = self.android_devices
10486
10487        tasks = [(phone_setup_iwlan,
10488                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10489                   self.wifi_network_ssid, self.wifi_network_pass)),
10490                 (phone_setup_iwlan,
10491                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10492                   self.wifi_network_ssid, self.wifi_network_pass)),
10493                 (phone_setup_iwlan,
10494                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10495                   self.wifi_network_ssid, self.wifi_network_pass))]
10496        if not multithread_func(self.log, tasks):
10497            self.log.error("Phone Failed to Set Up Properly.")
10498            return False
10499
10500        call_ab_id, call_ac_id = self._test_epdg_mt_mt_add_epdg_swap_x(0)
10501        if call_ab_id is None or call_ac_id is None:
10502            return False
10503
10504        return self._test_ims_conference_merge_drop_first_call_from_host_cep(
10505            call_ab_id, call_ac_id)
10506
10507    @TelephonyBaseTest.tel_test_wrap
10508    @test_tracker_info(uuid="b3dfaa38-8e9b-45b7-8e4e-6e6ca10887bd")
10509    def test_epdg_mo_mt_add_epdg_swap_once_merge_drop_second_call_from_participant_wfc_apm_wifi_preferred_no_cep(
10510            self):
10511        """ Test swap and merge features in WFC call. No CEP.
10512
10513        Steps:
10514        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10515        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10516        3. Swap active call on PhoneA.
10517        4. On PhoneA, merge to conference call (No CEP).
10518        5. End call on PhoneC, verify call continues.
10519        6. End call on PhoneB, verify call end on PhoneA.
10520
10521        Expected Results:
10522        3. Swap operation succeeded.
10523        4. Conference merged successfully.
10524        5. Drop calls succeeded. Call between A-B continues.
10525        6. Drop calls succeeded, all call participants drop.
10526
10527        Returns:
10528            True if pass; False if fail.
10529
10530        TAGS: Telephony, WFC, Conference, No_CEP
10531        Priority: 1
10532        """
10533        ads = self.android_devices
10534
10535        tasks = [(phone_setup_iwlan,
10536                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10537                   self.wifi_network_ssid, self.wifi_network_pass)),
10538                 (phone_setup_iwlan,
10539                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10540                   self.wifi_network_ssid, self.wifi_network_pass)),
10541                 (phone_setup_iwlan,
10542                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10543                   self.wifi_network_ssid, self.wifi_network_pass))]
10544        if not multithread_func(self.log, tasks):
10545            self.log.error("Phone Failed to Set Up Properly.")
10546            return False
10547
10548        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
10549        if call_ab_id is None or call_ac_id is None:
10550            return False
10551
10552        return self._test_ims_conference_merge_drop_second_call_no_cep(
10553            call_ab_id, call_ac_id)
10554
10555    @TelephonyBaseTest.tel_test_wrap
10556    @test_tracker_info(uuid="eb82f1ac-e5a3-42bc-b9d9-806442263f79")
10557    def test_epdg_mo_mt_add_epdg_swap_once_merge_drop_second_call_from_host_wfc_apm_wifi_preferred_cep(
10558            self):
10559        """ Test swap and merge features in WFC call. CEP enabled.
10560
10561        Steps:
10562        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10563        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10564        3. Swap active call on PhoneA.
10565        4. On PhoneA, merge to conference call (WFC CEP conference call).
10566        5. On PhoneA disconnect call between A-C, verify call continues.
10567        6. On PhoneA disconnect call between A-B, verify call continues.
10568
10569        Expected Results:
10570        3. Swap operation succeeded.
10571        4. Conference merged successfully.
10572        5. Drop calls succeeded. Call between A-B continues.
10573        6. Drop calls succeeded, all call participants drop.
10574
10575        Returns:
10576            True if pass; False if fail.
10577
10578        TAGS: Telephony, WFC, Conference, CEP
10579        Priority: 1
10580        """
10581        ads = self.android_devices
10582
10583        tasks = [(phone_setup_iwlan,
10584                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10585                   self.wifi_network_ssid, self.wifi_network_pass)),
10586                 (phone_setup_iwlan,
10587                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10588                   self.wifi_network_ssid, self.wifi_network_pass)),
10589                 (phone_setup_iwlan,
10590                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10591                   self.wifi_network_ssid, self.wifi_network_pass))]
10592        if not multithread_func(self.log, tasks):
10593            self.log.error("Phone Failed to Set Up Properly.")
10594            return False
10595
10596        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
10597        if call_ab_id is None or call_ac_id is None:
10598            return False
10599
10600        return self._test_ims_conference_merge_drop_second_call_from_host_cep(
10601            call_ab_id, call_ac_id)
10602
10603    @TelephonyBaseTest.tel_test_wrap
10604    @test_tracker_info(uuid="53ba057d-5c5c-4236-9ff9-829177e6f51e")
10605    def test_epdg_mo_mt_add_epdg_swap_once_merge_drop_second_call_from_participant_wfc_apm_wifi_preferred_cep(
10606            self):
10607        """ Test swap and merge features in WFC call. CEP enabled.
10608
10609        Steps:
10610        1. PhoneA (WFC APM WiFi Preferred) call PhoneB (WFC APM WiFi Preferred), accept on PhoneB.
10611        2. PhoneC (WFC APM WiFi Preferred) call PhoneA (WFC APM WiFi Preferred), accept on PhoneA.
10612        3. Swap active call on PhoneA.
10613        4. On PhoneA, merge to conference call (WFC CEP conference call).
10614        5. End call on PhoneC, verify call continues.
10615        6. End call on PhoneB, verify call end on PhoneA.
10616
10617        Expected Results:
10618        3. Swap operation succeeded.
10619        4. Conference merged successfully.
10620        5. Drop calls succeeded. Call between A-B continues.
10621        6. Drop calls succeeded, all call participants drop.
10622
10623        Returns:
10624            True if pass; False if fail.
10625
10626        TAGS: Telephony, WFC, Conference, CEP
10627        Priority: 1
10628        """
10629        ads = self.android_devices
10630
10631        tasks = [(phone_setup_iwlan,
10632                  (self.log, ads[0], True, WFC_MODE_WIFI_PREFERRED,
10633                   self.wifi_network_ssid, self.wifi_network_pass)),
10634                 (phone_setup_iwlan,
10635                  (self.log, ads[1], True, WFC_MODE_WIFI_PREFERRED,
10636                   self.wifi_network_ssid, self.wifi_network_pass)),
10637                 (phone_setup_iwlan,
10638                  (self.log, ads[2], True, WFC_MODE_WIFI_PREFERRED,
10639                   self.wifi_network_ssid, self.wifi_network_pass))]
10640        if not multithread_func(self.log, tasks):
10641            self.log.error("Phone Failed to Set Up Properly.")
10642            return False
10643
10644        call_ab_id, call_ac_id = self._test_epdg_mo_mt_add_epdg_swap_x(1)
10645        if call_ab_id is None or call_ac_id is None:
10646            return False
10647
10648        return self._test_ims_conference_merge_drop_second_call_from_participant_cep(
10649            call_ab_id, call_ac_id)
10650
10651    @TelephonyBaseTest.tel_test_wrap
10652    @test_tracker_info(uuid="a246cbd0-915d-4068-8d63-7e099d41fd43")
10653    def test_wcdma_add_mt_decline(self):
10654        ads = self.android_devices
10655
10656        tasks = [(phone_setup_3g, (self.log, ads[0])),
10657                 (phone_setup_voice_general, (self.log, ads[1])),
10658                 (phone_setup_voice_general, (self.log, ads[2]))]
10659        if not multithread_func(self.log, tasks):
10660            self.log.error("Phone Failed to Set Up Properly.")
10661            return False
10662
10663        if not self._three_phone_call_mo_add_mt_reject(
10664            [ads[0], ads[1], ads[2]], [is_phone_in_call_wcdma, None], True):
10665            return False
10666        return True
10667
10668    @TelephonyBaseTest.tel_test_wrap
10669    @test_tracker_info(uuid="2789388a-c67c-4c37-a4ea-98c9083abcf9")
10670    def test_wcdma_add_mt_ignore(self):
10671        ads = self.android_devices
10672
10673        tasks = [(phone_setup_3g, (self.log, ads[0])),
10674                 (phone_setup_voice_general, (self.log, ads[1])),
10675                 (phone_setup_voice_general, (self.log, ads[2]))]
10676        if not multithread_func(self.log, tasks):
10677            self.log.error("Phone Failed to Set Up Properly.")
10678            return False
10679
10680        if not self._three_phone_call_mo_add_mt_reject(
10681            [ads[0], ads[1], ads[2]], [is_phone_in_call_wcdma, None], False):
10682            return False
10683        return True
10684
10685    @TelephonyBaseTest.tel_test_wrap
10686    @test_tracker_info(uuid="8f5399b2-5075-45b2-b916-2d436d1c1c93")
10687    def test_1x_add_mt_decline(self):
10688        ads = self.android_devices
10689
10690        tasks = [(phone_setup_3g, (self.log, ads[0])),
10691                 (phone_setup_voice_general, (self.log, ads[1])),
10692                 (phone_setup_voice_general, (self.log, ads[2]))]
10693        if not multithread_func(self.log, tasks):
10694            self.log.error("Phone Failed to Set Up Properly.")
10695            return False
10696
10697        if not self._three_phone_call_mo_add_mt_reject(
10698            [ads[0], ads[1], ads[2]], [is_phone_in_call_1x, None], True):
10699            return False
10700        return True
10701
10702    @TelephonyBaseTest.tel_test_wrap
10703    @test_tracker_info(uuid="a7e6ea10-d4d4-4089-a012-31565314cf65")
10704    def test_1x_add_mt_ignore(self):
10705        ads = self.android_devices
10706
10707        tasks = [(phone_setup_3g, (self.log, ads[0])),
10708                 (phone_setup_voice_general, (self.log, ads[1])),
10709                 (phone_setup_voice_general, (self.log, ads[2]))]
10710        if not multithread_func(self.log, tasks):
10711            self.log.error("Phone Failed to Set Up Properly.")
10712            return False
10713
10714        if not self._three_phone_call_mo_add_mt_reject(
10715            [ads[0], ads[1], ads[2]], [is_phone_in_call_1x, None], False):
10716            return False
10717        return True
10718
10719    @TelephonyBaseTest.tel_test_wrap
10720    @test_tracker_info(uuid="c7d878f6-2f1c-4029-bcf9-2aecf2d202e7")
10721    def test_volte_add_mt_decline(self):
10722        ads = self.android_devices
10723
10724        tasks = [(phone_setup_volte, (self.log, ads[0])),
10725                 (phone_setup_voice_general, (self.log, ads[1])),
10726                 (phone_setup_voice_general, (self.log, ads[2]))]
10727        if not multithread_func(self.log, tasks):
10728            self.log.error("Phone Failed to Set Up Properly.")
10729            return False
10730
10731        if not self._three_phone_call_mo_add_mt_reject(
10732            [ads[0], ads[1], ads[2]], [is_phone_in_call_volte, None], True):
10733            return False
10734        return True
10735
10736    @TelephonyBaseTest.tel_test_wrap
10737    @test_tracker_info(uuid="4f03240f-88a7-4d39-9d90-6327e835d5e2")
10738    def test_volte_add_mt_ignore(self):
10739        ads = self.android_devices
10740
10741        tasks = [(phone_setup_volte, (self.log, ads[0])),
10742                 (phone_setup_voice_general, (self.log, ads[1])),
10743                 (phone_setup_voice_general, (self.log, ads[2]))]
10744        if not multithread_func(self.log, tasks):
10745            self.log.error("Phone Failed to Set Up Properly.")
10746            return False
10747
10748        if not self._three_phone_call_mo_add_mt_reject(
10749            [ads[0], ads[1], ads[2]], [is_phone_in_call_volte, None], False):
10750            return False
10751        return True
10752
10753    @TelephonyBaseTest.tel_test_wrap
10754    @test_tracker_info(uuid="ce51844a-4879-470e-9a22-4eafe25f8e2a")
10755    def test_wfc_lte_add_mt_decline(self):
10756        ads = self.android_devices
10757
10758        tasks = [(phone_setup_iwlan,
10759                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
10760                   self.wifi_network_ssid, self.wifi_network_pass)),
10761                 (phone_setup_voice_general, (self.log, ads[1])),
10762                 (phone_setup_voice_general, (self.log, ads[2]))]
10763        if not multithread_func(self.log, tasks):
10764            self.log.error("Phone Failed to Set Up Properly.")
10765            return False
10766
10767        if not self._three_phone_call_mo_add_mt_reject(
10768            [ads[0], ads[1], ads[2]], [is_phone_in_call_volte, None], True):
10769            return False
10770        return True
10771
10772    @TelephonyBaseTest.tel_test_wrap
10773    @test_tracker_info(uuid="b5058cd0-4073-4018-9683-335fd27ab529")
10774    def test_wfc_lte_add_mt_ignore(self):
10775        ads = self.android_devices
10776
10777        tasks = [(phone_setup_iwlan,
10778                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
10779                   self.wifi_network_ssid, self.wifi_network_pass)),
10780                 (phone_setup_voice_general, (self.log, ads[1])),
10781                 (phone_setup_voice_general, (self.log, ads[2]))]
10782        if not multithread_func(self.log, tasks):
10783            self.log.error("Phone Failed to Set Up Properly.")
10784            return False
10785
10786        if not self._three_phone_call_mo_add_mt_reject(
10787            [ads[0], ads[1], ads[2]], [is_phone_in_call_volte, None], False):
10788            return False
10789        return True
10790
10791    @TelephonyBaseTest.tel_test_wrap
10792    @test_tracker_info(uuid="456e0a04-7d82-4387-89bb-80613732412e")
10793    def test_wfc_apm_add_mt_decline(self):
10794        ads = self.android_devices
10795
10796        tasks = [(phone_setup_iwlan,
10797                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
10798                   self.wifi_network_ssid, self.wifi_network_pass)),
10799                 (phone_setup_voice_general, (self.log, ads[1])),
10800                 (phone_setup_voice_general, (self.log, ads[2]))]
10801        if not multithread_func(self.log, tasks):
10802            self.log.error("Phone Failed to Set Up Properly.")
10803            return False
10804
10805        if not self._three_phone_call_mo_add_mt_reject(
10806            [ads[0], ads[1], ads[2]], [is_phone_in_call_volte, None], True):
10807            return False
10808        return True
10809
10810    @TelephonyBaseTest.tel_test_wrap
10811    @test_tracker_info(uuid="ee71fc98-9e52-406f-8d8a-6d9c62cbe6f4")
10812    def test_wfc_apm_add_mt_ignore(self):
10813        ads = self.android_devices
10814
10815        tasks = [(phone_setup_iwlan,
10816                  (self.log, ads[0], False, WFC_MODE_WIFI_PREFERRED,
10817                   self.wifi_network_ssid, self.wifi_network_pass)),
10818                 (phone_setup_voice_general, (self.log, ads[1])),
10819                 (phone_setup_voice_general, (self.log, ads[2]))]
10820        if not multithread_func(self.log, tasks):
10821            self.log.error("Phone Failed to Set Up Properly.")
10822            return False
10823
10824        if not self._three_phone_call_mo_add_mt_reject(
10825            [ads[0], ads[1], ads[2]], [is_phone_in_call_volte, None], False):
10826            return False
10827        return True
10828
10829    """ Tests End """
10830