/tools/test/connectivity/acts/framework/acts/test_utils/tel/ |
D | tel_subscription_utils.py | 28 def initial_set_up_for_subid_infomation(log, ad): argument 51 if hasattr(ad, "default_voice_sim_slot_index"): 53 log, ad, ad.default_voice_sim_slot_index) 54 set_subid_for_outgoing_call(ad, outgoing_voice_sub_id) 56 outgoing_voice_sub_id = ad.droid.subscriptionGetDefaultVoiceSubId() 57 setattr(ad, "outgoing_voice_sub_id", outgoing_voice_sub_id) 64 if hasattr(ad, "default_message_sim_slot_index"): 66 log, ad, ad.default_message_sim_slot_index) 67 set_subid_for_message(ad, outgoing_message_sub_id) 69 outgoing_message_sub_id = ad.droid.subscriptionGetDefaultSmsSubId() [all …]
|
D | tel_test_utils.py | 229 def get_phone_number_by_adb(ad): argument 231 ad.adb.shell("service call iphonesubinfo 13")) 234 def get_iccid_by_adb(ad): argument 235 return ad.adb.shell("service call iphonesubinfo 11") 238 def get_operator_by_adb(ad): argument 239 operator = ad.adb.getprop("gsm.sim.operator.alpha") 245 def get_plmn_by_adb(ad): argument 246 plmn_id = ad.adb.getprop("gsm.sim.operator.numeric") 252 def get_sub_id_by_adb(ad): argument 253 return ad.adb.shell("service call iphonesubinfo 5") [all …]
|
D | tel_voice_utils.py | 462 ad, argument 486 if not get_capability_for_subscription(ad, CAPABILITY_WFC, 487 get_outgoing_voice_sub_id(ad)): 488 ad.log.error("WFC is not supported, abort test.") 490 return phone_setup_iwlan_for_subscription(log, ad, 491 get_outgoing_voice_sub_id(ad), 497 ad, argument 523 toggle_airplane_mode(log, ad, is_airplane_mode, strict_checking=False) 526 if wfc_mode != WFC_MODE_DISABLED and not ad.droid.imsIsWfcEnabledByPlatform( 528 ad.log.error("WFC is not enabled on this device by checking " [all …]
|
D | TelephonyBaseTest.py | 108 for ad in self.android_devices: 109 ad.log_path = self.log_path 134 new_crash = ad.check_crash_report(self.test_name, 138 ad.log.error(msg) 140 ad.serial, msg) 176 tasks = [(self._init_device, [ad]) for ad in self.android_devices] 186 for ad in self.android_devices: 187 if hasattr(ad, "dsds"): 216 tasks = [(self._setup_device, [ad, sim_conf_file, qxdm_log_mask_cfg]) 217 for ad in self.android_devices] [all …]
|
D | tel_video_utils.py | 80 def phone_setup_video(log, ad, wfc_mode=WFC_MODE_DISABLED): argument 93 return phone_setup_video_for_subscription(log, ad, 94 get_outgoing_voice_sub_id(ad), 99 ad, argument 116 toggle_airplane_mode(log, ad, False) 117 if not set_wfc_mode(log, ad, wfc_mode): 119 ad.serial, wfc_mode)) 121 toggle_volte(log, ad, True) 124 log, ad, GEN_4G, voice_or_data=NETWORK_SERVICE_DATA): 125 log.error("{} voice not in LTE mode.".format(ad.serial)) [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/gnss/ |
D | gnss_test_utils.py | 59 def remount_device(ad): argument 66 ad.root_adb() 67 remount_result = ad.adb.remount() 68 ad.log.info("Attempt %d - %s" % (retries + 1, remount_result)) 71 if ad.adb.getprop("ro.boot.veritymode") == "enforcing": 72 disable_verity_result = ad.adb.disable_verity() 73 reboot(ad) 76 def reboot(ad): argument 82 ad.log.info("Reboot device to make changes take effect.") 83 ad.reboot() [all …]
|
D | dut_log_test_utils.py | 28 def find_device_qxdm_log_mask(ad, maskfile): argument 48 device_mask_file = ad.adb.shell('test -e %s && echo exists' % cfg_path) 52 def set_diagmdlog_command(ad, maskfile): argument 61 ad.adb.shell(NOHUP_CMD.format(cfg_path, DEVICE_DIAGMDLOG_FOLDER)) 62 ad.log.info("Running diag_mdlog in the background") 66 def verify_diagmd_folder_exists(ad): argument 73 mask_folder_exists = ad.adb.shell( 75 diag_folder_exists = ad.adb.shell( 78 ad.adb.shell("mkdir " + DEVICE_CFG_FOLDER) 79 ad.adb.shell("mkdir " + DEVICE_DIAGMDLOG_FOLDER) [all …]
|
/tools/test/connectivity/acts/tests/google/tel/live/ |
D | TelLiveProjectFiTest.py | 101 def _install_account_util(self, ad): argument 105 ad.log.info("Install account_util %s", account_util) 106 ad.ensure_screen_on() 107 ad.adb.install("-r %s" % account_util, timeout=300, ignore_status=True) 109 if not ad.is_apk_installed("com.google.android.tradefed.account"): 110 ad.log.info("com.google.android.tradefed.account is not installed") 114 def _account_registration(self, ad): argument 115 toggle_airplane_mode_by_adb(self.log, ad, new_state=False) 117 ad.adb.shell(cmd) 118 if hasattr(ad, "user_account"): [all …]
|
D | TelLiveNoQXDMLogTest.py | 113 ad = self.dut 114 toggle_airplane_mode(self.log, ad, False) 115 if not phone_setup_volte(self.log, ad): 116 ad.log.error("Failed to setup VoLTE.") 139 ad.log.info("Telephony Bootup Time Test %s Iteration: %d / %d", 142 ad.log.debug("Begin Time is %s", begin_time) 143 ad.log.info("reboot!") 144 reboot_device(ad) 149 dict_match = ad.search_logcat( 154 ad.log.debug("Datetime for boot_complete is %s", [all …]
|
D | TelWifiDataTest.py | 85 ad = self.android_devices[0] 86 toggle_airplane_mode(self.log, ad, False) 87 if not ensure_network_generation(self.log, ad, GEN_4G, 92 if not ensure_wifi_connected(self.log, ad, self.wifi_network_ssid, 94 ad.log.error("connect WiFi failed") 159 def _wifi_cell_irat_task(self, ad, irat_wait_time=60): argument 165 if (not wait_for_wifi_data_connection(self.log, ad, True, 167 or not verify_internet_connection(self.log, ad)): 168 ad.log.error("Data not on WiFi") 169 get_telephony_signal_strength(ad) [all …]
|
D | TelLivePreflightTest.py | 56 def _check_wfc_enabled(self, ad): argument 57 if not wait_for_wifi_data_connection(self.log, ad, True): 58 ad.log.error("Failed to connect to WIFI") 60 if not wait_for_wfc_enabled(self.log, ad): 61 ad.log.error("WFC is not enabled") 64 self.log, ad, RAT_FAMILY_WLAN, 66 ad.log.info("Data rat can not go to iwlan mode successfully") 70 def _get_call_verification_function(self, ad): argument 71 user_profile = get_user_config_profile(ad) 79 ad = self.android_devices[0] [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/car/ |
D | car_telecom_utils.py | 35 def dial_number(log, ad, uri): argument 47 ad.serial, uri)) 50 if ad.droid.telecomIsInCall(): 51 log.info("We're still in call {}".format(ad.serial)) 55 ad.droid.telecomStartListeningForCallAdded() 59 ad.droid.telecomCallTelUri(uri) 63 event = ad.ed.pop_event( 72 ad.droid.telecomStopListeningForCallAdded() 75 log.info("Call ID: {} dev {}".format(call_id, ad.serial)) 80 if not wait_for_dialing(log, ad): [all …]
|
D | tel_telecom_utils.py | 27 def dial_number(log, ad, uri): argument 41 ad.serial, uri)) 44 ad.droid.telecomStartListeningForCallAdded() 46 ad.droid.telecomCallTelUri(uri) 50 event = ad.ed.pop_event( 59 ad.droid.telecomStopListeningForCallAdded() 62 log.info("Call ID: {} dev {}".format(call_id, ad.serial)) 67 if not wait_for_dialing(log, ad): 72 def wait_for_call_state(log, ad, call_id, state): argument 86 ad.droid.telecomCallStartListeningForEvent( [all …]
|
/tools/test/connectivity/acts/tests/google/tel/lab/ |
D | TelLabProjectFiTest.py | 118 self.ad = self.android_devices[0] 119 self.ad.sim_card = getattr(self.ad, "sim_card", None) 124 self.ad.adb.shell("settings put secure cmas_additional_broadcast_pkg " 142 toggle_airplane_mode(self.log, self.ad, True) 148 toggle_airplane_mode(self.log, self.ad, True) 160 self.ad.sim_card) 161 set_usim_parameters(self.anritsu, self.ad.sim_card) 164 self.ad.sim_card) 175 self.ad, 182 if self.ad.droid.connectivityCheckAirplaneMode(): [all …]
|
/tools/test/connectivity/acts/tests/google/gnss/ |
D | GnssSanityTest.py | 84 self.ad = self.android_devices[0] 102 if self.ad.model in self.legacy_projects: 107 set_attenuator_gnss_signal(self.ad, self.attenuators, 109 _init_device(self.ad) 112 get_baseband_and_gms_version(self.ad) 113 clear_logd_gnss_qxdm_log(self.ad) 114 set_attenuator_gnss_signal(self.ad, self.attenuators, 116 if not verify_internet_connection(self.ad.log, self.ad, retries=3, 121 stop_qxdm_logger(self.ad) 122 stop_adb_tcpdump(self.ad) [all …]
|
D | LocationPlatinumTest.py | 40 self.ad = self.android_devices[0] 66 gutils._init_device(self.ad) 68 gutils.clear_logd_gnss_qxdm_log(self.ad) 69 tutils.start_qxdm_logger(self.ad, self.begin_time) 70 tutils.start_adb_tcpdump(self.ad) 74 if int(self.ad.adb.shell('settings get secure location_mode')) != 3: 75 self.ad.adb.shell('settings put secure location_mode 3') 76 if not self.ad.droid.wifiCheckState(): 77 wutils.wifi_toggle_state(self.ad, True) 78 gutils.connect_to_wifi_network(self.ad, self.wifi_network) [all …]
|
D | FlpTtffTest.py | 49 self.ad = self.android_devices[0] 59 if int(self.ad.adb.shell("settings get global airplane_mode_on")) != 0: 60 self.ad.log.info("Force airplane mode off") 61 force_airplane_mode(self.ad, False) 62 set_attenuator_gnss_signal(self.ad, self.attenuators, 64 _init_device(self.ad) 67 get_baseband_and_gms_version(self.ad) 68 clear_logd_gnss_qxdm_log(self.ad) 69 set_attenuator_gnss_signal(self.ad, self.attenuators, 71 if not verify_internet_connection(self.ad.log, self.ad, retries=3, [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/wifi/aware/ |
D | AwareBaseTest.py | 39 for ad in self.android_devices: 41 not ad.droid.doesDeviceSupportWifiAwareFeature(), 44 aware_avail = ad.droid.wifiIsAwareAvailable() 45 ad.droid.wifiP2pClose() 46 wutils.wifi_toggle_state(ad, True) 47 utils.set_location_service(ad, True) 50 autils.wait_for_event(ad, 52 ad.aware_capabilities = autils.get_aware_capabilities(ad) 53 self.reset_device_parameters(ad) 54 self.reset_device_statistics(ad) [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/wifi/ |
D | wifi_test_utils.py | 590 def wait_for_wifi_state(ad, state, assert_on_fail=True): argument 604 _wait_for_wifi_state, assert_on_fail, ad, state=state) 607 def _wait_for_wifi_state(ad, state): argument 616 if state == ad.droid.wifiCheckState(): 620 ad.droid.wifiStartTrackingStateChange() 622 ad.serial) 624 ad.ed.wait_for_event(wifi_constants.WIFI_STATE_CHANGED, 628 asserts.assert_equal(state, ad.droid.wifiCheckState(), fail_msg) 630 ad.droid.wifiStopTrackingStateChange() 633 def wifi_toggle_state(ad, new_state=None, assert_on_fail=True): argument [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/net/ |
D | connectivity_test_utils.py | 20 def _listen_for_keepalive_event(ad, key, msg, ka_event): argument 29 ad.droid.socketKeepaliveStartListeningForEvent(key, ka_event) 31 event = ad.ed.pop_event("SocketKeepaliveCallback") 36 ad.droid.socketKeepaliveStopListeningForEvent(key, ka_event) 38 ad.droid.removeSocketKeepaliveReceiverKey(key) 40 ad.log.info("'%s' keepalive event successful" % ka_event) 43 def start_natt_socket_keepalive(ad, udp_encap, src_ip, dst_ip, interval = 10): argument 53 ad.log.info("Starting Natt Socket Keepalive") 54 key = ad.droid.startNattSocketKeepalive(udp_encap, src_ip, dst_ip, interval) 56 status = _listen_for_keepalive_event(ad, key, msg, "Started") [all …]
|
D | net_test_utils.py | 53 def verify_lte_data_and_tethering_supported(ad): argument 55 wutils.wifi_toggle_state(ad, False) 56 ad.droid.telephonyToggleDataConnection(True) 57 wait_for_cell_data_connection(ad.log, ad, True) 59 verify_http_connection(ad.log, ad), 62 ad.droid.connectivityIsTetheringSupported(), 64 wutils.wifi_toggle_state(ad, True) 67 def set_chrome_browser_permissions(ad): argument 81 ad.adb.shell(cmd) 83 logging.warning("adb command %s failed on %s" % (cmd, ad.serial)) [all …]
|
D | ipsec_test_utils.py | 34 def allocate_spis(ad, ip_a, ip_b, in_spi = None, out_spi = None): argument 47 in_spi_key = ad.droid.ipSecAllocateSecurityParameterIndex(ip_a, in_spi) 48 in_spi = ad.droid.ipSecGetSecurityParameterIndex(in_spi_key) 49 ad.log.info("In SPI: %s" % hex(in_spi)) 51 out_spi_key = ad.droid.ipSecAllocateSecurityParameterIndex(ip_b, out_spi) 52 out_spi = ad.droid.ipSecGetSecurityParameterIndex(out_spi_key) 53 ad.log.info("Out SPI: %s" % hex(out_spi)) 58 def release_spis(ad, spis): argument 66 ad.droid.ipSecReleaseSecurityParameterIndex(spi_key) 67 spi = ad.droid.ipSecGetSecurityParameterIndex(spi_key) [all …]
|
/tools/test/connectivity/acts/framework/tests/ |
D | acts_android_device_test.py | 54 ad = mock.MagicMock(name="AndroidDevice", serial=i, h_port=None) 55 ad.ensure_screen_on = mock.MagicMock(return_value=True) 56 ads.append(ad) 65 return [ad.serial for ad in get_mock_ads(5)] 199 ad = android_device.get_device(ads, serial=expected_serial) 200 self.assertEqual(ad.serial, expected_serial) 207 ad = android_device.get_device( 209 self.assertEqual(ad.serial, expected_serial) 210 self.assertEqual(ad.h_port, expected_h_port) 217 ad = android_device.get_device(ads, serial=len(ads)) [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/bt/ |
D | simulated_carkit_device.py | 28 self.ad = android_device.create(serial)[0] 29 if not bluetooth_enabled_check(self.ad): 31 self.mac_address = self.ad.droid.bluetoothGetLocalAddress() 32 self.ad.droid.bluetoothToggleState(False) 33 self.ad.droid.bluetoothMediaConnectToCarMBS() 36 self.ad.clean_up() 39 return self.ad.droid.telecomAcceptRingingCall(None) 42 return self.ad.droid.telecomEndCall() 45 self.ad.droid.bluetoothStartPairingHelper(True) 46 return self.ad.droid.bluetoothMakeDiscoverable() [all …]
|
/tools/test/connectivity/acts/tests/google/net/ |
D | DataCostTest.py | 51 for ad in self.android_devices: 52 nutils.verify_lte_data_and_tethering_supported(ad) 58 for ad in self.android_devices: 59 sub_id = str(ad.droid.telephonyGetSubscriberId()) 60 ad.droid.connectivityFactoryResetNetworkPolicies(sub_id) 61 ad.droid.connectivitySetDataWarningLimit(sub_id, -1) 62 wutils.reset_wifi(ad) 75 def _clear_netstats(self, ad): argument 81 ad.log.info("Clear netstats record.") 82 ad.adb.shell("rm /data/system/netstats/*") [all …]
|