Home
last modified time | relevance | path

Searched refs:ad (Results 1 – 25 of 91) sorted by relevance

1234

/tools/test/connectivity/acts/framework/acts/test_utils/tel/
Dtel_subscription_utils.py26 def initial_set_up_for_subid_infomation(log, ad): argument
49 if hasattr(ad, "default_voice_sim_slot_index"):
51 log, ad, ad.default_voice_sim_slot_index)
52 set_subid_for_outgoing_call(ad, outgoing_voice_sub_id)
54 outgoing_voice_sub_id = ad.droid.subscriptionGetDefaultVoiceSubId()
55 setattr(ad, "outgoing_voice_sub_id", outgoing_voice_sub_id)
62 if hasattr(ad, "default_message_sim_slot_index"):
64 log, ad, ad.default_message_sim_slot_index)
65 set_subid_for_message(ad, outgoing_message_sub_id)
67 outgoing_message_sub_id = ad.droid.subscriptionGetDefaultSmsSubId()
[all …]
Dtel_test_utils.py184 def get_phone_number_by_adb(ad): argument
186 ad.adb.shell("service call iphonesubinfo 13"))
189 def get_iccid_by_adb(ad): argument
190 return ad.adb.shell("service call iphonesubinfo 11")
193 def get_operator_by_adb(ad): argument
194 return ad.adb.getprop("gsm.sim.operator.alpha")
197 def get_plmn_by_adb(ad): argument
198 return ad.adb.getprop("gsm.sim.operator.numeric")
201 def get_sub_id_by_adb(ad): argument
202 return ad.adb.shell("service call iphonesubinfo 5")
[all …]
Dtel_voice_utils.py282 ad, argument
306 return phone_setup_iwlan_for_subscription(log, ad,
307 get_outgoing_voice_sub_id(ad),
313 ad, argument
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):
[all …]
DTelephonyBaseTest.py77 for ad in self.android_devices:
79 ad.adb.shell("killall -9 tcpdump")
81 ad.log.warn("Killing existing tcpdump processes failed")
82 if not hasattr(ad, "init_log_path"):
83 ad.init_log_path = ad.log_path
84 ad.log_path = self.log_path
85 print_radio_info(ad)
86 if not unlock_sim(ad):
87 abort_all_tests(ad.log, "unable to unlock SIM")
88 ad.wakeup_screen()
[all …]
Dtel_video_utils.py78 def phone_setup_video(log, ad, wfc_mode=WFC_MODE_DISABLED): argument
91 return phone_setup_video_for_subscription(log, ad,
92 get_outgoing_voice_sub_id(ad),
97 ad, argument
114 toggle_airplane_mode(log, ad, False)
115 if not set_wfc_mode(log, ad, wfc_mode):
117 ad.serial, wfc_mode))
119 toggle_volte(log, ad, True)
122 log, ad, GEN_4G, voice_or_data=NETWORK_SERVICE_DATA):
123 log.error("{} voice not in LTE mode.".format(ad.serial))
[all …]
DTelephonyLabPowerTest.py60 self.ad = self.android_devices[0]
61 self.ad.sim_card = getattr(self.ad, "sim_card", None)
69 self.ad.reboot()
71 set_adaptive_brightness(self.ad, False)
72 set_ambient_display(self.ad, False)
73 set_auto_rotate(self.ad, False)
74 set_location_service(self.ad, False)
76 disable_doze(self.ad)
77 set_phone_screen_on(self.log, self.ad, 15)
78 self.ad.droid.telephonyFactoryReset()
[all …]
/tools/test/connectivity/acts/tests/google/tel/live/
DTelLiveProjectFiTest.py84 def _add_google_account(self, ad, retries=3): argument
86 ad.ensure_screen_on()
87 output = ad.adb.shell(
91 (ad.user_account, ad.user_password))
93 ad.log.info("google account is added successfully")
95 ad.log.error("Fail to add google account due to %s", output)
98 def _remove_google_account(self, ad, retries=3): argument
99 if not ad.is_apk_installed("com.google.android.tradefed.account"
104 ad.log.info("Install account_util %s", account_util)
105 ad.ensure_screen_on()
[all …]
DTelWifiDataTest.py84 ad = self.android_devices[0]
85 toggle_airplane_mode(self.log, ad, False)
86 if not ensure_network_generation(self.log, ad,
90 if not ensure_wifi_connected(self.log, ad,
93 ad.log.error("connect WiFi failed")
148 def _wifi_cell_irat_task(self, ad, irat_wait_time=60): argument
154 if (not wait_for_wifi_data_connection(self.log, ad, True,
156 not verify_http_connection(self.log, ad)):
157 ad.log.error("Data not on WiFi")
158 get_telephony_signal_strength(ad)
[all …]
DTelLiveSettingsTest.py90 self.ad = self.android_devices[0]
106 self.log, self.ad, self.wifi_network_ssid,
110 if initial_setup_wfc_mode and not set_wfc_mode(self.log, self.ad,
114 if not phone_idle_iwlan(self.log, self.ad):
120 if not wifi_toggle_state(self.log, self.ad, False):
121 self.ad.log.error("Failed to turn off WiFi.")
124 if not wifi_reset(self.log, self.ad, False):
125 self.ad.log.error("Failed to reset WiFi")
128 if not set_wfc_mode(self.log, self.ad, WFC_MODE_DISABLED):
129 self.ad.log.error("Failed to turn off WFC.")
[all …]
DTelLivePostflightTest.py50 for ad in self.android_devices:
51 post_crash = ad.check_crash_report(self.test_id)
52 pre_crash = getattr(ad, "crash_report_preflight", [])
55 msg += "%s find new crash reports %s " % (ad.serial,
57 ad.log.error("Find new crash reports %s", crash_diff)
58 crash_path = os.path.join(ad.log_path, self.test_name,
61 ad.pull_files(crash_diff, crash_path)
62 self._ad_take_bugreport(ad, self.test_name, self.begin_time)
71 for ad in self.android_devices:
72 tombstones = ad.get_file_names("/data/tombstones/")
[all …]
DTelLivePreflightTest.py79 for ad in self.android_devices:
80 toggle_airplane_mode_by_adb(self.log, ad, False)
115 tasks = [(ota_updater.update, [ad]) for ad in self.android_devices]
123 for ad in self.android_devices:
124 if is_sim_locked(ad):
125 ad.log.info("After OTA, SIM keeps the locked state")
126 elif getattr(ad, "is_sim_locked", False):
127 ad.log.error("After OTA, SIM loses the locked state")
128 if not unlock_sim(ad):
129 abort_all_tests(ad.log, "unable to unlock SIM")
[all …]
DTelLiveStressCallTest.py81 for ad in self.android_devices:
83 ad.log,
84 ad,
88 ad.log.error("Phone Wifi connection fails.")
90 ad.log.info("Phone WIFI is connected successfully.")
91 if not set_wfc_mode(self.log, ad, WFC_MODE_WIFI_PREFERRED):
92 ad.log.error("Phone failed to enable Wifi-Calling.")
94 ad.log.info("Phone is set in Wifi-Calling successfully.")
95 if not phone_idle_iwlan(self.log, ad):
96 ad.log.error("Phone is not in WFC enabled state.")
[all …]
/tools/test/connectivity/acts/framework/acts/test_utils/car/
Dcar_telecom_utils.py35 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 …]
Dtel_telecom_utils.py27 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/framework/acts/test_utils/wifi/aware/
DAwareBaseTest.py41 for ad in self.android_devices:
43 not ad.droid.doesDeviceSupportWifiAwareFeature(),
45 wutils.wifi_toggle_state(ad, True)
46 ad.droid.wifiP2pClose()
47 utils.set_location_service(ad, True)
48 aware_avail = ad.droid.wifiIsAwareAvailable()
51 autils.wait_for_event(ad, aconsts.BROADCAST_WIFI_AWARE_AVAILABLE)
52 ad.ed.clear_all_events()
53 ad.aware_capabilities = autils.get_aware_capabilities(ad)
54 self.reset_device_parameters(ad)
[all …]
/tools/test/connectivity/acts/framework/acts/test_utils/wifi/
Dwifi_test_utils.py543 def wait_for_wifi_state(ad, state, assert_on_fail=True): argument
557 _wait_for_wifi_state, assert_on_fail, ad, state=state)
560 def _wait_for_wifi_state(ad, state): argument
569 if state == ad.droid.wifiCheckState():
573 ad.droid.wifiStartTrackingStateChange()
575 ad.serial)
577 ad.ed.wait_for_event(wifi_constants.WIFI_STATE_CHANGED,
581 asserts.assert_equal(state, ad.droid.wifiCheckState(), fail_msg)
583 ad.droid.wifiStopTrackingStateChange()
585 def wifi_toggle_state(ad, new_state=None, assert_on_fail=True): argument
[all …]
/tools/test/connectivity/acts/framework/acts/test_utils/net/
Dipsec_test_utils.py34 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/tests/google/net/
DDataCostTest.py50 for ad in self.android_devices:
51 wutils.reset_wifi(ad)
52 ad.droid.telephonyToggleDataConnection(True)
53 wait_for_cell_data_connection(self.log, ad, True)
55 verify_http_connection(self.log, ad),
59 for ad in self.android_devices:
60 wutils.reset_wifi(ad)
61 ad.droid.telephonyToggleDataConnection(True)
65 def _get_total_data_usage_for_device(self, ad, conn_type, sub_id): argument
80 data_usage = ad.droid.connectivityQuerySummaryForDevice(
[all …]
/tools/test/connectivity/acts/framework/tests/
Dacts_android_device_test.py52 ad = mock.MagicMock(name="AndroidDevice", serial=i, h_port=None)
53 ad.ensure_screen_on = mock.MagicMock(return_value=True)
54 ads.append(ad)
63 return [ad.serial for ad in get_mock_ads(5)]
196 ad = android_device.get_device(ads, serial=expected_serial)
197 self.assertEqual(ad.serial, expected_serial)
204 ad = android_device.get_device(
206 self.assertEqual(ad.serial, expected_serial)
207 self.assertEqual(ad.h_port, expected_h_port)
215 ad = android_device.get_device(ads, serial=len(ads))
[all …]
DSl4aSanityTest.py42 ad = self.android_devices[0]
45 ad.terminate_all_sessions()
47 droid, ed = ad.get_droid()
51 ad = self.android_devices[0]
53 assert wifi_toggle_state(ad.droid, ad.ed, False)
54 assert wifi_toggle_state(ad.droid, ad.ed, True)
/tools/test/connectivity/acts/framework/acts/test_utils/wifi/rtt/
DRttBaseTest.py45 for ad in self.android_devices:
46 utils.set_location_service(ad, True)
48 not ad.droid.doesDeviceSupportWifiRttFeature(),
50 wutils.wifi_toggle_state(ad, True)
51 rtt_avail = ad.droid.wifiIsRttAvailable()
54 rutils.wait_for_event(ad, rconsts.BROADCAST_WIFI_RTT_AVAILABLE)
55 ad.ed.clear_all_events()
56 rutils.config_privilege_override(ad, False)
57 ad.droid.wifiSetCountryCode(wutils.WifiEnums.CountryCode.US)
60 for ad in self.android_devices:
[all …]
/tools/test/connectivity/acts/framework/acts/test_utils/bt/
DBtFunhausBaseTest.py45 self.ad = self.android_devices[0]
49 self.ad.droid.bluetoothStartPairingHelper(False)
52 self.ad.droid.bluetoothBond(self.dongle.mac_address)
55 self.ad.log.info("Verifying devices are bonded")
57 bonded_devices = self.ad.droid.bluetoothGetBondedDevices()
61 self.ad.log.info("Successfully bonded to device.")
64 self.ad.log.info("Failed to bond devices.")
92 for ad in self.android_devices:
93 sync_device_time(ad)
95 ad.adb.shell("setprop persist.bluetooth.btsnoopenable false")
[all …]
DBtMetricsBaseTest.py31 self.ad = self.android_devices[0]
51 for ad in self.android_devices:
52 ad.metrics_path = os.path.join(ad.log_path, "BluetoothMetrics")
53 create_dir(ad.metrics_path)
54 ad.bluetooth_proto_module = \
55 compile_import_proto(ad.metrics_path, self.bluetooth_proto_path)
56 if not ad.bluetooth_proto_module:
70 for ad in self.android_devices:
71 get_bluetooth_metrics(ad, ad.bluetooth_proto_module)
84 for ad in ads:
[all …]
/tools/test/connectivity/acts/tests/google/tel/lab/
DTelLabDataRoamingTest.py48 self.ad = self.android_devices[0]
49 self.ad.sim_card = getattr(self.ad, "sim_card", None)
53 if self.ad.sim_card == "VzW12349":
54 set_preferred_apn_by_adb(self.ad, "VZWINTERNET")
69 toggle_airplane_mode(self.log, self.ad, True)
70 self.ad.adb.shell(
77 toggle_airplane_mode(self.log, self.ad, True)
87 self.ad,
95 self.anritsu, self.user_params, self.ad.sim_card)
96 set_usim_parameters(self.anritsu, self.ad.sim_card)
[all …]
DTelLabVoiceTest.py81 self.ad = self.android_devices[0]
82 self.ad.sim_card = getattr(self.ad, "sim_card", None)
93 if self.ad.sim_card == "VzW12349":
94 set_preferred_apn_by_adb(self.ad, "VZWINTERNET")
109 self.ad.droid.telephonyFactoryReset()
110 if self.ad.sim_card == "VzW12349":
111 self.ad.droid.imsSetVolteProvisioning(True)
113 self.ad.log.error(e)
114 toggle_airplane_mode_by_adb(self.log, self.ad, True)
122 toggle_airplane_mode_by_adb(self.log, self.ad, True)
[all …]

1234