Home | History | Annotate | Download | only in tel

Lines Matching refs:ad

282                       ad,
296 ad: Android device object.
306 return phone_setup_iwlan_for_subscription(log, ad,
307 get_outgoing_voice_sub_id(ad),
313 ad,
328 ad: Android device object.
339 toggle_airplane_mode(log, ad, is_airplane_mode, strict_checking=False)
342 if wfc_mode != WFC_MODE_DISABLED and not ad.droid.imsIsWfcEnabledByPlatform(
344 ad.log.error("WFC is not enabled on this device by checking "
349 if not ensure_wifi_connected(log, ad, wifi_ssid, wifi_pwd):
350 ad.log.error("Fail to connect to WiFi %s.", wifi_ssid)
353 if not set_wfc_mode(log, ad, wfc_mode):
354 ad.log.error("Unable to set WFC mode to %s.", wfc_mode)
357 if not wait_for_wfc_enabled(log, ad, max_time=MAX_WAIT_TIME_WFC_ENABLED):
358 ad.log.error("WFC is not enabled")
362 log, ad, sub_id, RAT_FAMILY_WLAN,
364 ad.log.info(
369 ad.log.error(
376 ad,
388 ad: Android device object.
396 toggle_airplane_mode(log, ad, False, strict_checking=False)
398 toggle_volte(log, ad, True)
400 log, ad, GEN_4G, voice_or_data=NETWORK_SERVICE_DATA):
402 log, ad, GEN_4G, voice_or_data=NETWORK_SERVICE_DATA):
403 ad.log.error("Fail to ensure data in 4G")
406 ad.log.error(e)
407 ad.droid.telephonyToggleDataConnection(True)
408 if not set_wfc_mode(log, ad, WFC_MODE_CELLULAR_PREFERRED):
409 ad.log.error("Set WFC mode failed.")
412 if not ensure_wifi_connected(log, ad, wifi_ssid, wifi_pwd):
413 ad.log.error("Connect to WiFi failed.")
416 log, ad, RAT_FAMILY_WLAN, voice_or_data=NETWORK_SERVICE_DATA):
417 ad.log.error("Data rat in iwlan mode.")
419 elif not wait_for_wfc_disabled(log, ad, MAX_WAIT_TIME_WFC_ENABLED):
420 ad.log.error("Should report wifi calling disabled within %s.",
426 def phone_setup_data_for_subscription(log, ad, sub_id, network_generation):
431 ad: android device object
438 toggle_airplane_mode(log, ad, False, strict_checking=False)
439 set_wifi_to_default(log, ad)
440 if not set_wfc_mode(log, ad, WFC_MODE_DISABLED):
441 ad.log.error("Disable WFC failed.")
445 ad,
449 get_telephony_signal_strength(ad)
454 def phone_setup_4g(log, ad):
459 ad: android device object
464 return phone_setup_4g_for_subscription(log, ad,
465 get_default_data_sub_id(ad))
468 def phone_setup_4g_for_subscription(log, ad, sub_id):
473 ad: android device object
479 return phone_setup_data_for_subscription(log, ad, sub_id, GEN_4G)
482 def phone_setup_3g(log, ad):
487 ad: android device object
492 return phone_setup_3g_for_subscription(log, ad,
493 get_default_data_sub_id(ad))
496 def phone_setup_3g_for_subscription(log, ad, sub_id):
501 ad: android device object
507 return phone_setup_data_for_subscription(log, ad, sub_id, GEN_3G)
510 def phone_setup_2g(log, ad):
515 ad: android device object
520 return phone_setup_2g_for_subscription(log, ad,
521 get_default_data_sub_id(ad))
524 def phone_setup_2g_for_subscription(log, ad, sub_id):
529 ad: android device object
535 return phone_setup_data_for_subscription(log, ad, sub_id, GEN_2G)
538 def phone_setup_csfb(log, ad):
546 ad: Android device object.
552 return phone_setup_csfb_for_subscription(log, ad,
553 get_outgoing_voice_sub_id(ad))
556 def phone_setup_csfb_for_subscription(log, ad, sub_id):
564 ad: Android device object.
571 if not phone_setup_4g_for_subscription(log, ad, sub_id):
572 ad.log.error("Failed to set to 4G data.")
574 if ad.droid.imsIsEnhanced4gLteModeSettingEnabledByPlatform():
575 toggle_volte(log, ad, False)
577 log, ad, sub_id, GEN_4G, voice_or_data=NETWORK_SERVICE_DATA):
580 if not wait_for_voice_attach_for_subscription(log, ad, sub_id,
584 return phone_idle_csfb_for_subscription(log, ad, sub_id)
587 def phone_setup_volte(log, ad):
592 ad: android device object.
598 return phone_setup_volte_for_subscription(log, ad,
599 get_outgoing_voice_sub_id(ad))
602 def phone_setup_volte_for_subscription(log, ad, sub_id):
607 ad: android device object.
614 if not phone_setup_4g_for_subscription(log, ad, sub_id):
615 ad.log.error("Failed to set to 4G data.")
617 toggle_volte_for_subscription(log, ad, sub_id, True)
618 return phone_idle_volte_for_subscription(log, ad, sub_id)
621 def phone_setup_voice_3g(log, ad):
626 ad: Android device object.
632 return phone_setup_voice_3g_for_subscription(log, ad,
633 get_outgoing_voice_sub_id(ad))
636 def phone_setup_voice_3g_for_subscription(log, ad, sub_id):
641 ad: Android device object.
648 if not phone_setup_3g_for_subscription(log, ad, sub_id):
649 ad.log.error("Failed to set to 3G data.")
651 if not wait_for_voice_attach_for_subscription(log, ad, sub_id,
654 return phone_idle_3g_for_subscription(log, ad, sub_id)
657 def phone_setup_voice_2g(log, ad):
662 ad: Android device object.
668 return phone_setup_voice_2g_for_subscription(log, ad,
669 get_outgoing_voice_sub_id(ad))
672 def phone_setup_voice_2g_for_subscription(log, ad, sub_id):
677 ad: Android device object.
684 if not phone_setup_2g_for_subscription(log, ad, sub_id):
685 ad.log.error("Failed to set to 2G data.")
687 if not wait_for_voice_attach_for_subscription(log, ad, sub_id,
690 return phone_idle_2g_for_subscription(log, ad, sub_id)
693 def phone_setup_voice_general(log, ad):
700 ad: Android device object.
707 log, ad, get_outgoing_voice_sub_id(ad))
710 def phone_setup_voice_general_for_subscription(log, ad, sub_id):
717 ad: Android device object.
724 toggle_airplane_mode(log, ad, False, strict_checking=False)
725 if not wait_for_voice_attach_for_subscription(log, ad, sub_id,
728 return phone_setup_voice_3g_for_subscription(log, ad, sub_id)
732 def phone_setup_data_general(log, ad):
739 ad: Android device object.
746 log, ad, ad.droid.subscriptionGetDefaultDataSubId())
749 def phone_setup_data_general_for_subscription(log, ad, sub_id):
756 ad: Android device object.
763 toggle_airplane_mode(log, ad, False, strict_checking=False)
764 if not wait_for_data_attach_for_subscription(log, ad, sub_id,
767 reset_preferred_network_type_to_allowable_range(log, ad)
769 return wait_for_data_attach_for_subscription(log, ad, sub_id,
773 def phone_setup_rat_for_subscription(log, ad, sub_id, network_preference,
775 toggle_airplane_mode(log, ad, False, strict_checking=False)
776 set_wifi_to_default(log, ad)
777 if not set_wfc_mode(log, ad, WFC_MODE_DISABLED):
778 ad.log.error("Disable WFC failed.")
780 return ensure_network_rat_for_subscription(log, ad, sub_id,
784 def phone_setup_lte_gsm_wcdma(log, ad):
786 log, ad, ad.droid.subscriptionGetDefaultSubId())
789 def phone_setup_lte_gsm_wcdma_for_subscription(log, ad, sub_id):
791 log, ad, sub_id, NETWORK_MODE_LTE_GSM_WCDMA, RAT_FAMILY_LTE)
794 def phone_setup_gsm_umts(log, ad):
796 log, ad, ad.droid.subscriptionGetDefaultSubId())
799 def phone_setup_gsm_umts_for_subscription(log, ad, sub_id):
801 log, ad, sub_id, NETWORK_MODE_GSM_UMTS, RAT_FAMILY_WCDMA)
804 def phone_setup_gsm_only(log, ad):
806 log, ad, ad.droid.subscriptionGetDefaultSubId())
809 def phone_setup_gsm_only_for_subscription(log, ad, sub_id):
811 log, ad, sub_id, NETWORK_MODE_GSM_ONLY, RAT_FAMILY_GSM)
814 def phone_setup_lte_cdma_evdo(log, ad):
816 log, ad, ad.droid.subscriptionGetDefaultSubId())
819 def phone_setup_lte_cdma_evdo_for_subscription(log, ad, sub_id):
821 log, ad, sub_id, NETWORK_MODE_LTE_CDMA_EVDO, RAT_FAMILY_LTE)
824 def phone_setup_cdma(log, ad):
826 log, ad, ad.droid.subscriptionGetDefaultSubId())
829 def phone_setup_cdma_for_subscription(log, ad, sub_id):
830 return phone_setup_rat_for_subscription(log, ad, sub_id, NETWORK_MODE_CDMA,
834 def phone_idle_volte(log, ad):
838 ad: Android device object.
840 return phone_idle_volte_for_subscription(log, ad,
841 get_outgoing_voice_sub_id(ad))
844 def phone_idle_volte_for_subscription(log, ad, sub_id):
848 ad: Android device object.
852 log, ad, sub_id, RAT_FAMILY_LTE,
854 ad.log.error("Voice rat not in LTE mode.")
856 if not wait_for_volte_enabled(log, ad, MAX_WAIT_TIME_VOLTE_ENABLED):
857 ad.log.error(
864 def phone_idle_iwlan(log, ad):
868 ad: Android device object.
870 return phone_idle_iwlan_for_subscription(log, ad,
871 get_outgoing_voice_sub_id(ad))
874 def phone_idle_iwlan_for_subscription(log, ad, sub_id):
878 ad: Android device object.
882 log, ad, sub_id, RAT_FAMILY_WLAN,
884 ad.log.error("data rat not in iwlan mode.")
886 if not wait_for_wfc_enabled(log, ad, MAX_WAIT_TIME_WFC_ENABLED):
887 ad.log.error("Failed to <report wfc enabled true> within %s seconds.",
893 def phone_idle_not_iwlan(log, ad):
897 ad: Android device object.
899 return phone_idle_not_iwlan_for_subscription(log, ad,
900 get_outgoing_voice_sub_id(ad))
903 def phone_idle_not_iwlan_for_subscription(log, ad, sub_id):
907 ad: Android device object.
911 log, ad, sub_id, RAT_FAMILY_WLAN,
913 log.error("{} data rat in iwlan mode.".format(ad.serial))
918 def phone_idle_csfb(log, ad):
922 ad: Android device object.
924 ad,
925 get_outgoing_voice_sub_id(ad))
928 def phone_idle_csfb_for_subscription(log, ad, sub_id):
932 ad: Android device object.
936 log, ad, sub_id, RAT_FAMILY_LTE,
938 ad.log.error("Data rat not in lte mode.")
943 def phone_idle_3g(log, ad):
947 ad: Android device object.
949 return phone_idle_3g_for_subscription(log, ad,
950 get_outgoing_voice_sub_id(ad))
953 def phone_idle_3g_for_subscription(log, ad, sub_id):
957 ad: Android device object.
961 log, ad, sub_id, GEN_3G, voice_or_data=NETWORK_SERVICE_VOICE)
964 def phone_idle_2g(log, ad):
968 ad: Android device object.
970 return phone_idle_2g_for_subscription(log, ad,
971 get_outgoing_voice_sub_id(ad))
974 def phone_idle_2g_for_subscription(log, ad, sub_id):
978 ad: Android device object.
982 log, ad, sub_id, GEN_2G, voice_or_data=NETWORK_SERVICE_VOICE)
985 def get_current_voice_rat(log, ad):
989 ad: Android device object.
992 log, ad, get_outgoing_voice_sub_id(ad))
995 def get_current_voice_rat_for_subscription(log, ad, sub_id):
999 ad: Android device object.
1002 return get_network_rat_for_subscription(log, ad, sub_id,
1006 def is_phone_in_call_volte(log, ad):
1010 ad: Android device object.
1013 log, ad, get_outgoing_voice_sub_id(ad))
1016 def is_phone_in_call_volte_for_subscription(log, ad, sub_id):
1020 ad: Android device object.
1023 if not ad.droid.telecomIsInCall():
1024 ad.log.error("Not in call.")
1026 nw_type = get_network_rat_for_subscription(log, ad, sub_id,
1029 ad.log.error("Voice rat on: %s. Expected: LTE", nw_type)
1034 def is_phone_in_call_csfb(log, ad):
1038 ad: Android device object.
1041 log, ad, get_outgoing_voice_sub_id(ad))
1044 def is_phone_in_call_csfb_for_subscription(log, ad, sub_id):
1048 ad: Android device object.
1051 if not ad.droid.telecomIsInCall():
1052 ad.log.error("Not in call.")
1054 nw_type = get_network_rat_for_subscription(log, ad, sub_id,
1057 ad.log.error("Voice rat on: %s. Expected: not LTE", nw_type)
1062 def is_phone_in_call_3g(log, ad):
1066 ad: Android device object.
1068 return is_phone_in_call_3g_for_subscription(log, ad,
1069 get_outgoing_voice_sub_id(ad))
1072 def is_phone_in_call_3g_for_subscription(log, ad, sub_id):
1076 ad: Android device object.
1079 if not ad.droid.telecomIsInCall():
1080 ad.log.error("Not in call.")
1082 nw_gen = get_network_gen_for_subscription(log, ad, sub_id,
1085 ad.log.error("Voice rat on: %s. Expected: 3g", nw_gen)
1090 def is_phone_in_call_2g(log, ad):
1094 ad: Android device object.
1096 return is_phone_in_call_2g_for_subscription(log, ad,
1097 get_outgoing_voice_sub_id(ad))
1100 def is_phone_in_call_2g_for_subscription(log, ad, sub_id):
1104 ad: Android device object.
1107 if not ad.droid.telecomIsInCall():
1108 ad.log.error("Not in call.")
1110 nw_gen = get_network_gen_for_subscription(log, ad, sub_id,
1113 ad.log.error("Voice rat on: %s. Expected: 2g", nw_gen)
1118 def is_phone_in_call_1x(log, ad):
1122 ad: Android device object.
1124 return is_phone_in_call_1x_for_subscription(log, ad,
1125 get_outgoing_voice_sub_id(ad))
1128 def is_phone_in_call_1x_for_subscription(log, ad, sub_id):
1132 ad: Android device object.
1135 if not ad.droid.telecomIsInCall():
1136 ad.log.error("Not in call.")
1138 nw_type = get_network_rat_for_subscription(log, ad, sub_id,
1141 ad.log.error("Voice rat on: %s. Expected: 1xrtt", nw_type)
1146 def is_phone_in_call_wcdma(log, ad):
1150 ad: Android device object.
1153 log, ad, get_outgoing_voice_sub_id(ad))
1156 def is_phone_in_call_wcdma_for_subscription(log, ad, sub_id):
1160 ad: Android device object.
1165 if not ad.droid.telecomIsInCall():
1166 ad.log.error("Not in call.")
1168 nw_type = get_network_rat_for_subscription(log, ad, sub_id,
1171 ad.log.error("%s voice rat on: %s. Expected: umts", nw_type)
1176 def is_phone_in_call_iwlan(log, ad):
1180 ad: Android device object.
1182 if not ad.droid.telecomIsInCall():
1183 ad.log.error("Not in call.")
1185 nw_type = get_network_rat(log, ad, NETWORK_SERVICE_DATA)
1187 ad.log.error("Data rat on: %s. Expected: iwlan", nw_type)
1189 if not is_wfc_enabled(log, ad):
1190 ad.log.error("WiFi Calling feature bit is False.")
1195 def is_phone_in_call_not_iwlan(log, ad):
1199 ad: Android device object.
1202 if not ad.droid.telecomIsInCall():
1203 ad.log.error("Not in call.")
1205 nw_type = get_network_rat(log, ad, NETWORK_SERVICE_DATA)
1207 ad.log.error("Data rat on: %s. Expected: not iwlan", nw_type)
1209 if is_wfc_enabled(log, ad):
1210 ad.log.error("WiFi Calling feature bit is True.")
1228 ads: list of ad object, at least three need to pass in.
1292 def get_audio_route(log, ad):
1297 ad: android_device object
1304 audio_state = ad.droid.telecomCallGetAudioState()
1308 def set_audio_route(log, ad, route):
1313 ad: android_device object
1320 ad.droid.telecomCallSetAudioRoute(route)
1324 def is_property_in_call_properties(log, ad, call_id, expected_property):
1329 ad: android_device object
1336 properties = ad.droid.telecomCallGetProperties(call_id)
1340 def is_call_hd(log, ad, call_id):
1345 ad: android_device object
1351 return is_property_in_call_properties(log, ad, call_id,
1355 def get_cep_conference_call_id(ad):
1359 ad: android device object.
1365 for call in ad.droid.telecomCallGetCallIds():
1366 if len(ad.droid.telecomCallGetCallChildren(call)) != 0: