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