Lines Matching refs:ad
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/*")
83 asserts.assert_equal("", ad.adb.shell("ls /data/system/netstats/"),
85 ad.reboot()
87 nutils.verify_lte_data_and_tethering_supported(ad)
88 self._check_multipath_preference_from_dumpsys(ad)
90 def _check_multipath_preference_from_dumpsys(self, ad): argument
96 out = ad.adb.shell("dumpsys connectivity | grep budget")
98 ad.log.info("MultipathPolicyTracker: %s" % out)
104 def _get_total_data_usage_for_device(self, ad, conn_type, sub_id): argument
119 data_usage = ad.droid.connectivityQuerySummaryForDevice(
139 ad, argument
154 ad.droid.connectivityGetMultipathPreferenceForNetwork(wifi_network)
156 ad.droid.connectivityGetMultipathPreferenceForNetwork(cell_network)
176 ad = self.android_devices[0]
177 self.dut = ad
178 self._clear_netstats(ad)
179 self.tcpdump_pid = nutils.start_tcpdump(ad, self.test_name)
181 sub_id = str(ad.droid.telephonyGetSubscriberId())
182 cell_network = ad.droid.connectivityGetActiveNetwork()
184 wutils.wifi_connect(ad, self.wifi_network)
185 wifi_network = ad.droid.connectivityGetActiveNetwork()
190 ad, RELIABLE, RELIABLE, wifi_network, cell_network)
193 total_pre = self._get_total_data_usage_for_device(ad, 0, sub_id)
195 ad.droid.connectivitySetDataUsageLimit(
198 ad.droid.connectivitySetDataWarningLimit(
206 ad, RELIABLE, NONE, wifi_network, cell_network)
224 ad = self.android_devices[1]
225 self.dut = ad
226 self._clear_netstats(ad)
227 self.tcpdump_pid = nutils.start_tcpdump(ad, self.test_name)
229 cell_network = ad.droid.connectivityGetActiveNetwork()
231 wutils.wifi_connect(ad, self.wifi_network)
232 wifi_network = ad.droid.connectivityGetActiveNetwork()
237 ad, RELIABLE, RELIABLE, wifi_network, cell_network)
240 ad.droid.connectivityNetworkOpenConnection(cell_network,
246 if _check_file_existance(ad, file_path):
248 ad.adb.shell("rm -rf %s%s" % (DOWNLOAD_PATH, file_name))
255 ad, RELIABLE, NONE, wifi_network, cell_network)