1#!/usr/bin/env python3.4 2# 3# Copyright 2022 - 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 Telephony Pre Check In Sanity 18""" 19 20import time 21from acts import signals 22from acts.test_decorators import test_tracker_info 23from acts_contrib.test_utils.tel.TelephonyBaseTest import TelephonyBaseTest 24from acts_contrib.test_utils.tel.tel_defines import CARRIER_VZW 25from acts_contrib.test_utils.tel.tel_defines import WAIT_TIME_ANDROID_STATE_SETTLING 26from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_DISABLED 27from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_WIFI_PREFERRED 28from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_CELLULAR_PREFERRED 29from acts_contrib.test_utils.tel.tel_data_utils import get_mobile_data_usage 30from acts_contrib.test_utils.tel.tel_data_utils import remove_mobile_data_usage_limit 31from acts_contrib.test_utils.tel.tel_data_utils import set_mobile_data_usage_limit 32from acts_contrib.test_utils.tel.tel_message_utils import sms_in_collision_send_receive_verify 33from acts_contrib.test_utils.tel.tel_message_utils import sms_rx_power_off_multiple_send_receive_verify 34from acts_contrib.test_utils.tel.tel_message_utils import message_test 35from acts_contrib.test_utils.tel.tel_phone_setup_utils import ensure_phone_default_state 36from acts_contrib.test_utils.tel.tel_phone_setup_utils import ensure_phones_idle 37from acts_contrib.test_utils.tel.tel_test_utils import get_operator_name 38from acts_contrib.test_utils.tel.tel_test_utils import install_message_apk 39from acts.utils import rand_ascii_str 40from acts.libs.utils.multithread import multithread_func 41 42class TelLiveSmsTest(TelephonyBaseTest): 43 def setup_class(self): 44 TelephonyBaseTest.setup_class(self) 45 self.message_lengths = (50, 160, 180) 46 47 self.message_util = self.user_params.get("message_apk", None) 48 if isinstance(self.message_util, list): 49 self.message_util = self.message_util[0] 50 51 if self.message_util: 52 ads = self.android_devices 53 for ad in ads: 54 install_message_apk(ad, self.message_util) 55 56 def teardown_test(self): 57 ensure_phones_idle(self.log, self.android_devices) 58 59 def _get_wfc_mode(self, ad): 60 # Verizon doesn't supports wfc mode as WFC_MODE_WIFI_PREFERRED 61 carrier = ad.adb.getprop("gsm.sim.operator.alpha") 62 if carrier == CARRIER_VZW: 63 wfc = WFC_MODE_CELLULAR_PREFERRED 64 else: 65 wfc = WFC_MODE_WIFI_PREFERRED 66 return wfc 67 68 def check_band_support(self,ad): 69 carrier = ad.adb.getprop("gsm.sim.operator.alpha") 70 71 if int(ad.adb.getprop("ro.product.first_api_level")) > 30 and ( 72 carrier == CARRIER_VZW): 73 raise signals.TestSkip( 74 "Device Doesn't Support 2g/3G Band.") 75 76 def _sms_in_collision_test(self, ads): 77 for length in self.message_lengths: 78 message_array = [rand_ascii_str(length)] 79 message_array2 = [rand_ascii_str(length)] 80 if not sms_in_collision_send_receive_verify( 81 self.log, 82 ads[0], 83 ads[0], 84 ads[1], 85 ads[2], 86 message_array, 87 message_array2): 88 ads[0].log.warning( 89 "Test of SMS collision with length %s failed", length) 90 return False 91 else: 92 ads[0].log.info( 93 "Test of SMS collision with length %s succeeded", length) 94 self.log.info( 95 "Test of SMS collision with lengths %s characters succeeded.", 96 self.message_lengths) 97 return True 98 99 def _sms_in_collision_when_power_off_test(self, ads): 100 for length in self.message_lengths: 101 if not sms_rx_power_off_multiple_send_receive_verify( 102 self.log, 103 ads[0], 104 ads[1], 105 ads[2], 106 length, 107 length, 108 5, 109 5): 110 ads[0].log.warning( 111 "Test of SMS collision when power off with length %s failed", 112 length) 113 return False 114 else: 115 ads[0].log.info( 116 "Test of SMS collision when power off with length %s " 117 "succeeded", 118 length) 119 self.log.info( 120 "Test of SMS collision when power offwith lengths %s characters " 121 "succeeded.", 122 self.message_lengths) 123 return True 124 125 """ Tests Begin """ 126 127 @test_tracker_info(uuid="480b6ba2-1e5f-4a58-9d88-9b75c8fab1b6") 128 @TelephonyBaseTest.tel_test_wrap 129 def test_sms_mo_general(self): 130 """Test SMS basic function between two phone. Phones in any network. 131 132 Airplane mode is off. 133 Send SMS from PhoneA to PhoneB. 134 Verify received message on PhoneB is correct. 135 136 Returns: 137 True if success. 138 False if failed. 139 """ 140 return message_test( 141 self.log, 142 self.android_devices[0], 143 self.android_devices[1], 144 mo_rat='default', 145 mt_rat='default') 146 147 @test_tracker_info(uuid="aa87fe73-8236-44c7-865c-3fe3b733eeb4") 148 @TelephonyBaseTest.tel_test_wrap 149 def test_sms_mt_general(self): 150 """Test SMS basic function between two phone. Phones in any network. 151 152 Airplane mode is off. 153 Send SMS from PhoneB to PhoneA. 154 Verify received message on PhoneA is correct. 155 156 Returns: 157 True if success. 158 False if failed. 159 """ 160 return message_test( 161 self.log, 162 self.android_devices[1], 163 self.android_devices[0], 164 mo_rat='default', 165 mt_rat='default') 166 167 @test_tracker_info(uuid="bb8e1a06-a4b5-4f9b-9ab2-408ace9a1deb") 168 @TelephonyBaseTest.tel_test_wrap 169 def test_mms_mo_general(self): 170 """Test MMS basic function between two phone. Phones in any network. 171 172 Airplane mode is off. 173 Send MMS from PhoneA to PhoneB. 174 Verify received message on PhoneB is correct. 175 176 Returns: 177 True if success. 178 False if failed. 179 """ 180 return message_test( 181 self.log, 182 self.android_devices[0], 183 self.android_devices[1], 184 mo_rat='default', 185 mt_rat='default', 186 msg_type='mms') 187 188 @test_tracker_info(uuid="f2779e1e-7d09-43f0-8b5c-87eae5d146be") 189 @TelephonyBaseTest.tel_test_wrap 190 def test_mms_mt_general(self): 191 """Test MMS basic function between two phone. Phones in any network. 192 193 Airplane mode is off. 194 Send MMS from PhoneB to PhoneA. 195 Verify received message on PhoneA is correct. 196 197 Returns: 198 True if success. 199 False if failed. 200 """ 201 return message_test( 202 self.log, 203 self.android_devices[1], 204 self.android_devices[0], 205 mo_rat='default', 206 mt_rat='default', 207 msg_type='mms') 208 209 @test_tracker_info(uuid="2c229a4b-c954-4ba3-94ba-178dc7784d03") 210 @TelephonyBaseTest.tel_test_wrap 211 def test_sms_mo_2g(self): 212 """Test SMS basic function between two phone. Phones in 3g network. 213 214 Airplane mode is off. 215 Send SMS from PhoneA to PhoneB. 216 Verify received message on PhoneB is correct. 217 218 Returns: 219 True if success. 220 False if failed. 221 """ 222 self.check_band_support(self.android_devices[0]) 223 return message_test( 224 self.log, 225 self.android_devices[0], 226 self.android_devices[1], 227 mo_rat='2g', 228 mt_rat='general') 229 230 @test_tracker_info(uuid="17fafc41-7e12-47ab-a4cc-fb9bd94e79b9") 231 @TelephonyBaseTest.tel_test_wrap 232 def test_sms_mt_2g(self): 233 """Test SMS basic function between two phone. Phones in 3g network. 234 235 Airplane mode is off. 236 Send SMS from PhoneB to PhoneA. 237 Verify received message on PhoneA is correct. 238 239 Returns: 240 True if success. 241 False if failed. 242 """ 243 self.check_band_support(self.android_devices[0]) 244 return message_test( 245 self.log, 246 self.android_devices[1], 247 self.android_devices[0], 248 mo_rat='general', 249 mt_rat='2g') 250 251 @test_tracker_info(uuid="b4919317-18b5-483c-82f4-ced37a04f28d") 252 @TelephonyBaseTest.tel_test_wrap 253 def test_mms_mo_2g(self): 254 """Test MMS basic function between two phone. Phones in 3g network. 255 256 Airplane mode is off. 257 Send MMS from PhoneA to PhoneB. 258 Verify received message on PhoneB is correct. 259 260 Returns: 261 True if success. 262 False if failed. 263 """ 264 self.check_band_support(self.android_devices[0]) 265 return message_test( 266 self.log, 267 self.android_devices[0], 268 self.android_devices[1], 269 mo_rat='2g', 270 mt_rat='general', 271 msg_type='mms') 272 273 @test_tracker_info(uuid="cd56bb8a-0794-404d-95bd-c5fd00f4b35a") 274 @TelephonyBaseTest.tel_test_wrap 275 def test_mms_mt_2g(self): 276 """Test MMS basic function between two phone. Phones in 3g network. 277 278 Airplane mode is off. 279 Send MMS from PhoneB to PhoneA. 280 Verify received message on PhoneA is correct. 281 282 Returns: 283 True if success. 284 False if failed. 285 """ 286 self.check_band_support(self.android_devices[0]) 287 return message_test( 288 self.log, 289 self.android_devices[1], 290 self.android_devices[0], 291 mo_rat='general', 292 mt_rat='2g', 293 msg_type='mms') 294 295 @test_tracker_info(uuid="b39fbc30-9cc2-4d86-a9f4-6f0c1dd0a905") 296 @TelephonyBaseTest.tel_test_wrap 297 def test_mms_mo_2g_wifi(self): 298 """Test MMS basic function between two phone. Phones in 3g network. 299 300 Airplane mode is off. Phone in 2G. 301 Connect to Wifi. 302 Send MMS from PhoneA to PhoneB. 303 Verify received message on PhoneB is correct. 304 305 Returns: 306 True if success. 307 False if failed. 308 """ 309 self.check_band_support(self.android_devices[0]) 310 return message_test( 311 self.log, 312 self.android_devices[0], 313 self.android_devices[1], 314 mo_rat='2g', 315 mt_rat='general', 316 msg_type='mms', 317 wifi_ssid=self.wifi_network_ssid, 318 wifi_pwd=self.wifi_network_pass) 319 320 @test_tracker_info(uuid="b158a0a7-9697-4b3b-8d5b-f9b6b6bc1c03") 321 @TelephonyBaseTest.tel_test_wrap 322 def test_mms_mt_2g_wifi(self): 323 """Test MMS basic function between two phone. Phones in 3g network. 324 325 Airplane mode is off. Phone in 2G. 326 Connect to Wifi. 327 Send MMS from PhoneB to PhoneA. 328 Verify received message on PhoneA is correct. 329 330 Returns: 331 True if success. 332 False if failed. 333 """ 334 self.check_band_support(self.android_devices[0]) 335 return message_test( 336 self.log, 337 self.android_devices[1], 338 self.android_devices[0], 339 mo_rat='general', 340 mt_rat='2g', 341 msg_type='mms', 342 wifi_ssid=self.wifi_network_ssid, 343 wifi_pwd=self.wifi_network_pass) 344 345 @test_tracker_info(uuid="f094e3da-2523-4f92-a1f3-7cf9edcff850") 346 @TelephonyBaseTest.tel_test_wrap 347 def test_sms_mo_3g(self): 348 """Test SMS basic function between two phone. Phones in 3g network. 349 350 Airplane mode is off. 351 Send SMS from PhoneA to PhoneB. 352 Verify received message on PhoneB is correct. 353 354 Returns: 355 True if success. 356 False if failed. 357 """ 358 self.check_band_support(self.android_devices[0]) 359 return message_test( 360 self.log, 361 self.android_devices[0], 362 self.android_devices[1], 363 mo_rat='3g', 364 mt_rat='general') 365 366 @test_tracker_info(uuid="2186e152-bf83-4d6e-93eb-b4bf9ae2d76e") 367 @TelephonyBaseTest.tel_test_wrap 368 def test_sms_mt_3g(self): 369 """Test SMS basic function between two phone. Phones in 3g network. 370 371 Airplane mode is off. 372 Send SMS from PhoneB to PhoneA. 373 Verify received message on PhoneA is correct. 374 375 Returns: 376 True if success. 377 False if failed. 378 """ 379 self.check_band_support(self.android_devices[0]) 380 return message_test( 381 self.log, 382 self.android_devices[1], 383 self.android_devices[0], 384 mo_rat='general', 385 mt_rat='3g') 386 387 @test_tracker_info(uuid="e716c678-eee9-4a0d-a9cd-ca9eae4fea51") 388 @TelephonyBaseTest.tel_test_wrap 389 def test_mms_mo_3g(self): 390 """Test MMS basic function between two phone. Phones in 3g network. 391 392 Airplane mode is off. Phone in 3G. 393 Send MMS from PhoneA to PhoneB. 394 Verify received message on PhoneB is correct. 395 396 Returns: 397 True if success. 398 False if failed. 399 """ 400 self.check_band_support(self.android_devices[0]) 401 return message_test( 402 self.log, 403 self.android_devices[0], 404 self.android_devices[1], 405 mo_rat='3g', 406 mt_rat='general', 407 msg_type='mms') 408 409 @test_tracker_info(uuid="e864a99e-d935-4bd9-95f6-8183cdd3d760") 410 @TelephonyBaseTest.tel_test_wrap 411 def test_mms_mt_3g(self): 412 """Test MMS basic function between two phone. Phones in 3g network. 413 414 Airplane mode is off. Phone in 3G. 415 Send MMS from PhoneB to PhoneA. 416 Verify received message on PhoneA is correct. 417 418 Returns: 419 True if success. 420 False if failed. 421 """ 422 self.check_band_support(self.android_devices[0]) 423 return message_test( 424 self.log, 425 self.android_devices[1], 426 self.android_devices[0], 427 mo_rat='general', 428 mt_rat='3g', 429 msg_type='mms') 430 431 @test_tracker_info(uuid="07cdfe26-9021-4af3-8bf6-1abd0cb9e932") 432 @TelephonyBaseTest.tel_test_wrap 433 def test_sms_long_message_mo_3g(self): 434 """Test SMS basic function between two phone. Phones in 3g network. 435 436 Airplane mode is off. 437 Send SMS from PhoneA to PhoneB. 438 Verify received message on PhoneB is correct. 439 440 Returns: 441 True if success. 442 False if failed. 443 """ 444 self.check_band_support(self.android_devices[0]) 445 return message_test( 446 self.log, 447 self.android_devices[0], 448 self.android_devices[1], 449 mo_rat='3g', 450 mt_rat='general', 451 long_msg=True) 452 453 @test_tracker_info(uuid="740efe0d-fef9-42bc-a732-fe79a3485426") 454 @TelephonyBaseTest.tel_test_wrap 455 def test_sms_long_message_mt_3g(self): 456 """Test SMS basic function between two phone. Phones in 3g network. 457 458 Airplane mode is off. 459 Send SMS from PhoneB to PhoneA. 460 Verify received message on PhoneA is correct. 461 462 Returns: 463 True if success. 464 False if failed. 465 """ 466 self.check_band_support(self.android_devices[0]) 467 return message_test( 468 self.log, 469 self.android_devices[1], 470 self.android_devices[0], 471 mo_rat='general', 472 mt_rat='3g', 473 long_msg=True) 474 475 @test_tracker_info(uuid="b0d27de3-1a98-48da-a9c9-c20c8587f256") 476 @TelephonyBaseTest.tel_test_wrap 477 def test_mms_long_message_mo_3g(self): 478 """Test MMS basic function between two phone. Phones in 3g network. 479 480 Airplane mode is off. Phone in 3G. 481 Send MMS from PhoneA to PhoneB. 482 Verify received message on PhoneB is correct. 483 484 Returns: 485 True if success. 486 False if failed. 487 """ 488 self.check_band_support(self.android_devices[0]) 489 return message_test( 490 self.log, 491 self.android_devices[0], 492 self.android_devices[1], 493 mo_rat='3g', 494 mt_rat='general', 495 msg_type='mms', 496 long_msg=True) 497 498 @test_tracker_info(uuid="fd5a1583-94d2-4b3a-b613-a0a9745daa25") 499 @TelephonyBaseTest.tel_test_wrap 500 def test_mms_long_message_mt_3g(self): 501 """Test MMS basic function between two phone. Phones in 3g network. 502 503 Airplane mode is off. Phone in 3G. 504 Send MMS from PhoneB to PhoneA. 505 Verify received message on PhoneA is correct. 506 507 Returns: 508 True if success. 509 False if failed. 510 """ 511 self.check_band_support(self.android_devices[0]) 512 return message_test( 513 self.log, 514 self.android_devices[1], 515 self.android_devices[0], 516 mo_rat='general', 517 mt_rat='3g', 518 msg_type='mms', 519 long_msg=True) 520 521 @test_tracker_info(uuid="c6cfba55-6cde-41cd-93bb-667c317a0127") 522 @TelephonyBaseTest.tel_test_wrap 523 def test_mms_mo_3g_wifi(self): 524 """Test MMS basic function between two phone. Phones in 3g network. 525 526 Airplane mode is off. Phone in 3G. 527 Connect to Wifi. 528 Send MMS from PhoneA to PhoneB. 529 Verify received message on PhoneB is correct. 530 531 Returns: 532 True if success. 533 False if failed. 534 """ 535 self.check_band_support(self.android_devices[0]) 536 return message_test( 537 self.log, 538 self.android_devices[0], 539 self.android_devices[1], 540 mo_rat='3g', 541 mt_rat='general', 542 msg_type='mms', 543 wifi_ssid=self.wifi_network_ssid, 544 wifi_pwd=self.wifi_network_pass) 545 546 @test_tracker_info(uuid="83c5dd99-f2fe-433d-9775-80a36d0d493b") 547 @TelephonyBaseTest.tel_test_wrap 548 def test_mms_mt_3g_wifi(self): 549 """Test MMS basic function between two phone. Phones in 3g network. 550 551 Airplane mode is off. Phone in 3G. 552 Connect to Wifi. 553 Send MMS from PhoneB to PhoneA. 554 Verify received message on PhoneA is correct. 555 556 Returns: 557 True if success. 558 False if failed. 559 """ 560 self.check_band_support(self.android_devices[0]) 561 return message_test( 562 self.log, 563 self.android_devices[1], 564 self.android_devices[0], 565 mo_rat='general', 566 mt_rat='3g', 567 msg_type='mms', 568 wifi_ssid=self.wifi_network_ssid, 569 wifi_pwd=self.wifi_network_pass) 570 571 @test_tracker_info(uuid="54a68d6a-dae7-4fe6-b2bb-7c73151a4a73") 572 @TelephonyBaseTest.tel_test_wrap 573 def test_sms_mo_4g_volte(self): 574 """Test SMS text function between two phone. Phones in LTE network. 575 576 Airplane mode is off. VoLTE is enabled on PhoneA. 577 Send MMS from PhoneA to PhoneB. 578 Verify received message on PhoneB is correct. 579 580 Returns: 581 True if success. 582 False if failed. 583 """ 584 return message_test( 585 self.log, 586 self.android_devices[0], 587 self.android_devices[1], 588 mo_rat='volte', 589 mt_rat='general') 590 591 @test_tracker_info(uuid="d0adcd69-37fc-49d1-8dd3-c03dd163fb25") 592 @TelephonyBaseTest.tel_test_wrap 593 def test_sms_mt_4g_volte(self): 594 """Test SMS text function between two phone. Phones in LTE network. 595 596 Airplane mode is off. Phone in 4G. VoLTE is enabled on PhoneA. 597 Send MMS from PhoneB to PhoneA. 598 Verify received message on PhoneA is correct. 599 600 Returns: 601 True if success. 602 False if failed. 603 """ 604 return message_test( 605 self.log, 606 self.android_devices[1], 607 self.android_devices[0], 608 mo_rat='general', 609 mt_rat='volte') 610 611 @test_tracker_info(uuid="8d454a25-a1e5-4872-8193-d435a84d54fa") 612 @TelephonyBaseTest.tel_test_wrap 613 def test_mms_mo_4g_volte(self): 614 """Test MMS text function between two phone. Phones in LTE network. 615 616 Airplane mode is off. VoLTE is enabled on PhoneA. 617 Send MMS from PhoneA to PhoneB. 618 Verify received message on PhoneB is correct. 619 620 Returns: 621 True if success. 622 False if failed. 623 """ 624 return message_test( 625 self.log, 626 self.android_devices[0], 627 self.android_devices[1], 628 mo_rat='volte', 629 mt_rat='general', 630 msg_type='mms') 631 632 @test_tracker_info(uuid="79b8239e-9e6a-4781-942b-2df5b060718d") 633 @TelephonyBaseTest.tel_test_wrap 634 def test_mms_mt_4g_volte(self): 635 """Test MMS text function between two phone. Phones in LTE network. 636 637 Airplane mode is off. Phone in 4G. VoLTE is enabled on PhoneA. 638 Send MMS from PhoneB to PhoneA. 639 Verify received message on PhoneA is correct. 640 641 Returns: 642 True if success. 643 False if failed. 644 """ 645 return message_test( 646 self.log, 647 self.android_devices[1], 648 self.android_devices[0], 649 mo_rat='general', 650 mt_rat='volte', 651 msg_type='mms') 652 653 @test_tracker_info(uuid="5b9e1195-1e42-4405-890f-631e8c58d0c2") 654 @TelephonyBaseTest.tel_test_wrap 655 def test_sms_long_message_mo_4g_volte(self): 656 """Test SMS text function between two phone. Phones in LTE network. 657 658 Airplane mode is off. VoLTE is enabled on PhoneA. 659 Send MMS from PhoneA to PhoneB. 660 Verify received message on PhoneB is correct. 661 662 Returns: 663 True if success. 664 False if failed. 665 """ 666 return message_test( 667 self.log, 668 self.android_devices[0], 669 self.android_devices[1], 670 mo_rat='volte', 671 mt_rat='general', 672 long_msg=True) 673 674 @test_tracker_info(uuid="c328cbe7-1899-4ca8-af1c-5eb05683a322") 675 @TelephonyBaseTest.tel_test_wrap 676 def test_sms_long_message_mt_4g_volte(self): 677 """Test SMS text function between two phone. Phones in LTE network. 678 679 Airplane mode is off. Phone in 4G. VoLTE is enabled on PhoneA. 680 Send MMS from PhoneB to PhoneA. 681 Verify received message on PhoneA is correct. 682 683 Returns: 684 True if success. 685 False if failed. 686 """ 687 return message_test( 688 self.log, 689 self.android_devices[1], 690 self.android_devices[0], 691 mo_rat='general', 692 mt_rat='volte', 693 long_msg=True) 694 695 @test_tracker_info(uuid="a843c2f7-e4de-4b99-b3a9-f05ecda5fe73") 696 @TelephonyBaseTest.tel_test_wrap 697 def test_mms_long_message_mo_4g_volte(self): 698 """Test MMS text function between two phone. Phones in LTE network. 699 700 Airplane mode is off. VoLTE is enabled on PhoneA. 701 Send MMS from PhoneA to PhoneB. 702 Verify received message on PhoneB is correct. 703 704 Returns: 705 True if success. 706 False if failed. 707 """ 708 return message_test( 709 self.log, 710 self.android_devices[0], 711 self.android_devices[1], 712 mo_rat='volte', 713 mt_rat='general', 714 msg_type='mms', 715 long_msg=True) 716 717 @test_tracker_info(uuid="26dcba4d-7ddb-438d-84e7-0e754178b5ef") 718 @TelephonyBaseTest.tel_test_wrap 719 def test_mms_long_message_mt_4g_volte(self): 720 """Test MMS text function between two phone. Phones in LTE network. 721 722 Airplane mode is off. Phone in 4G. VoLTE is enabled on PhoneA. 723 Send MMS from PhoneB to PhoneA. 724 Verify received message on PhoneA is correct. 725 726 Returns: 727 True if success. 728 False if failed. 729 """ 730 return message_test( 731 self.log, 732 self.android_devices[1], 733 self.android_devices[0], 734 mo_rat='general', 735 mt_rat='volte', 736 msg_type='mms', 737 long_msg=True) 738 739 @test_tracker_info(uuid="c97687e2-155a-4cf3-9f51-22543b89d53e") 740 @TelephonyBaseTest.tel_test_wrap 741 def test_sms_mo_4g(self): 742 """Test SMS basic function between two phone. Phones in LTE network. 743 744 Airplane mode is off. 745 Send SMS from PhoneA to PhoneB. 746 Verify received message on PhoneB is correct. 747 748 Returns: 749 True if success. 750 False if failed. 751 """ 752 return message_test( 753 self.log, 754 self.android_devices[0], 755 self.android_devices[1], 756 mo_rat='csfb', 757 mt_rat='general') 758 759 @test_tracker_info(uuid="e2e01a47-2b51-4d00-a7b2-dbd3c8ffa6ae") 760 @TelephonyBaseTest.tel_test_wrap 761 def test_sms_mt_4g(self): 762 """Test SMS basic function between two phone. Phones in LTE network. 763 764 Airplane mode is off. 765 Send SMS from PhoneB to PhoneA. 766 Verify received message on PhoneA is correct. 767 768 Returns: 769 True if success. 770 False if failed. 771 """ 772 return message_test( 773 self.log, 774 self.android_devices[1], 775 self.android_devices[0], 776 mo_rat='general', 777 mt_rat='csfb') 778 779 @test_tracker_info(uuid="90fc6775-de19-49d1-8b8e-e3bc9384c733") 780 @TelephonyBaseTest.tel_test_wrap 781 def test_mms_mo_4g(self): 782 """Test MMS text function between two phone. Phones in LTE network. 783 784 Airplane mode is off. 785 Send MMS from PhoneA to PhoneB. 786 Verify received message on PhoneB is correct. 787 788 Returns: 789 True if success. 790 False if failed. 791 """ 792 return message_test( 793 self.log, 794 self.android_devices[0], 795 self.android_devices[1], 796 mo_rat='csfb', 797 mt_rat='general', 798 msg_type='mms') 799 800 @test_tracker_info(uuid="274572bb-ec9f-4c30-aab4-1f4c3f16b372") 801 @TelephonyBaseTest.tel_test_wrap 802 def test_mms_mt_4g(self): 803 """Test MMS text function between two phone. Phones in LTE network. 804 805 Airplane mode is off. Phone in 4G. 806 Send MMS from PhoneB to PhoneA. 807 Verify received message on PhoneA is correct. 808 809 Returns: 810 True if success. 811 False if failed. 812 """ 813 return message_test( 814 self.log, 815 self.android_devices[1], 816 self.android_devices[0], 817 mo_rat='general', 818 mt_rat='csfb', 819 msg_type='mms') 820 821 @test_tracker_info(uuid="44392814-98dd-406a-ae82-5c39e2d082f3") 822 @TelephonyBaseTest.tel_test_wrap 823 def test_sms_long_message_mo_4g(self): 824 """Test SMS basic function between two phone. Phones in LTE network. 825 826 Airplane mode is off. 827 Send SMS from PhoneA to PhoneB. 828 Verify received message on PhoneB is correct. 829 830 Returns: 831 True if success. 832 False if failed. 833 """ 834 return message_test( 835 self.log, 836 self.android_devices[0], 837 self.android_devices[1], 838 mo_rat='csfb', 839 mt_rat='general', 840 long_msg=True) 841 842 @test_tracker_info(uuid="0f8358a5-a7d5-4dfa-abe0-99fb8b10d48d") 843 @TelephonyBaseTest.tel_test_wrap 844 def test_sms_long_message_mt_4g(self): 845 """Test SMS basic function between two phone. Phones in LTE network. 846 847 Airplane mode is off. 848 Send SMS from PhoneB to PhoneA. 849 Verify received message on PhoneA is correct. 850 851 Returns: 852 True if success. 853 False if failed. 854 """ 855 return message_test( 856 self.log, 857 self.android_devices[1], 858 self.android_devices[0], 859 mo_rat='general', 860 mt_rat='csfb', 861 long_msg=True) 862 863 @test_tracker_info(uuid="18edde2b-7db9-40f4-96c4-3286a56d090b") 864 @TelephonyBaseTest.tel_test_wrap 865 def test_mms_long_message_mo_4g(self): 866 """Test MMS text function between two phone. Phones in LTE network. 867 868 Airplane mode is off. 869 Send MMS from PhoneA to PhoneB. 870 Verify received message on PhoneB is correct. 871 872 Returns: 873 True if success. 874 False if failed. 875 """ 876 return message_test( 877 self.log, 878 self.android_devices[0], 879 self.android_devices[1], 880 mo_rat='csfb', 881 mt_rat='general', 882 msg_type='mms', 883 long_msg=True) 884 885 @test_tracker_info(uuid="49805d08-6f1f-4c90-9bf4-e9acd6f63640") 886 @TelephonyBaseTest.tel_test_wrap 887 def test_mms_long_message_mt_4g(self): 888 """Test MMS text function between two phone. Phones in LTE network. 889 890 Airplane mode is off. Phone in 4G. 891 Send MMS from PhoneB to PhoneA. 892 Verify received message on PhoneA is correct. 893 894 Returns: 895 True if success. 896 False if failed. 897 """ 898 return message_test( 899 self.log, 900 self.android_devices[1], 901 self.android_devices[0], 902 mo_rat='general', 903 mt_rat='csfb', 904 msg_type='mms', 905 long_msg=True) 906 907 @test_tracker_info(uuid="c7349fdf-a376-4846-b466-1f329bd1557f") 908 @TelephonyBaseTest.tel_test_wrap 909 def test_mms_mo_4g_wifi(self): 910 """Test MMS text function between two phone. Phones in LTE network. 911 912 Airplane mode is off. Phone in 4G. 913 Connect to Wifi. 914 Send MMS from PhoneA to PhoneB. 915 Verify received message on PhoneB is correct. 916 917 Returns: 918 True if success. 919 False if failed. 920 """ 921 return message_test( 922 self.log, 923 self.android_devices[0], 924 self.android_devices[1], 925 mo_rat='csfb', 926 mt_rat='general', 927 msg_type='mms', 928 wifi_ssid=self.wifi_network_ssid, 929 wifi_pwd=self.wifi_network_pass) 930 931 @test_tracker_info(uuid="1affab34-e03c-49dd-9062-e9ed8eac406b") 932 @TelephonyBaseTest.tel_test_wrap 933 def test_mms_mt_4g_wifi(self): 934 """Test MMS text function between two phone. Phones in LTE network. 935 936 Airplane mode is off. Phone in 4G. 937 Connect to Wifi. 938 Send MMS from PhoneB to PhoneA. 939 Verify received message on PhoneA is correct. 940 941 Returns: 942 True if success. 943 False if failed. 944 """ 945 return message_test( 946 self.log, 947 self.android_devices[1], 948 self.android_devices[0], 949 mo_rat='general', 950 mt_rat='csfb', 951 msg_type='mms', 952 wifi_ssid=self.wifi_network_ssid, 953 wifi_pwd=self.wifi_network_pass) 954 955 @test_tracker_info(uuid="7ee57edb-2962-4d20-b6eb-79cebce91fff") 956 @TelephonyBaseTest.tel_test_wrap 957 def test_sms_mo_in_call_volte(self): 958 """ Test MO SMS during a MO VoLTE call. 959 960 Make sure PhoneA is in LTE mode (with VoLTE). 961 Make sure PhoneB is able to make/receive call. 962 Call from PhoneA to PhoneB, accept on PhoneB, send SMS on PhoneA. 963 964 Returns: 965 True if pass; False if fail. 966 """ 967 return message_test( 968 self.log, 969 self.android_devices[0], 970 self.android_devices[1], 971 mo_rat='volte', 972 mt_rat='general', 973 msg_in_call=True) 974 975 @test_tracker_info(uuid="5576276b-4ca1-41cc-bb74-31ccd71f9f96") 976 @TelephonyBaseTest.tel_test_wrap 977 def test_sms_mt_in_call_volte(self): 978 """ Test MT SMS during a MO VoLTE call. 979 980 Make sure PhoneA is in LTE mode (with VoLTE). 981 Make sure PhoneB is able to make/receive call. 982 Call from PhoneA to PhoneB, accept on PhoneB, receive SMS on PhoneA. 983 984 Returns: 985 True if pass; False if fail. 986 """ 987 return message_test( 988 self.log, 989 self.android_devices[1], 990 self.android_devices[0], 991 mo_rat='general', 992 mt_rat='volte', 993 msg_in_call=True) 994 995 @test_tracker_info(uuid="3bf8ff74-baa6-4dc6-86eb-c13816fa9bc8") 996 @TelephonyBaseTest.tel_test_wrap 997 def test_mms_mo_in_call_volte(self): 998 """ Test MO MMS during a MO VoLTE call. 999 1000 Make sure PhoneA is in LTE mode (with VoLTE). 1001 Make sure PhoneB is able to make/receive call. 1002 Call from PhoneA to PhoneB, accept on PhoneB, send MMS on PhoneA. 1003 1004 Returns: 1005 True if pass; False if fail. 1006 """ 1007 return message_test( 1008 self.log, 1009 self.android_devices[0], 1010 self.android_devices[1], 1011 mo_rat='volte', 1012 mt_rat='general', 1013 msg_type='mms', 1014 msg_in_call=True) 1015 1016 @test_tracker_info(uuid="289e6516-5f66-403a-b292-50d067151730") 1017 @TelephonyBaseTest.tel_test_wrap 1018 def test_mms_mt_in_call_volte(self): 1019 """ Test MT MMS during a MO VoLTE call. 1020 1021 Make sure PhoneA is in LTE mode (with VoLTE). 1022 Make sure PhoneB is able to make/receive call. 1023 Call from PhoneA to PhoneB, accept on PhoneB, receive MMS on PhoneA. 1024 1025 Returns: 1026 True if pass; False if fail. 1027 """ 1028 return message_test( 1029 self.log, 1030 self.android_devices[1], 1031 self.android_devices[0], 1032 mo_rat='general', 1033 mt_rat='volte', 1034 msg_type='mms', 1035 msg_in_call=True) 1036 1037 @test_tracker_info(uuid="5654d974-3c32-4cce-9d07-0c96213dacc5") 1038 @TelephonyBaseTest.tel_test_wrap 1039 def test_mms_mo_in_call_volte_wifi(self): 1040 """ Test MO MMS during a MO VoLTE call. 1041 1042 Make sure PhoneA is in LTE mode (with VoLTE). 1043 Make sure PhoneB is able to make/receive call. 1044 Connect PhoneA to Wifi. 1045 Call from PhoneA to PhoneB, accept on PhoneB, send MMS on PhoneA. 1046 1047 Returns: 1048 True if pass; False if fail. 1049 """ 1050 return message_test( 1051 self.log, 1052 self.android_devices[0], 1053 self.android_devices[1], 1054 mo_rat='volte', 1055 mt_rat='general', 1056 msg_type='mms', 1057 msg_in_call=True, 1058 wifi_ssid=self.wifi_network_ssid, 1059 wifi_pwd=self.wifi_network_pass) 1060 1061 @test_tracker_info(uuid="cbd5ab3d-d76a-4ece-ac09-62efeead7550") 1062 @TelephonyBaseTest.tel_test_wrap 1063 def test_mms_mt_in_call_volte_wifi(self): 1064 """ Test MT MMS during a MO VoLTE call. 1065 1066 Make sure PhoneA is in LTE mode (with VoLTE). 1067 Make sure PhoneB is able to make/receive call. 1068 Connect PhoneA to Wifi. 1069 Call from PhoneA to PhoneB, accept on PhoneB, receive MMS on PhoneA. 1070 1071 Returns: 1072 True if pass; False if fail. 1073 """ 1074 return message_test( 1075 self.log, 1076 self.android_devices[1], 1077 self.android_devices[0], 1078 mo_rat='general', 1079 mt_rat='volte', 1080 msg_type='mms', 1081 msg_in_call=True, 1082 wifi_ssid=self.wifi_network_ssid, 1083 wifi_pwd=self.wifi_network_pass) 1084 1085 @test_tracker_info(uuid="b6e9ce80-8577-48e5-baa7-92780932f278") 1086 @TelephonyBaseTest.tel_test_wrap 1087 def test_sms_mo_in_call_csfb(self): 1088 """ Test MO SMS during a MO csfb call. 1089 1090 Make sure PhoneA is in LTE mode (no VoLTE). 1091 Make sure PhoneB is able to make/receive call. 1092 Call from PhoneA to PhoneB, accept on PhoneB, send SMS on PhoneA. 1093 1094 Returns: 1095 True if pass; False if fail. 1096 """ 1097 return message_test( 1098 self.log, 1099 self.android_devices[0], 1100 self.android_devices[1], 1101 mo_rat='csfb', 1102 mt_rat='general', 1103 msg_in_call=True) 1104 1105 @test_tracker_info(uuid="93f0b58a-01e9-4bc9-944f-729d455597dd") 1106 @TelephonyBaseTest.tel_test_wrap 1107 def test_sms_mt_in_call_csfb(self): 1108 """ Test MT SMS during a MO csfb call. 1109 1110 Make sure PhoneA is in LTE mode (no VoLTE). 1111 Make sure PhoneB is able to make/receive call. 1112 Call from PhoneA to PhoneB, accept on PhoneB, receive receive on PhoneA. 1113 1114 Returns: 1115 True if pass; False if fail. 1116 """ 1117 return message_test( 1118 self.log, 1119 self.android_devices[1], 1120 self.android_devices[0], 1121 mo_rat='general', 1122 mt_rat='csfb', 1123 msg_in_call=True) 1124 1125 @test_tracker_info(uuid="bd8e9e80-1955-429f-b122-96b127771bbb") 1126 @TelephonyBaseTest.tel_test_wrap 1127 def test_mms_mo_in_call_csfb(self): 1128 """ Test MO MMS during a MO csfb call. 1129 1130 Make sure PhoneA is in LTE mode (no VoLTE). 1131 Make sure PhoneB is able to make/receive call. 1132 Call from PhoneA to PhoneB, accept on PhoneB, send MMS on PhoneA. 1133 1134 Returns: 1135 True if pass; False if fail. 1136 """ 1137 return message_test( 1138 self.log, 1139 self.android_devices[0], 1140 self.android_devices[1], 1141 mo_rat='csfb', 1142 mt_rat='general', 1143 msg_type='mms', 1144 msg_in_call=True) 1145 1146 @test_tracker_info(uuid="89d65fd2-fc75-4fc5-a018-2d05a4364304") 1147 @TelephonyBaseTest.tel_test_wrap 1148 def test_mms_mt_in_call_csfb(self): 1149 """ Test MT MMS during a MO csfb call. 1150 1151 Make sure PhoneA is in LTE mode (no VoLTE). 1152 Make sure PhoneB is able to make/receive call. 1153 Call from PhoneA to PhoneB, accept on PhoneB, receive receive on PhoneA. 1154 1155 Returns: 1156 True if pass; False if fail. 1157 """ 1158 return message_test( 1159 self.log, 1160 self.android_devices[1], 1161 self.android_devices[0], 1162 mo_rat='general', 1163 mt_rat='csfb', 1164 msg_type='mms', 1165 msg_in_call=True) 1166 1167 @test_tracker_info(uuid="9c542b5d-3b8f-4d4a-80de-fb804f066c3d") 1168 @TelephonyBaseTest.tel_test_wrap 1169 def test_mms_mo_in_call_csfb_wifi(self): 1170 """ Test MO MMS during a MO csfb call. 1171 1172 Make sure PhoneA is in LTE mode (no VoLTE). 1173 Make sure PhoneB is able to make/receive call. 1174 Connect PhoneA to Wifi. 1175 Call from PhoneA to PhoneB, accept on PhoneB, send MMS on PhoneA. 1176 1177 Returns: 1178 True if pass; False if fail. 1179 """ 1180 return message_test( 1181 self.log, 1182 self.android_devices[0], 1183 self.android_devices[1], 1184 mo_rat='csfb', 1185 mt_rat='general', 1186 msg_type='mms', 1187 msg_in_call=True, 1188 wifi_ssid=self.wifi_network_ssid, 1189 wifi_pwd=self.wifi_network_pass) 1190 1191 @test_tracker_info(uuid="c1bed6f5-f65c-4f4d-aa06-0e9f5c867819") 1192 @TelephonyBaseTest.tel_test_wrap 1193 def test_mms_mt_in_call_csfb_wifi(self): 1194 """ Test MT MMS during a MO csfb call. 1195 1196 Make sure PhoneA is in LTE mode (no VoLTE). 1197 Make sure PhoneB is able to make/receive call. 1198 Connect PhoneA to Wifi. 1199 Call from PhoneA to PhoneB, accept on PhoneB, receive receive on PhoneA. 1200 1201 Returns: 1202 True if pass; False if fail. 1203 """ 1204 return message_test( 1205 self.log, 1206 self.android_devices[1], 1207 self.android_devices[0], 1208 mo_rat='general', 1209 mt_rat='csfb', 1210 msg_type='mms', 1211 msg_in_call=True, 1212 wifi_ssid=self.wifi_network_ssid, 1213 wifi_pwd=self.wifi_network_pass) 1214 1215 @test_tracker_info(uuid="60996028-b4b2-4a16-9e4b-eb6ef80179a7") 1216 @TelephonyBaseTest.tel_test_wrap 1217 def test_sms_mo_in_call_3g(self): 1218 """ Test MO SMS during a MO 3G call. 1219 1220 Make sure PhoneA is in 3g. 1221 Make sure PhoneB is able to make/receive call. 1222 Call from PhoneA to PhoneB, accept on PhoneB, send SMS on PhoneA. 1223 1224 Returns: 1225 True if pass; False if fail. 1226 """ 1227 self.check_band_support(self.android_devices[0]) 1228 return message_test( 1229 self.log, 1230 self.android_devices[0], 1231 self.android_devices[1], 1232 mo_rat='3g', 1233 mt_rat='general', 1234 msg_in_call=True) 1235 1236 @test_tracker_info(uuid="6b352aac-9b4e-4062-8980-3b1c0e61015b") 1237 @TelephonyBaseTest.tel_test_wrap 1238 def test_sms_mt_in_call_3g(self): 1239 """ Test MT SMS during a MO 3G call. 1240 1241 Make sure PhoneA is in 3g. 1242 Make sure PhoneB is able to make/receive call. 1243 Call from PhoneA to PhoneB, accept on PhoneB, receive SMS on PhoneA. 1244 1245 Returns: 1246 True if pass; False if fail. 1247 """ 1248 self.check_band_support(self.android_devices[0]) 1249 return message_test( 1250 self.log, 1251 self.android_devices[1], 1252 self.android_devices[0], 1253 mo_rat='general', 1254 mt_rat='3g', 1255 msg_in_call=True) 1256 1257 @test_tracker_info(uuid="cfae3613-c490-4ce0-b00b-c13286d85027") 1258 @TelephonyBaseTest.tel_test_wrap 1259 def test_mms_mo_in_call_3g(self): 1260 """ Test MO MMS during a MO 3G call. 1261 1262 Make sure PhoneA is in 3g. 1263 Make sure PhoneB is able to make/receive call. 1264 Call from PhoneA to PhoneB, accept on PhoneB. 1265 Send MMS on PhoneA during the call, MMS is send out after call is released. 1266 1267 Returns: 1268 True if pass; False if fail. 1269 """ 1270 self.check_band_support(self.android_devices[0]) 1271 return message_test( 1272 self.log, 1273 self.android_devices[0], 1274 self.android_devices[1], 1275 mo_rat='3g', 1276 mt_rat='general', 1277 msg_type='mms', 1278 msg_in_call=True) 1279 1280 @test_tracker_info(uuid="42fc8c16-4a30-4f63-9728-2639f2b79c4c") 1281 @TelephonyBaseTest.tel_test_wrap 1282 def test_mms_mt_in_call_3g(self): 1283 """ Test MT MMS during a MO 3G call. 1284 1285 Make sure PhoneA is in 3g. 1286 Make sure PhoneB is able to make/receive call. 1287 Call from PhoneA to PhoneB, accept on PhoneB, receive MMS on PhoneA. 1288 1289 Returns: 1290 True if pass; False if fail. 1291 """ 1292 self.check_band_support(self.android_devices[0]) 1293 return message_test( 1294 self.log, 1295 self.android_devices[1], 1296 self.android_devices[0], 1297 mo_rat='general', 1298 mt_rat='3g', 1299 msg_type='mms', 1300 msg_in_call=True) 1301 1302 @test_tracker_info(uuid="18093f87-aab5-4d86-b178-8085a1651828") 1303 @TelephonyBaseTest.tel_test_wrap 1304 def test_mms_mo_in_call_3g_wifi(self): 1305 """ Test MO MMS during a 3G call with Wifi on. 1306 1307 Make sure PhoneA is in 3g. 1308 Make sure PhoneB is able to make/receive call. 1309 Call from PhoneA to PhoneB, accept on PhoneB. 1310 Send MMS on PhoneA during the call, MMS is send out after call is released. 1311 1312 Returns: 1313 True if pass; False if fail. 1314 """ 1315 self.check_band_support(self.android_devices[0]) 1316 return message_test( 1317 self.log, 1318 self.android_devices[0], 1319 self.android_devices[1], 1320 mo_rat='3g', 1321 mt_rat='general', 1322 msg_type='mms', 1323 msg_in_call=True, 1324 wifi_ssid=self.wifi_network_ssid, 1325 wifi_pwd=self.wifi_network_pass) 1326 1327 @test_tracker_info(uuid="8fe3359a-0857-401f-a043-c47a2a2acb47") 1328 @TelephonyBaseTest.tel_test_wrap 1329 def test_mms_mt_in_call_3g_wifi(self): 1330 """ Test MT MMS during a 3G call with Wifi On. 1331 1332 Make sure PhoneA is in 3g. 1333 Make sure PhoneB is able to make/receive call. 1334 Call from PhoneA to PhoneB, accept on PhoneB, receive MMS on PhoneA. 1335 1336 Returns: 1337 True if pass; False if fail. 1338 """ 1339 self.check_band_support(self.android_devices[0]) 1340 return message_test( 1341 self.log, 1342 self.android_devices[1], 1343 self.android_devices[0], 1344 mo_rat='general', 1345 mt_rat='3g', 1346 msg_type='mms', 1347 msg_in_call=True, 1348 wifi_ssid=self.wifi_network_ssid, 1349 wifi_pwd=self.wifi_network_pass) 1350 1351 @test_tracker_info(uuid="ed720013-e366-448b-8901-bb09d26cea05") 1352 @TelephonyBaseTest.tel_test_wrap 1353 def test_sms_mo_iwlan(self): 1354 """ Test MO SMS, Phone in APM, WiFi connected, WFC Cell Preferred mode. 1355 1356 Make sure PhoneA APM, WiFi connected, WFC cellular preferred mode. 1357 Make sure PhoneA report iwlan as data rat. 1358 Make sure PhoneB is able to make/receive call/sms. 1359 Send SMS on PhoneA. 1360 1361 Returns: 1362 True if pass; False if fail. 1363 """ 1364 return message_test( 1365 self.log, 1366 self.android_devices[0], 1367 self.android_devices[1], 1368 mo_rat='wfc', 1369 mt_rat='general', 1370 is_airplane_mode=True, 1371 wfc_mode=WFC_MODE_CELLULAR_PREFERRED, 1372 wifi_ssid=self.wifi_network_ssid, 1373 wifi_pwd=self.wifi_network_pass) 1374 1375 @test_tracker_info(uuid="4d4b0b7b-bf00-44f6-a0ed-23b438c30fc2") 1376 @TelephonyBaseTest.tel_test_wrap 1377 def test_sms_mt_iwlan(self): 1378 """ Test MT SMS, Phone in APM, WiFi connected, WFC Cell Preferred mode. 1379 1380 Make sure PhoneA APM, WiFi connected, WFC cellular preferred mode. 1381 Make sure PhoneA report iwlan as data rat. 1382 Make sure PhoneB is able to make/receive call/sms. 1383 Receive SMS on PhoneA. 1384 1385 Returns: 1386 True if pass; False if fail. 1387 """ 1388 return message_test( 1389 self.log, 1390 self.android_devices[1], 1391 self.android_devices[0], 1392 mo_rat='general', 1393 mt_rat='wfc', 1394 is_airplane_mode=True, 1395 wfc_mode=WFC_MODE_CELLULAR_PREFERRED, 1396 wifi_ssid=self.wifi_network_ssid, 1397 wifi_pwd=self.wifi_network_pass) 1398 1399 @test_tracker_info(uuid="264e2557-e18c-41c0-8d99-49cee3fe6f07") 1400 @TelephonyBaseTest.tel_test_wrap 1401 def test_mms_mo_iwlan(self): 1402 """ Test MO MMS, Phone in APM, WiFi connected, WFC Cell Preferred mode. 1403 1404 Make sure PhoneA APM, WiFi connected, WFC Cell preferred mode. 1405 Make sure PhoneA report iwlan as data rat. 1406 Make sure PhoneB is able to make/receive call/sms. 1407 Send MMS on PhoneA. 1408 1409 Returns: 1410 True if pass; False if fail. 1411 """ 1412 return message_test( 1413 self.log, 1414 self.android_devices[0], 1415 self.android_devices[1], 1416 mo_rat='wfc', 1417 mt_rat='general', 1418 msg_type='mms', 1419 is_airplane_mode=True, 1420 wfc_mode=WFC_MODE_CELLULAR_PREFERRED, 1421 wifi_ssid=self.wifi_network_ssid, 1422 wifi_pwd=self.wifi_network_pass) 1423 1424 @test_tracker_info(uuid="330db618-f074-4bfc-bf5e-78939fbee532") 1425 @TelephonyBaseTest.tel_test_wrap 1426 def test_mms_mt_iwlan(self): 1427 """ Test MT MMS, Phone in APM, WiFi connected, WFC Cell Preferred mode. 1428 1429 Make sure PhoneA APM, WiFi connected, WFC Cell preferred mode. 1430 Make sure PhoneA report iwlan as data rat. 1431 Make sure PhoneB is able to make/receive call/sms. 1432 Receive MMS on PhoneA. 1433 1434 Returns: 1435 True if pass; False if fail. 1436 """ 1437 return message_test( 1438 self.log, 1439 self.android_devices[1], 1440 self.android_devices[0], 1441 mo_rat='general', 1442 mt_rat='wfc', 1443 msg_type='mms', 1444 is_airplane_mode=True, 1445 wfc_mode=WFC_MODE_CELLULAR_PREFERRED, 1446 wifi_ssid=self.wifi_network_ssid, 1447 wifi_pwd=self.wifi_network_pass) 1448 1449 @test_tracker_info(uuid="875ce520-7a09-4032-8e88-965ce143c1f5") 1450 @TelephonyBaseTest.tel_test_wrap 1451 def test_sms_long_message_mo_iwlan(self): 1452 """ Test MO SMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode. 1453 1454 Make sure PhoneA APM, WiFi connected, WFC WiFi preferred mode. 1455 Make sure PhoneA report iwlan as data rat. 1456 Make sure PhoneB is able to make/receive call/sms. 1457 Send SMS on PhoneA. 1458 1459 Returns: 1460 True if pass; False if fail. 1461 """ 1462 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1463 return message_test( 1464 self.log, 1465 self.android_devices[0], 1466 self.android_devices[1], 1467 mo_rat='wfc', 1468 mt_rat='general', 1469 long_msg=True, 1470 is_airplane_mode=True, 1471 wfc_mode=_wfc_mode, 1472 wifi_ssid=self.wifi_network_ssid, 1473 wifi_pwd=self.wifi_network_pass) 1474 1475 @test_tracker_info(uuid="a317a1b3-16c8-4c2d-bbfd-aebcc0897499") 1476 @TelephonyBaseTest.tel_test_wrap 1477 def test_sms_long_message_mt_iwlan(self): 1478 """ Test MT SMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode. 1479 1480 Make sure PhoneA APM, WiFi connected, WFC WiFi preferred mode. 1481 Make sure PhoneA report iwlan as data rat. 1482 Make sure PhoneB is able to make/receive call/sms. 1483 Receive SMS on PhoneA. 1484 1485 Returns: 1486 True if pass; False if fail. 1487 """ 1488 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1489 return message_test( 1490 self.log, 1491 self.android_devices[1], 1492 self.android_devices[0], 1493 mo_rat='general', 1494 mt_rat='wfc', 1495 long_msg=True, 1496 is_airplane_mode=True, 1497 wfc_mode=_wfc_mode, 1498 wifi_ssid=self.wifi_network_ssid, 1499 wifi_pwd=self.wifi_network_pass) 1500 1501 @test_tracker_info(uuid="d692c439-6e96-45a6-be0f-1ff81226416c") 1502 @TelephonyBaseTest.tel_test_wrap 1503 def test_mms_long_message_mo_iwlan(self): 1504 """ Test MO MMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode. 1505 1506 Make sure PhoneA APM, WiFi connected, WFC WiFi preferred mode. 1507 Make sure PhoneA report iwlan as data rat. 1508 Make sure PhoneB is able to make/receive call/sms. 1509 Send MMS on PhoneA. 1510 1511 Returns: 1512 True if pass; False if fail. 1513 """ 1514 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1515 return message_test( 1516 self.log, 1517 self.android_devices[0], 1518 self.android_devices[1], 1519 mo_rat='wfc', 1520 mt_rat='general', 1521 msg_type='mms', 1522 long_msg=True, 1523 is_airplane_mode=True, 1524 wfc_mode=_wfc_mode, 1525 wifi_ssid=self.wifi_network_ssid, 1526 wifi_pwd=self.wifi_network_pass) 1527 1528 @test_tracker_info(uuid="a0958a1b-23ea-4353-9af6-7bc5d6a0a3d2") 1529 @TelephonyBaseTest.tel_test_wrap 1530 def test_mms_long_message_mt_iwlan(self): 1531 """ Test MT MMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode. 1532 1533 Make sure PhoneA APM, WiFi connected, WFC WiFi preferred mode. 1534 Make sure PhoneA report iwlan as data rat. 1535 Make sure PhoneB is able to make/receive call/sms. 1536 Receive MMS on PhoneA. 1537 1538 Returns: 1539 True if pass; False if fail. 1540 """ 1541 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1542 return message_test( 1543 self.log, 1544 self.android_devices[1], 1545 self.android_devices[0], 1546 mo_rat='general', 1547 mt_rat='wfc', 1548 msg_type='mms', 1549 long_msg=True, 1550 is_airplane_mode=True, 1551 wfc_mode=_wfc_mode, 1552 wifi_ssid=self.wifi_network_ssid, 1553 wifi_pwd=self.wifi_network_pass) 1554 1555 @test_tracker_info(uuid="94bb8297-f646-4793-9d97-6f82a706127a") 1556 @TelephonyBaseTest.tel_test_wrap 1557 def test_sms_mo_iwlan_apm_off(self): 1558 """ Test MO SMS, Phone in APM off, WiFi connected, WFC WiFi Preferred mode. 1559 1560 Make sure PhoneA APM off, WiFi connected, WFC WiFi preferred mode. 1561 Make sure PhoneA report iwlan as data rat. 1562 Make sure PhoneB is able to make/receive call/sms. 1563 Send SMS on PhoneA. 1564 1565 Returns: 1566 True if pass; False if fail. 1567 """ 1568 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1569 return message_test( 1570 self.log, 1571 self.android_devices[0], 1572 self.android_devices[1], 1573 mo_rat='wfc', 1574 mt_rat='general', 1575 wfc_mode=_wfc_mode, 1576 wifi_ssid=self.wifi_network_ssid, 1577 wifi_pwd=self.wifi_network_pass) 1578 1579 @test_tracker_info(uuid="e4acce6a-75ae-45c1-be85-d3a2eb2da7c2") 1580 @TelephonyBaseTest.tel_test_wrap 1581 def test_sms_mt_iwlan_apm_off(self): 1582 """ Test MT SMS, Phone in APM off, WiFi connected, WFC WiFi Preferred mode. 1583 1584 Make sure PhoneA APM off, WiFi connected, WFC WiFi preferred mode. 1585 Make sure PhoneA report iwlan as data rat. 1586 Make sure PhoneB is able to make/receive call/sms. 1587 Receive SMS on PhoneA. 1588 1589 Returns: 1590 True if pass; False if fail. 1591 """ 1592 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1593 return message_test( 1594 self.log, 1595 self.android_devices[1], 1596 self.android_devices[0], 1597 mo_rat='general', 1598 mt_rat='wfc', 1599 wfc_mode=_wfc_mode, 1600 wifi_ssid=self.wifi_network_ssid, 1601 wifi_pwd=self.wifi_network_pass) 1602 1603 @test_tracker_info(uuid="6c003c28-5712-4456-89cb-64d417ab2ce4") 1604 @TelephonyBaseTest.tel_test_wrap 1605 def test_mms_mo_iwlan_apm_off(self): 1606 """ Test MO MMS, Phone in APM off, WiFi connected, WFC WiFi Preferred mode. 1607 1608 Make sure PhoneA APM off, WiFi connected, WFC WiFi preferred mode. 1609 Make sure PhoneA report iwlan as data rat. 1610 Make sure PhoneB is able to make/receive call/sms. 1611 Send MMS on PhoneA. 1612 1613 Returns: 1614 True if pass; False if fail. 1615 """ 1616 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1617 return message_test( 1618 self.log, 1619 self.android_devices[0], 1620 self.android_devices[1], 1621 mo_rat='wfc', 1622 mt_rat='general', 1623 msg_type='mms', 1624 wfc_mode=_wfc_mode, 1625 wifi_ssid=self.wifi_network_ssid, 1626 wifi_pwd=self.wifi_network_pass) 1627 1628 @test_tracker_info(uuid="0ac5c8ff-83e5-49f2-ba71-ebb283feed9e") 1629 @TelephonyBaseTest.tel_test_wrap 1630 def test_mms_mt_iwlan_apm_off(self): 1631 """ Test MT MMS, Phone in APM off, WiFi connected, WFC WiFi Preferred mode. 1632 1633 Make sure PhoneA APM off, WiFi connected, WFC WiFi preferred mode. 1634 Make sure PhoneA report iwlan as data rat. 1635 Make sure PhoneB is able to make/receive call/sms. 1636 Receive MMS on PhoneA. 1637 1638 Returns: 1639 True if pass; False if fail. 1640 """ 1641 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1642 return message_test( 1643 self.log, 1644 self.android_devices[1], 1645 self.android_devices[0], 1646 mo_rat='general', 1647 mt_rat='wfc', 1648 msg_type='mms', 1649 wfc_mode=_wfc_mode, 1650 wifi_ssid=self.wifi_network_ssid, 1651 wifi_pwd=self.wifi_network_pass) 1652 1653 @test_tracker_info(uuid="075933a2-df7f-4374-a405-92f96bcc7770") 1654 @TelephonyBaseTest.tel_test_wrap 1655 def test_sms_mo_apm_wifi_wfc_off(self): 1656 """ Test MO SMS, Phone in APM, WiFi connected, WFC off. 1657 1658 Make sure PhoneA APM, WiFi connected, WFC off. 1659 Make sure PhoneB is able to make/receive call/sms. 1660 Send SMS on PhoneA. 1661 1662 Returns: 1663 True if pass; False if fail. 1664 """ 1665 return message_test( 1666 self.log, 1667 self.android_devices[0], 1668 self.android_devices[1], 1669 mo_rat='wfc', 1670 mt_rat='general', 1671 is_airplane_mode=True, 1672 wfc_mode=WFC_MODE_DISABLED, 1673 wifi_ssid=self.wifi_network_ssid, 1674 wifi_pwd=self.wifi_network_pass) 1675 1676 @test_tracker_info(uuid="637af228-29fc-4b74-a963-883f66ddf080") 1677 @TelephonyBaseTest.tel_test_wrap 1678 def test_sms_mt_apm_wifi_wfc_off(self): 1679 """ Test MT SMS, Phone in APM, WiFi connected, WFC off. 1680 1681 Make sure PhoneA APM, WiFi connected, WFC off. 1682 Make sure PhoneB is able to make/receive call/sms. 1683 Receive SMS on PhoneA. 1684 1685 Returns: 1686 True if pass; False if fail. 1687 """ 1688 return message_test( 1689 self.log, 1690 self.android_devices[1], 1691 self.android_devices[0], 1692 mo_rat='general', 1693 mt_rat='wfc', 1694 is_airplane_mode=True, 1695 wfc_mode=WFC_MODE_DISABLED, 1696 wifi_ssid=self.wifi_network_ssid, 1697 wifi_pwd=self.wifi_network_pass) 1698 1699 @test_tracker_info(uuid="502aba0d-8895-4807-b394-50a44208ecf7") 1700 @TelephonyBaseTest.tel_test_wrap 1701 def test_mms_mo_apm_wifi_wfc_off(self): 1702 """ Test MO MMS, Phone in APM, WiFi connected, WFC off. 1703 1704 Make sure PhoneA APM, WiFi connected, WFC off. 1705 Make sure PhoneB is able to make/receive call/sms. 1706 Send MMS on PhoneA. 1707 1708 Returns: 1709 True if pass; False if fail. 1710 """ 1711 return message_test( 1712 self.log, 1713 self.android_devices[0], 1714 self.android_devices[1], 1715 mo_rat='wfc', 1716 mt_rat='general', 1717 msg_type='mms', 1718 is_airplane_mode=True, 1719 wfc_mode=WFC_MODE_DISABLED, 1720 wifi_ssid=self.wifi_network_ssid, 1721 wifi_pwd=self.wifi_network_pass) 1722 1723 @test_tracker_info(uuid="235bfdbf-4275-4d89-99f5-41b5b7de8345") 1724 @TelephonyBaseTest.tel_test_wrap 1725 def test_mms_mt_apm_wifi_wfc_off(self): 1726 """ Test MT MMS, Phone in APM, WiFi connected, WFC off. 1727 1728 Make sure PhoneA APM, WiFi connected, WFC off. 1729 Make sure PhoneB is able to make/receive call/sms. 1730 Receive MMS on PhoneA. 1731 1732 Returns: 1733 True if pass; False if fail. 1734 """ 1735 return message_test( 1736 self.log, 1737 self.android_devices[1], 1738 self.android_devices[0], 1739 mo_rat='general', 1740 mt_rat='wfc', 1741 msg_type='mms', 1742 is_airplane_mode=True, 1743 wfc_mode=WFC_MODE_DISABLED, 1744 wifi_ssid=self.wifi_network_ssid, 1745 wifi_pwd=self.wifi_network_pass) 1746 1747 @test_tracker_info(uuid="e5a31b94-1cb6-4770-a2bc-5a0ddba51502") 1748 @TelephonyBaseTest.tel_test_wrap 1749 def test_sms_mo_in_call_iwlan(self): 1750 """ Test MO SMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode. 1751 1752 Make sure PhoneA APM, WiFi connected, WFC WiFi preferred mode. 1753 Make sure PhoneA report iwlan as data rat. 1754 Make sure PhoneB is able to make/receive call/sms. 1755 Call from PhoneA to PhoneB, accept on PhoneB. 1756 Send SMS on PhoneA. 1757 1758 Returns: 1759 True if pass; False if fail. 1760 """ 1761 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1762 return message_test( 1763 self.log, 1764 self.android_devices[0], 1765 self.android_devices[1], 1766 mo_rat='wfc', 1767 mt_rat='general', 1768 msg_in_call=True, 1769 is_airplane_mode=True, 1770 wfc_mode=_wfc_mode, 1771 wifi_ssid=self.wifi_network_ssid, 1772 wifi_pwd=self.wifi_network_pass) 1773 1774 @test_tracker_info(uuid="d6d30cc5-f75b-42df-b517-401456ee8466") 1775 @TelephonyBaseTest.tel_test_wrap 1776 def test_sms_mt_in_call_iwlan(self): 1777 """ Test MT SMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode. 1778 1779 Make sure PhoneA APM, WiFi connected, WFC WiFi preferred mode. 1780 Make sure PhoneA report iwlan as data rat. 1781 Make sure PhoneB is able to make/receive call/sms. 1782 Call from PhoneA to PhoneB, accept on PhoneB. 1783 Receive SMS on PhoneA. 1784 1785 Returns: 1786 True if pass; False if fail. 1787 """ 1788 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1789 return message_test( 1790 self.log, 1791 self.android_devices[1], 1792 self.android_devices[0], 1793 mo_rat='general', 1794 mt_rat='wfc', 1795 msg_in_call=True, 1796 is_airplane_mode=True, 1797 wfc_mode=_wfc_mode, 1798 wifi_ssid=self.wifi_network_ssid, 1799 wifi_pwd=self.wifi_network_pass) 1800 1801 @test_tracker_info(uuid="a98a5a97-3864-4ff8-9085-995212eada20") 1802 @TelephonyBaseTest.tel_test_wrap 1803 def test_mms_mo_in_call_iwlan(self): 1804 """ Test MO MMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode. 1805 1806 Make sure PhoneA APM, WiFi connected, WFC WiFi preferred mode. 1807 Make sure PhoneA report iwlan as data rat. 1808 Make sure PhoneB is able to make/receive call/sms. 1809 Call from PhoneA to PhoneB, accept on PhoneB. 1810 Send MMS on PhoneA. 1811 1812 Returns: 1813 True if pass; False if fail. 1814 """ 1815 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1816 return message_test( 1817 self.log, 1818 self.android_devices[0], 1819 self.android_devices[1], 1820 mo_rat='wfc', 1821 mt_rat='general', 1822 msg_type='mms', 1823 msg_in_call=True, 1824 is_airplane_mode=True, 1825 wfc_mode=_wfc_mode, 1826 wifi_ssid=self.wifi_network_ssid, 1827 wifi_pwd=self.wifi_network_pass) 1828 1829 @test_tracker_info(uuid="0464a87b-d45b-4b03-9895-17ece360a796") 1830 @TelephonyBaseTest.tel_test_wrap 1831 def test_mms_mt_in_call_iwlan(self): 1832 """ Test MT MMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode. 1833 1834 Make sure PhoneA APM, WiFi connected, WFC WiFi preferred mode. 1835 Make sure PhoneA report iwlan as data rat. 1836 Make sure PhoneB is able to make/receive call/sms. 1837 Call from PhoneA to PhoneB, accept on PhoneB. 1838 Receive MMS on PhoneA. 1839 1840 Returns: 1841 True if pass; False if fail. 1842 """ 1843 _wfc_mode = self._get_wfc_mode(self.android_devices[0]) 1844 return message_test( 1845 self.log, 1846 self.android_devices[1], 1847 self.android_devices[0], 1848 mo_rat='general', 1849 mt_rat='wfc', 1850 msg_type='mms', 1851 msg_in_call=True, 1852 is_airplane_mode=True, 1853 wfc_mode=_wfc_mode, 1854 wifi_ssid=self.wifi_network_ssid, 1855 wifi_pwd=self.wifi_network_pass) 1856 1857 @test_tracker_info(uuid="029e05cd-df6b-4a82-8402-77fc6eadf66f") 1858 @TelephonyBaseTest.tel_test_wrap 1859 def test_sms_mo_in_call_iwlan_cellular(self): 1860 """ Test MO SMS, Phone in APM, WiFi connected, Cellular Preferred mode. 1861 1862 Make sure PhoneA APM, WiFi connected, Cellular preferred mode. 1863 Make sure PhoneA report iwlan as data rat. 1864 Make sure PhoneB is able to make/receive call/sms. 1865 Call from PhoneA to PhoneB, accept on PhoneB. 1866 Send SMS on PhoneA. 1867 1868 Returns: 1869 True if pass; False if fail. 1870 """ 1871 return message_test( 1872 self.log, 1873 self.android_devices[0], 1874 self.android_devices[1], 1875 mo_rat='wfc', 1876 mt_rat='general', 1877 msg_in_call=True, 1878 is_airplane_mode=True, 1879 wfc_mode=WFC_MODE_CELLULAR_PREFERRED, 1880 wifi_ssid=self.wifi_network_ssid, 1881 wifi_pwd=self.wifi_network_pass) 1882 1883 @test_tracker_info(uuid="c3c47a68-a839-4470-87f6-e85496cfab23") 1884 @TelephonyBaseTest.tel_test_wrap 1885 def test_sms_mt_in_call_iwlan_cellular(self): 1886 """ Test MT SMS, Phone in APM, WiFi connected, Cellular Preferred mode. 1887 1888 Make sure PhoneA APM, WiFi connected, Cellular Preferred mode. 1889 Make sure PhoneA report iwlan as data rat. 1890 Make sure PhoneB is able to make/receive call/sms. 1891 Call from PhoneA to PhoneB, accept on PhoneB. 1892 Receive SMS on PhoneA. 1893 1894 Returns: 1895 True if pass; False if fail. 1896 """ 1897 return message_test( 1898 self.log, 1899 self.android_devices[1], 1900 self.android_devices[0], 1901 mo_rat='general', 1902 mt_rat='wfc', 1903 msg_in_call=True, 1904 is_airplane_mode=True, 1905 wfc_mode=WFC_MODE_CELLULAR_PREFERRED, 1906 wifi_ssid=self.wifi_network_ssid, 1907 wifi_pwd=self.wifi_network_pass) 1908 1909 @test_tracker_info(uuid="4c6cd913-4aca-4f2b-b33b-1efe0a7dc11d") 1910 @TelephonyBaseTest.tel_test_wrap 1911 def test_mms_mo_in_call_iwlan_cellular(self): 1912 """ Test MO MMS, Phone in APM, WiFi connected, Cellular Preferred mode. 1913 1914 Make sure PhoneA APM, WiFi connected, Cellular mode. 1915 Make sure PhoneA report iwlan as data rat. 1916 Make sure PhoneB is able to make/receive call/sms. 1917 Call from PhoneA to PhoneB, accept on PhoneB. 1918 Send MMS on PhoneA. 1919 1920 Returns: 1921 True if pass; False if fail. 1922 """ 1923 return message_test( 1924 self.log, 1925 self.android_devices[0], 1926 self.android_devices[1], 1927 mo_rat='wfc', 1928 mt_rat='general', 1929 msg_type='mms', 1930 msg_in_call=True, 1931 is_airplane_mode=True, 1932 wfc_mode=WFC_MODE_CELLULAR_PREFERRED, 1933 wifi_ssid=self.wifi_network_ssid, 1934 wifi_pwd=self.wifi_network_pass) 1935 1936 @test_tracker_info(uuid="5b667ca1-cafd-47d4-86dc-8b87232ddcfa") 1937 @TelephonyBaseTest.tel_test_wrap 1938 def test_mms_mt_in_call_iwlan_cellular(self): 1939 """ Test MT MMS, Phone in APM, WiFi connected, Cellular Preferred mode. 1940 1941 Make sure PhoneA APM, WiFi connected, Cellular preferred mode. 1942 Make sure PhoneA report iwlan as data rat. 1943 Make sure PhoneB is able to make/receive call/sms. 1944 Call from PhoneA to PhoneB, accept on PhoneB. 1945 Receive MMS on PhoneA. 1946 1947 Returns: 1948 True if pass; False if fail. 1949 """ 1950 return message_test( 1951 self.log, 1952 self.android_devices[1], 1953 self.android_devices[0], 1954 mo_rat='general', 1955 mt_rat='wfc', 1956 msg_type='mms', 1957 msg_in_call=True, 1958 is_airplane_mode=True, 1959 wfc_mode=WFC_MODE_CELLULAR_PREFERRED, 1960 wifi_ssid=self.wifi_network_ssid, 1961 wifi_pwd=self.wifi_network_pass) 1962 1963 @test_tracker_info(uuid="9f1933bb-c4cb-4655-8655-327c1f38e8ee") 1964 @TelephonyBaseTest.tel_test_wrap 1965 def test_sms_mo_in_call_vt(self): 1966 """ Test MO SMS, Phone in ongoing VT call. 1967 1968 Make sure PhoneA and PhoneB in LTE and can make VT call. 1969 Make Video Call from PhoneA to PhoneB, accept on PhoneB as Video Call. 1970 Send SMS on PhoneA. 1971 1972 Returns: 1973 True if pass; False if fail. 1974 """ 1975 return message_test( 1976 self.log, 1977 self.android_devices[0], 1978 self.android_devices[1], 1979 mo_rat='volte', 1980 mt_rat='volte', 1981 msg_in_call=True, 1982 video_or_voice='video') 1983 1984 @test_tracker_info(uuid="0a07e737-4862-4492-9b48-8d94799eab91") 1985 @TelephonyBaseTest.tel_test_wrap 1986 def test_sms_mt_in_call_vt(self): 1987 """ Test MT SMS, Phone in ongoing VT call. 1988 1989 Make sure PhoneA and PhoneB in LTE and can make VT call. 1990 Make Video Call from PhoneA to PhoneB, accept on PhoneB as Video Call. 1991 Receive SMS on PhoneA. 1992 1993 Returns: 1994 True if pass; False if fail. 1995 """ 1996 return message_test( 1997 self.log, 1998 self.android_devices[1], 1999 self.android_devices[0], 2000 mo_rat='volte', 2001 mt_rat='volte', 2002 msg_in_call=True, 2003 video_or_voice='video') 2004 2005 @test_tracker_info(uuid="55d70548-6aee-40e9-b94d-d10de84fb50f") 2006 @TelephonyBaseTest.tel_test_wrap 2007 def test_mms_mo_in_call_vt(self): 2008 """ Test MO MMS, Phone in ongoing VT call. 2009 2010 Make sure PhoneA and PhoneB in LTE and can make VT call. 2011 Make Video Call from PhoneA to PhoneB, accept on PhoneB as Video Call. 2012 Send MMS on PhoneA. 2013 2014 Returns: 2015 True if pass; False if fail. 2016 """ 2017 return message_test( 2018 self.log, 2019 self.android_devices[0], 2020 self.android_devices[1], 2021 mo_rat='volte', 2022 mt_rat='volte', 2023 msg_type='mms', 2024 msg_in_call=True, 2025 video_or_voice='video') 2026 2027 @test_tracker_info(uuid="75f97c9a-4397-42f1-bb00-8fc6d04fdf6d") 2028 @TelephonyBaseTest.tel_test_wrap 2029 def test_mms_mt_in_call_vt(self): 2030 """ Test MT MMS, Phone in ongoing VT call. 2031 2032 Make sure PhoneA and PhoneB in LTE and can make VT call. 2033 Make Video Call from PhoneA to PhoneB, accept on PhoneB as Video Call. 2034 Receive MMS on PhoneA. 2035 2036 Returns: 2037 True if pass; False if fail. 2038 """ 2039 return message_test( 2040 self.log, 2041 self.android_devices[1], 2042 self.android_devices[0], 2043 mo_rat='volte', 2044 mt_rat='volte', 2045 msg_type='mms', 2046 msg_in_call=True, 2047 video_or_voice='video') 2048 2049 @test_tracker_info(uuid="2a72ecc6-702d-4add-a7a2-8c1001628bb6") 2050 @TelephonyBaseTest.tel_test_wrap 2051 def test_sms_mo_in_call_2g(self): 2052 """ Test MO SMS during a MO gsm call. 2053 2054 Make sure PhoneA is in gsm mode. 2055 Make sure PhoneB is able to make/receive call. 2056 Call from PhoneA to PhoneB, accept on PhoneB, send SMS on PhoneA. 2057 2058 Returns: 2059 True if pass; False if fail. 2060 """ 2061 self.check_band_support(self.android_devices[0]) 2062 return message_test( 2063 self.log, 2064 self.android_devices[0], 2065 self.android_devices[1], 2066 mo_rat='2g', 2067 mt_rat='general', 2068 msg_in_call=True) 2069 2070 @test_tracker_info(uuid="facd1814-8d69-42a2-9f80-b6a28cc0c9d2") 2071 @TelephonyBaseTest.tel_test_wrap 2072 def test_sms_mt_in_call_2g(self): 2073 """ Test MT SMS during a MO gsm call. 2074 2075 Make sure PhoneA is in gsm mode. 2076 Make sure PhoneB is able to make/receive call. 2077 Call from PhoneA to PhoneB, accept on PhoneB, receive SMS on PhoneA. 2078 2079 Returns: 2080 True if pass; False if fail. 2081 """ 2082 self.check_band_support(self.android_devices[0]) 2083 return message_test( 2084 self.log, 2085 self.android_devices[1], 2086 self.android_devices[0], 2087 mo_rat='general', 2088 mt_rat='2g', 2089 msg_in_call=True) 2090 2091 @test_tracker_info(uuid="2bd94d69-3621-4b94-abc7-bd24c4325485") 2092 @TelephonyBaseTest.tel_test_wrap 2093 def test_mms_mo_in_call_2g(self): 2094 """ Test MO MMS during a MO gsm call. 2095 2096 Make sure PhoneA is in gsm mode. 2097 Make sure PhoneB is able to make/receive call. 2098 Call from PhoneA to PhoneB, accept on PhoneB, send MMS on PhoneA. 2099 2100 Returns: 2101 True if pass; False if fail. 2102 """ 2103 self.check_band_support(self.android_devices[0]) 2104 return message_test( 2105 self.log, 2106 self.android_devices[0], 2107 self.android_devices[1], 2108 mo_rat='2g', 2109 mt_rat='general', 2110 msg_type='mms', 2111 msg_in_call=True) 2112 2113 @test_tracker_info(uuid="e20be70d-99d6-4344-a742-f69581b66d8f") 2114 @TelephonyBaseTest.tel_test_wrap 2115 def test_mms_mt_in_call_2g(self): 2116 """ Test MT MMS during a MO gsm call. 2117 2118 Make sure PhoneA is in gsm mode. 2119 Make sure PhoneB is able to make/receive call. 2120 Call from PhoneA to PhoneB, accept on PhoneB, receive MMS on PhoneA. 2121 2122 Returns: 2123 True if pass; False if fail. 2124 """ 2125 self.check_band_support(self.android_devices[0]) 2126 return message_test( 2127 self.log, 2128 self.android_devices[1], 2129 self.android_devices[0], 2130 mo_rat='general', 2131 mt_rat='2g', 2132 msg_type='mms', 2133 msg_in_call=True) 2134 2135 @test_tracker_info(uuid="3510d368-4b16-4716-92a3-9dd01842ba79") 2136 @TelephonyBaseTest.tel_test_wrap 2137 def test_mms_mo_in_call_2g_wifi(self): 2138 """ Test MO MMS during a MO gsm call. 2139 2140 Make sure PhoneA is in gsm mode with Wifi connected. 2141 Make sure PhoneB is able to make/receive call. 2142 Call from PhoneA to PhoneB, accept on PhoneB, send MMS on PhoneA. 2143 2144 Returns: 2145 True if pass; False if fail. 2146 """ 2147 self.check_band_support(self.android_devices[0]) 2148 return message_test( 2149 self.log, 2150 self.android_devices[0], 2151 self.android_devices[1], 2152 mo_rat='2g', 2153 mt_rat='general', 2154 msg_type='mms', 2155 msg_in_call=True, 2156 wifi_ssid=self.wifi_network_ssid, 2157 wifi_pwd=self.wifi_network_pass) 2158 2159 @test_tracker_info(uuid="060def89-01bd-4b44-a49b-a4536fe39165") 2160 @TelephonyBaseTest.tel_test_wrap 2161 def test_mms_mt_in_call_2g_wifi(self): 2162 """ Test MT MMS during a MO gsm call. 2163 2164 Make sure PhoneA is in gsm mode with wifi connected. 2165 Make sure PhoneB is able to make/receive call. 2166 Call from PhoneA to PhoneB, accept on PhoneB, receive MMS on PhoneA. 2167 2168 Returns: 2169 True if pass; False if fail. 2170 """ 2171 self.check_band_support(self.android_devices[0]) 2172 return message_test( 2173 self.log, 2174 self.android_devices[1], 2175 self.android_devices[0], 2176 mo_rat='general', 2177 mt_rat='2g', 2178 msg_type='mms', 2179 msg_in_call=True, 2180 wifi_ssid=self.wifi_network_ssid, 2181 wifi_pwd=self.wifi_network_pass) 2182 2183 @test_tracker_info(uuid="7de95a56-8055-4c0c-9438-f249403c6078") 2184 @TelephonyBaseTest.tel_test_wrap 2185 def test_sms_mo_general_after_mobile_data_usage_limit_reached(self): 2186 """Test SMS send after mobile data usage limit is reached. 2187 2188 Airplane mode is off. 2189 Set the data limit to the current usage 2190 Send SMS from PhoneA to PhoneB. 2191 Verify received message on PhoneB is correct. 2192 2193 Returns: 2194 True if success. 2195 False if failed. 2196 """ 2197 ads = self.android_devices 2198 try: 2199 subscriber_id = ads[0].droid.telephonyGetSubscriberId() 2200 data_usage = get_mobile_data_usage(ads[0], subscriber_id) 2201 set_mobile_data_usage_limit(ads[0], data_usage, subscriber_id) 2202 2203 return message_test( 2204 self.log, 2205 ads[0], 2206 ads[1]) 2207 finally: 2208 remove_mobile_data_usage_limit(ads[0], subscriber_id) 2209 2210 @test_tracker_info(uuid="df56687f-0932-4b13-952c-ae0ce30b1d7a") 2211 @TelephonyBaseTest.tel_test_wrap 2212 def test_sms_mt_general_after_mobile_data_usage_limit_reached(self): 2213 """Test SMS receive after mobile data usage limit is reached. 2214 2215 Airplane mode is off. 2216 Set the data limit to the current usage 2217 Send SMS from PhoneB to PhoneA. 2218 Verify received message on PhoneA is correct. 2219 2220 Returns: 2221 True if success. 2222 False if failed. 2223 """ 2224 ads = self.android_devices 2225 try: 2226 subscriber_id = ads[0].droid.telephonyGetSubscriberId() 2227 data_usage = get_mobile_data_usage(ads[0], subscriber_id) 2228 set_mobile_data_usage_limit(ads[0], data_usage, subscriber_id) 2229 2230 return message_test( 2231 self.log, 2232 ads[1], 2233 ads[0]) 2234 finally: 2235 remove_mobile_data_usage_limit(ads[0], subscriber_id) 2236 2237 @test_tracker_info(uuid="131f98c6-3b56-44df-b5e7-66f33e2cf117") 2238 @TelephonyBaseTest.tel_test_wrap 2239 def test_mms_mo_general_after_mobile_data_usage_limit_reached(self): 2240 """Test MMS send after mobile data usage limit is reached. 2241 2242 Airplane mode is off. 2243 Set the data limit to the current usage 2244 Send MMS from PhoneA to PhoneB. 2245 Verify MMS cannot be send. (Can be send/receive for Verizon) 2246 2247 Returns: 2248 True if success. 2249 False if failed. 2250 """ 2251 ads = self.android_devices 2252 expected_result = False 2253 if get_operator_name(self.log, ads[0]) in ["vzw", "Verizon", "att", "AT&T"]: 2254 expected_result = True 2255 ads[0].log.info("Expected Result is %s", expected_result) 2256 2257 try: 2258 subscriber_id = ads[0].droid.telephonyGetSubscriberId() 2259 data_usage = get_mobile_data_usage(ads[0], subscriber_id) 2260 set_mobile_data_usage_limit(ads[0], data_usage, subscriber_id) 2261 log_msg = "expecting successful mms receive" if ( 2262 expected_result) else "expecting mms receive failure" 2263 2264 if not message_test( 2265 self.log, 2266 ads[0], 2267 ads[1], 2268 msg_type='mms', 2269 mms_expected_result=expected_result): 2270 2271 ads[0].log.error("Mms test failed, %s", log_msg) 2272 return False 2273 else: 2274 ads[0].log.info("Mms test succeeded, %s", log_msg) 2275 return True 2276 finally: 2277 remove_mobile_data_usage_limit(ads[0], subscriber_id) 2278 2279 @test_tracker_info(uuid="051e259f-0cb9-417d-9a68-8e8a4266fca1") 2280 @TelephonyBaseTest.tel_test_wrap 2281 def test_mms_mt_general_after_mobile_data_usage_limit_reached(self): 2282 """Test MMS receive after mobile data usage limit is reached. 2283 2284 Airplane mode is off. 2285 Set the data limit to the current usage 2286 Send MMS from PhoneB to PhoneA. 2287 Verify MMS cannot be received. (Can be send/receive for Verizon) 2288 2289 Returns: 2290 True if success. 2291 False if failed. 2292 """ 2293 ads = self.android_devices 2294 expected_result = False 2295 if get_operator_name(self.log, ads[0]) in ["vzw", "Verizon", "att", "AT&T"]: 2296 expected_result = True 2297 ads[0].log.info("Expected Result is %s", expected_result) 2298 2299 try: 2300 subscriber_id = ads[0].droid.telephonyGetSubscriberId() 2301 data_usage = get_mobile_data_usage(ads[0], subscriber_id) 2302 set_mobile_data_usage_limit(ads[0], data_usage, subscriber_id) 2303 log_msg = "expecting successful mms receive" if ( 2304 expected_result) else "expecting mms receive failure" 2305 2306 if not message_test( 2307 self.log, 2308 ads[1], 2309 ads[0], 2310 msg_type='mms', 2311 mms_expected_result=expected_result): 2312 2313 ads[0].log.error("Mms test failed, %s", log_msg) 2314 return False 2315 else: 2316 ads[0].log.info("Mms test succeeded, %s", log_msg) 2317 return True 2318 finally: 2319 remove_mobile_data_usage_limit(ads[0], subscriber_id) 2320 2321 @test_tracker_info(uuid="65808f80-9859-44e9-888d-9e5ca8665667") 2322 @TelephonyBaseTest.tel_test_wrap 2323 def test_sms_mt_in_collision_general(self): 2324 """Test of reception of 2 simultaneous incoming MT SMS'. 2325 Test step: 2326 1. Send a SMS from both of the secondary and the third DUT to the 2327 primary DUT simultaneously. 2328 2. Wait for reception of both SMS' on the primary DUT and verify the 2329 content and sender of both SMS'. 2330 2331 Returns: 2332 True if success. Otherwise False. 2333 """ 2334 ads = self.android_devices 2335 2336 tasks = [(ensure_phone_default_state, (self.log, ads[0])), 2337 (ensure_phone_default_state, (self.log, ads[1]))] 2338 if not multithread_func(self.log, tasks): 2339 self.log.error("Phone Failed to Set Up Properly.") 2340 return False 2341 time.sleep(WAIT_TIME_ANDROID_STATE_SETTLING) 2342 2343 return self._sms_in_collision_test(ads) 2344 2345 @test_tracker_info(uuid="2a78efcc-bec4-4e2d-8e8c-5e75be93a78e") 2346 @TelephonyBaseTest.tel_test_wrap 2347 def test_sms_mt_in_collision_when_power_off_general(self): 2348 """Test of reception of 2 simultaneous incoming MT SMS' sent as DUT was 2349 powered off. 2350 Test step: 2351 1. Toggle on airplane mode and reboot the primary DUT. 2352 2. During the reboot procedure send a SMS from both of the secondary 2353 and the third DUT to the primary DUT simultaneously. 2354 3. Wait for reboot complete on the primary DUT and then toggle off 2355 airplane mode. 2356 4. Wait for reception of both SMS' on the primary DUT and verify the 2357 content and sender of both SMS'. 2358 2359 Returns: 2360 True if success. Otherwise False. 2361 """ 2362 ads = self.android_devices 2363 2364 tasks = [(ensure_phone_default_state, (self.log, ads[0])), 2365 (ensure_phone_default_state, (self.log, ads[1]))] 2366 if not multithread_func(self.log, tasks): 2367 self.log.error("Phone Failed to Set Up Properly.") 2368 return False 2369 time.sleep(WAIT_TIME_ANDROID_STATE_SETTLING) 2370 2371 return self._sms_in_collision_when_power_off_test(ads) 2372