• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2#
3#   Copyright 2021 - 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
18from acts import signals
19from acts.test_decorators import test_tracker_info
20from acts_contrib.test_utils.tel.loggers.protos.telephony_metric_pb2 import TelephonyVoiceTestResult
21from acts_contrib.test_utils.tel.loggers.telephony_metric_logger import TelephonyMetricLogger
22from acts_contrib.test_utils.tel.TelephonyBaseTest import TelephonyBaseTest
23from acts_contrib.test_utils.tel.tel_defines import CAPABILITY_CONFERENCE
24from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_WIFI_PREFERRED
25from acts_contrib.test_utils.tel.tel_dsds_utils import erase_call_forwarding
26from acts_contrib.test_utils.tel.tel_dsds_utils import msim_volte_wfc_call_forwarding
27from acts_contrib.test_utils.tel.tel_dsds_utils import msim_volte_wfc_call_voice_conf
28from acts_contrib.test_utils.tel.tel_phone_setup_utils import ensure_phones_idle
29from acts_contrib.test_utils.tel.tel_subscription_utils import get_outgoing_voice_sub_id
30from acts_contrib.test_utils.tel.tel_test_utils import get_capability_for_subscription
31from acts_contrib.test_utils.tel.tel_test_utils import toggle_airplane_mode
32
33CallResult = TelephonyVoiceTestResult.CallResult.Value
34
35
36class TelLiveGFTDSDSWfcSupplementaryServiceTest(TelephonyBaseTest):
37    def setup_class(self):
38        TelephonyBaseTest.setup_class(self)
39        self.message_lengths = (50, 160, 180)
40        self.tel_logger = TelephonyMetricLogger.for_test_case()
41        toggle_airplane_mode(self.log, self.android_devices[0], False)
42        erase_call_forwarding(self.log, self.android_devices[0])
43        if not get_capability_for_subscription(
44            self.android_devices[0],
45            CAPABILITY_CONFERENCE,
46            get_outgoing_voice_sub_id(self.android_devices[0])):
47            self.android_devices[0].log.error(
48                "Conference call is not supported, abort test.")
49            raise signals.TestAbortClass(
50                "Conference call is not supported, abort test.")
51
52    def teardown_test(self):
53        toggle_airplane_mode(self.log, self.android_devices[0], False)
54        ensure_phones_idle(self.log, self.android_devices)
55        erase_call_forwarding(self.log, self.android_devices[0])
56
57    @test_tracker_info(uuid="3d328dd0-acb6-48be-9cb2-ffffb15bf2cd")
58    @TelephonyBaseTest.tel_test_wrap
59    def test_msim_call_forwarding_unconditional_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self):
60        return msim_volte_wfc_call_forwarding(
61            self.log,
62            self.tel_logger,
63            self.android_devices,
64            0,
65            0,
66            callee_rat=['wfc', 'general'],
67            is_airplane_mode=True,
68            wifi_network_ssid=self.wifi_network_ssid,
69            wifi_network_pass=self.wifi_network_pass)
70
71    @test_tracker_info(uuid="aac41970-4fdb-4f22-bf33-2092ce14db6e")
72    @TelephonyBaseTest.tel_test_wrap
73    def test_msim_call_forwarding_unconditional_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self):
74        return msim_volte_wfc_call_forwarding(
75            self.log,
76            self.tel_logger,
77            self.android_devices,
78            0,
79            0,
80            callee_rat=['wfc', 'general'],
81            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
82            wifi_network_ssid=self.wifi_network_ssid,
83            wifi_network_pass=self.wifi_network_pass)
84
85    @test_tracker_info(uuid="716a795a-529f-450a-800d-80c1dd7c0e3f")
86    @TelephonyBaseTest.tel_test_wrap
87    def test_msim_call_forwarding_unconditional_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self):
88        return msim_volte_wfc_call_forwarding(
89            self.log,
90            self.tel_logger,
91            self.android_devices,
92            0,
93            1,
94            callee_rat=['wfc', 'general'],
95            is_airplane_mode=True,
96            wifi_network_ssid=self.wifi_network_ssid,
97            wifi_network_pass=self.wifi_network_pass)
98
99    @test_tracker_info(uuid="0743331b-78a4-4721-91e7-4c6b894b4b61")
100    @TelephonyBaseTest.tel_test_wrap
101    def test_msim_call_forwarding_unconditional_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self):
102        return msim_volte_wfc_call_forwarding(
103            self.log,
104            self.tel_logger,
105            self.android_devices,
106            0,
107            1,
108            callee_rat=['wfc', 'general'],
109            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
110            wifi_network_ssid=self.wifi_network_ssid,
111            wifi_network_pass=self.wifi_network_pass)
112
113    @test_tracker_info(uuid="65e8192f-c8af-454e-a142-0ba95f801fb4")
114    @TelephonyBaseTest.tel_test_wrap
115    def test_msim_call_forwarding_unconditional_volte_psim_cellular_preferred_wifi_on_dds_slot_0(self):
116        return msim_volte_wfc_call_forwarding(
117            self.log,
118            self.tel_logger,
119            self.android_devices,
120            0,
121            0,
122            callee_rat=["volte", "general"],
123            is_wifi_connected=True,
124            wifi_network_ssid=self.wifi_network_ssid,
125            wifi_network_pass=self.wifi_network_pass)
126
127    @test_tracker_info(uuid="29175f3c-0f7b-4baf-8399-a37cc92acce0")
128    @TelephonyBaseTest.tel_test_wrap
129    def test_msim_call_forwarding_unconditional_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self):
130        return msim_volte_wfc_call_forwarding(
131            self.log,
132            self.tel_logger,
133            self.android_devices,
134            1,
135            0,
136            callee_rat=['general', 'wfc'],
137            is_airplane_mode=True,
138            wifi_network_ssid=self.wifi_network_ssid,
139            wifi_network_pass=self.wifi_network_pass)
140
141    @test_tracker_info(uuid="a652a973-7445-4b3d-83cf-7b3ff2e1b47d")
142    @TelephonyBaseTest.tel_test_wrap
143    def test_msim_call_forwarding_unconditional_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self):
144        return msim_volte_wfc_call_forwarding(
145            self.log,
146            self.tel_logger,
147            self.android_devices,
148            1,
149            0,
150            callee_rat=['general', 'wfc'],
151            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
152            wifi_network_ssid=self.wifi_network_ssid,
153            wifi_network_pass=self.wifi_network_pass)
154
155    @test_tracker_info(uuid="8ff9bc8f-8740-4198-b437-19994f07758b")
156    @TelephonyBaseTest.tel_test_wrap
157    def test_msim_call_forwarding_unconditional_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self):
158        return msim_volte_wfc_call_forwarding(
159            self.log,
160            self.tel_logger,
161            self.android_devices,
162            1,
163            1,
164            callee_rat=['general', 'wfc'],
165            is_airplane_mode=True,
166            wifi_network_ssid=self.wifi_network_ssid,
167            wifi_network_pass=self.wifi_network_pass)
168
169    @test_tracker_info(uuid="3341cfec-4720-4c20-97c2-29409c727fab")
170    @TelephonyBaseTest.tel_test_wrap
171    def test_msim_call_forwarding_unconditional_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self):
172        return msim_volte_wfc_call_forwarding(
173            self.log,
174            self.tel_logger,
175            self.android_devices,
176            1,
177            1,
178            callee_rat=['general', 'wfc'],
179            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
180            wifi_network_ssid=self.wifi_network_ssid,
181            wifi_network_pass=self.wifi_network_pass)
182
183    @test_tracker_info(uuid="7cfea32a-6de2-4285-99b1-1219efaf542b")
184    @TelephonyBaseTest.tel_test_wrap
185    def test_msim_call_forwarding_unconditional_volte_esim_cellular_preferred_wifi_on_dds_slot_0(self):
186        return msim_volte_wfc_call_forwarding(
187            self.log,
188            self.tel_logger,
189            self.android_devices,
190            1,
191            0,
192            callee_rat=["general", "volte"],
193            is_wifi_connected=True,
194            wifi_network_ssid=self.wifi_network_ssid,
195            wifi_network_pass=self.wifi_network_pass)
196
197    @test_tracker_info(uuid="27422851-620c-4009-8e2a-730a97d88cb0")
198    @TelephonyBaseTest.tel_test_wrap
199    def test_msim_call_waiting_hold_swap_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self):
200        return msim_volte_wfc_call_voice_conf(
201            self.log,
202            self.tel_logger,
203            self.android_devices,
204            0,
205            0,
206            host_rat=['wfc', 'general'],
207            merge=False,
208            is_airplane_mode=True,
209            reject_once=True,
210            wifi_network_ssid=self.wifi_network_ssid,
211            wifi_network_pass=self.wifi_network_pass)
212
213    @test_tracker_info(uuid="f741f336-7eee-473e-b68f-c3505dbab935")
214    @TelephonyBaseTest.tel_test_wrap
215    def test_msim_call_waiting_hold_swap_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self):
216        return msim_volte_wfc_call_voice_conf(
217            self.log,
218            self.tel_logger,
219            self.android_devices,
220            0,
221            0,
222            host_rat=['wfc', 'general'],
223            merge=False,
224            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
225            reject_once=True,
226            wifi_network_ssid=self.wifi_network_ssid,
227            wifi_network_pass=self.wifi_network_pass)
228
229    @test_tracker_info(uuid="4c2c9896-1cfd-4d4c-9594-97c600ac3f50")
230    @TelephonyBaseTest.tel_test_wrap
231    def test_msim_call_waiting_hold_swap_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self):
232        return msim_volte_wfc_call_voice_conf(
233            self.log,
234            self.tel_logger,
235            self.android_devices,
236            0,
237            1,
238            host_rat=['wfc', 'general'],
239            merge=False,
240            is_airplane_mode=True,
241            reject_once=True,
242            wifi_network_ssid=self.wifi_network_ssid,
243            wifi_network_pass=self.wifi_network_pass)
244
245    @test_tracker_info(uuid="74491391-8ea5-4bad-868b-332218a8b015")
246    @TelephonyBaseTest.tel_test_wrap
247    def test_msim_call_waiting_hold_swap_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self):
248        return msim_volte_wfc_call_voice_conf(
249            self.log,
250            self.tel_logger,
251            self.android_devices,
252            0,
253            1,
254            host_rat=['wfc', 'general'],
255            merge=False,
256            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
257            reject_once=True,
258            wifi_network_ssid=self.wifi_network_ssid,
259            wifi_network_pass=self.wifi_network_pass)
260
261    @test_tracker_info(uuid="40185d6d-e127-4696-9ed8-53dbe355b1c3")
262    @TelephonyBaseTest.tel_test_wrap
263    def test_msim_call_waiting_hold_swap_volte_psim_cellular_preferred_wifi_on_dds_slot_0(self):
264        return msim_volte_wfc_call_voice_conf(
265            self.log,
266            self.tel_logger,
267            self.android_devices,
268            0,
269            0,
270            host_rat=["volte", "general"],
271            merge=False,
272            is_airplane_mode=False,
273            is_wifi_connected=True,
274            reject_once=True,
275            wifi_network_ssid=self.wifi_network_ssid,
276            wifi_network_pass=self.wifi_network_pass)
277
278    @test_tracker_info(uuid="b07a6693-3d1c-496a-b2fc-90711b2bf4f6")
279    @TelephonyBaseTest.tel_test_wrap
280    def test_msim_call_waiting_hold_swap_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self):
281        return msim_volte_wfc_call_voice_conf(
282            self.log,
283            self.tel_logger,
284            self.android_devices,
285            1,
286            0,
287            host_rat=['general', 'wfc'],
288            merge=False,
289            is_airplane_mode=True,
290            reject_once=True,
291            wifi_network_ssid=self.wifi_network_ssid,
292            wifi_network_pass=self.wifi_network_pass)
293
294    @test_tracker_info(uuid="c4461963-5d99-4c6a-b2f6-92de2437e0e7")
295    @TelephonyBaseTest.tel_test_wrap
296    def test_msim_call_waiting_hold_swap_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self):
297        return msim_volte_wfc_call_voice_conf(
298            self.log,
299            self.tel_logger,
300            self.android_devices,
301            1,
302            0,
303            host_rat=['general', 'wfc'],
304            merge=False,
305            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
306            reject_once=True,
307            wifi_network_ssid=self.wifi_network_ssid,
308            wifi_network_pass=self.wifi_network_pass)
309
310    @test_tracker_info(uuid="cece707d-fa13-4748-a777-873eaaa27bca")
311    @TelephonyBaseTest.tel_test_wrap
312    def test_msim_call_waiting_hold_swap_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self):
313        return msim_volte_wfc_call_voice_conf(
314            self.log,
315            self.tel_logger,
316            self.android_devices,
317            1,
318            1,
319            host_rat=['general', 'wfc'],
320            merge=False,
321            is_airplane_mode=True,
322            reject_once=True,
323            wifi_network_ssid=self.wifi_network_ssid,
324            wifi_network_pass=self.wifi_network_pass)
325
326    @test_tracker_info(uuid="bae04c51-99eb-43a5-9f30-f16ac369bb71")
327    @TelephonyBaseTest.tel_test_wrap
328    def test_msim_call_waiting_hold_swap_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self):
329        return msim_volte_wfc_call_voice_conf(
330            self.log,
331            self.tel_logger,
332            self.android_devices,
333            1,
334            1,
335            host_rat=['general', 'wfc'],
336            merge=False,
337            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
338            reject_once=True,
339            wifi_network_ssid=self.wifi_network_ssid,
340            wifi_network_pass=self.wifi_network_pass)
341
342    @test_tracker_info(uuid="c1d2c088-8782-45cd-b320-effecf6838b4")
343    @TelephonyBaseTest.tel_test_wrap
344    def test_msim_call_waiting_hold_swap_volte_esim_cellular_preferred_wifi_on_dds_slot_0(self):
345        return msim_volte_wfc_call_voice_conf(
346            self.log,
347            self.tel_logger,
348            self.android_devices,
349            1,
350            0,
351            host_rat=["general", "volte"],
352            merge=False,
353            is_airplane_mode=False,
354            is_wifi_connected=True,
355            reject_once=True,
356            wifi_network_ssid=self.wifi_network_ssid,
357            wifi_network_pass=self.wifi_network_pass)
358
359    @test_tracker_info(uuid="bb4119c9-f5bc-4ef1-acbd-e8f4099f2ba9")
360    @TelephonyBaseTest.tel_test_wrap
361    def test_msim_voice_conf_call_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self):
362        return msim_volte_wfc_call_voice_conf(
363            self.log,
364            self.tel_logger,
365            self.android_devices,
366            0,
367            0,
368            host_rat=['wfc', 'general'],
369            is_airplane_mode=True,
370            wifi_network_ssid=self.wifi_network_ssid,
371            wifi_network_pass=self.wifi_network_pass)
372
373    @test_tracker_info(uuid="2e48ad65-bfa9-43d3-aa3a-62f412d931cc")
374    @TelephonyBaseTest.tel_test_wrap
375    def test_msim_voice_conf_call_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self):
376        return msim_volte_wfc_call_voice_conf(
377            self.log,
378            self.tel_logger,
379            self.android_devices,
380            0,
381            0,
382            host_rat=['wfc', 'general'],
383            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
384            wifi_network_ssid=self.wifi_network_ssid,
385            wifi_network_pass=self.wifi_network_pass)
386
387    @test_tracker_info(uuid="39a9c791-16d0-4476-94e9-fc04e9f5f65a")
388    @TelephonyBaseTest.tel_test_wrap
389    def test_msim_voice_conf_call_wfc_psim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self):
390        return msim_volte_wfc_call_voice_conf(
391            self.log,
392            self.tel_logger,
393            self.android_devices,
394            0,
395            1,
396            host_rat=['wfc', 'general'],
397            is_airplane_mode=True,
398            wifi_network_ssid=self.wifi_network_ssid,
399            wifi_network_pass=self.wifi_network_pass)
400
401    @test_tracker_info(uuid="daba5874-0aaa-4f47-9548-e484dd72a8c6")
402    @TelephonyBaseTest.tel_test_wrap
403    def test_msim_voice_conf_call_wfc_psim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self):
404        return msim_volte_wfc_call_voice_conf(
405            self.log,
406            self.tel_logger,
407            self.android_devices,
408            0,
409            1,
410            host_rat=['wfc', 'general'],
411            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
412            wifi_network_ssid=self.wifi_network_ssid,
413            wifi_network_pass=self.wifi_network_pass)
414
415    @test_tracker_info(uuid="ef96a46b-8898-4d5e-a494-31b8047fc986")
416    @TelephonyBaseTest.tel_test_wrap
417    def test_msim_voice_conf_call_volte_psim_cellular_preferred_wifi_on_dds_slot_0(self):
418        return msim_volte_wfc_call_voice_conf(
419            self.log,
420            self.tel_logger,
421            self.android_devices,
422            0,
423            0,
424            host_rat=["volte", "general"],
425            is_wifi_connected=True,
426            wifi_network_ssid=self.wifi_network_ssid,
427            wifi_network_pass=self.wifi_network_pass)
428
429    @test_tracker_info(uuid="c565b2af-512c-4097-a4f7-7d920ea78373")
430    @TelephonyBaseTest.tel_test_wrap
431    def test_msim_voice_conf_call_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_0(self):
432        return msim_volte_wfc_call_voice_conf(
433            self.log,
434            self.tel_logger,
435            self.android_devices,
436            1,
437            0,
438            host_rat=['general', 'wfc'],
439            is_airplane_mode=True,
440            wifi_network_ssid=self.wifi_network_ssid,
441            wifi_network_pass=self.wifi_network_pass)
442
443    @test_tracker_info(uuid="078db8f5-eaf9-409c-878b-70c13be18802")
444    @TelephonyBaseTest.tel_test_wrap
445    def test_msim_voice_conf_call_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_0(self):
446        return msim_volte_wfc_call_voice_conf(
447            self.log,
448            self.tel_logger,
449            self.android_devices,
450            1,
451            0,
452            host_rat=['general', 'wfc'],
453            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
454            wifi_network_ssid=self.wifi_network_ssid,
455            wifi_network_pass=self.wifi_network_pass)
456
457    @test_tracker_info(uuid="77c70690-6206-43a5-9789-e9ff39235d42")
458    @TelephonyBaseTest.tel_test_wrap
459    def test_msim_voice_conf_call_wfc_esim_cellular_preferred_apm_on_with_volte_on_dds_slot_1(self):
460        return msim_volte_wfc_call_voice_conf(
461            self.log,
462            self.tel_logger,
463            self.android_devices,
464            1,
465            1,
466            host_rat=['general', 'wfc'],
467            is_airplane_mode=True,
468            wifi_network_ssid=self.wifi_network_ssid,
469            wifi_network_pass=self.wifi_network_pass)
470
471    @test_tracker_info(uuid="b48138dd-5c03-4592-a96d-f63833456197")
472    @TelephonyBaseTest.tel_test_wrap
473    def test_msim_voice_conf_call_wfc_esim_wifi_preferred_apm_off_with_volte_on_dds_slot_1(self):
474        return msim_volte_wfc_call_voice_conf(
475            self.log,
476            self.tel_logger,
477            self.android_devices,
478            1,
479            1,
480            host_rat=['general', 'wfc'],
481            wfc_mode=[WFC_MODE_WIFI_PREFERRED, WFC_MODE_WIFI_PREFERRED],
482            wifi_network_ssid=self.wifi_network_ssid,
483            wifi_network_pass=self.wifi_network_pass)
484
485    @test_tracker_info(uuid="c2e3ff0e-6112-4b79-92e2-2fabeaf87b1f")
486    @TelephonyBaseTest.tel_test_wrap
487    def test_msim_voice_conf_call_volte_esim_cellular_preferred_wifi_on_dds_slot_0(self):
488        return msim_volte_wfc_call_voice_conf(
489            self.log,
490            self.tel_logger,
491            self.android_devices,
492            1,
493            0,
494            host_rat=["general", "volte"],
495            is_wifi_connected=True,
496            wifi_network_ssid=self.wifi_network_ssid,
497            wifi_network_pass=self.wifi_network_pass)