Home
last modified time | relevance | path

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

1234567

/tools/test/connectivity/acts/framework/acts/test_utils/tel/
Dtel_test_utils.py239 def get_phone_number_by_adb(ad): argument
241 ad.adb.shell("service call iphonesubinfo 13"))
244 def get_iccid_by_adb(ad): argument
245 return ad.adb.shell("service call iphonesubinfo 11")
248 def get_operator_by_adb(ad): argument
249 operator = ad.adb.getprop("gsm.sim.operator.alpha")
255 def get_plmn_by_adb(ad): argument
256 plmn_id = ad.adb.getprop("gsm.sim.operator.numeric")
262 def get_sub_id_by_adb(ad): argument
263 return ad.adb.shell("service call iphonesubinfo 5")
[all …]
Dtel_voice_utils.py757 ad, argument
781 if not get_capability_for_subscription(ad, CAPABILITY_WFC,
782 get_outgoing_voice_sub_id(ad)):
783 ad.log.error("WFC is not supported, abort test.")
785 return phone_setup_iwlan_for_subscription(log, ad,
786 get_outgoing_voice_sub_id(ad),
792 ad, argument
818 toggle_airplane_mode(log, ad, is_airplane_mode, strict_checking=False)
821 if wfc_mode != WFC_MODE_DISABLED and not ad.droid.imsIsWfcEnabledByPlatform(
823 ad.log.error("WFC is not enabled on this device by checking "
[all …]
Dtel_subscription_utils.py28 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 …]
DTelephonyBaseTest.py108 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 …]
Dtel_data_utils.py237 def wifi_cell_switching(log, ad, wifi_network_ssid, wifi_network_pass, nw_gen): argument
260 log, ad, get_default_data_sub_id(ad), nw_gen,
262 ad.log.error("Device failed to register in %s", nw_gen)
265 start_youtube_video(ad)
267 ad.log.info("Make sure phone can connect to live network by WIFI")
268 if not ensure_wifi_connected(log, ad, wifi_network_ssid,
270 ad.log.error("WiFi connect fail.")
275 toggle_airplane_mode(log, ad, False)
276 wifi_toggle_state(log, ad, True)
277 ad.droid.telephonyToggleDataConnection(True)
[all …]
Dtel_video_utils.py80 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/
Dgnss_test_utils.py83 def remount_device(ad): argument
90 ad.root_adb()
91 if ad.adb.getprop("ro.boot.veritymode") == "enforcing":
92 disable_verity_result = ad.adb.disable_verity()
93 reboot(ad)
94 remount_result = ad.adb.remount()
95 ad.log.info("Attempt %d - %s" % (retries + 1, remount_result))
100 def reboot(ad): argument
106 ad.log.info("Reboot device to make changes take effect.")
107 ad.reboot()
[all …]
/tools/test/connectivity/acts/framework/acts/test_utils/wifi/
Dwifi_test_utils.py564 def wait_for_wifi_state(ad, state, assert_on_fail=True): argument
578 _wait_for_wifi_state, assert_on_fail, ad, state=state)
581 def _wait_for_wifi_state(ad, state): argument
590 if state == ad.droid.wifiCheckState():
594 ad.droid.wifiStartTrackingStateChange()
596 ad.serial)
598 ad.ed.wait_for_event(wifi_constants.WIFI_STATE_CHANGED,
602 asserts.assert_equal(state, ad.droid.wifiCheckState(), fail_msg)
604 ad.droid.wifiStopTrackingStateChange()
607 def wifi_toggle_state(ad, new_state=None, assert_on_fail=True): argument
[all …]
/tools/test/connectivity/acts_tests/tests/google/tel/live/
DTelLiveNoQXDMLogTest.py122 ad = self.dut
123 toggle_airplane_mode(self.log, ad, False)
124 if not phone_setup_volte(self.log, ad):
125 ad.log.error("Failed to setup VoLTE.")
148 ad.log.info("Telephony Bootup Time Test %s Iteration: %d / %d",
151 ad.log.debug("Begin Time is %s", begin_time)
152 ad.log.info("reboot!")
153 reboot_device(ad)
158 dict_match = ad.search_logcat(
163 ad.log.debug("Datetime for boot_complete is %s",
[all …]
DTelLiveProjectFiTest.py101 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 …]
DTelWifiDataTest.py85 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 …]
DTelLiveStressTest.py132 for ad in self.android_devices:
133 setattr(ad, "sdm_log", self.sdm_log)
134 ad.adb.shell("setprop nfc.debug_enable 1")
136 start_adb_tcpdump(ad, interface="any", mask="all")
188 def _ad_take_extra_logs(self, ad, test_name, begin_time): argument
189 src_file = os.path.join(ad.device_log_path,
190 'adblog_%s_debug.txt' % ad.serial)
191 dst_file = os.path.join(ad.device_log_path, test_name,
192 "%s_%s.logcat" % (ad.serial, test_name))
194 return super()._ad_take_extra_logs(ad, test_name, begin_time)
[all …]
DTelLiveDataTest.py171 ad = self.android_devices[0]
172 wifi_toggle_state(ad.log, ad, False)
174 ad.log.info("Attempt %d", iteration + 1)
175 if test_data_browsing_success_using_sl4a(ad.log, ad):
176 ad.log.info("Call test PASS in iteration %d", iteration + 1)
179 ad.log.info("Data Browsing test FAIL for all 3 iterations")
194 ad = self.android_devices[0]
195 wifi_toggle_state(ad.log, ad, True)
196 if not ensure_wifi_connected(ad.log, ad, self.wifi_network_ssid,
198 ad.log.error("WiFi connect fail.")
[all …]
DTelLiveCBRSTest.py248 for ad in ads:
249 if ad.droid.telecomIsInCall():
250 hangup_call_by_adb(ad)
418 for ad in ads:
419 if ad.droid.telecomIsInCall():
420 hangup_call_by_adb(ad)
633 def _cbrs_default_data_switch_timing(self, ad, method, validation=False): argument
636 if not getattr(ad, "cbrs_droid", None):
637 ad.cbrs_droid, ad.cbrs_ed = ad.get_droid()
638 ad.cbrs_ed.start()
[all …]
DTelLivePreflightTest.py56 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_tests/tests/google/gnss/
DGnssFunctionTest.py85 self.ad = self.android_devices[0]
113 if self.ad.model in self.legacy_projects:
119 _init_device(self.ad)
122 get_baseband_and_gms_version(self.ad)
124 clear_logd_gnss_qxdm_log(self.ad)
125 set_attenuator_gnss_signal(self.ad, self.attenuators,
127 if not verify_internet_connection(self.ad.log, self.ad, retries=3,
133 stop_qxdm_logger(self.ad)
134 stop_adb_tcpdump(self.ad)
135 set_attenuator_gnss_signal(self.ad, self.attenuators,
[all …]
DLocationPlatinumTest.py35 self.ad = self.android_devices[0]
61 gutils._init_device(self.ad)
63 gutils.clear_logd_gnss_qxdm_log(self.ad)
64 tutils.start_qxdm_logger(self.ad, self.begin_time)
65 tutils.start_adb_tcpdump(self.ad)
69 if int(self.ad.adb.shell('settings get secure location_mode')) != 3:
70 self.ad.adb.shell('settings put secure location_mode 3')
71 if not self.ad.droid.wifiCheckState():
72 wutils.wifi_toggle_state(self.ad, True)
73 gutils.connect_to_wifi_network(self.ad, self.wifi_network)
[all …]
/tools/test/connectivity/acts_tests/tests/google/tel/lab/
DTelLabProjectFiTest.py118 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 …]
DTelLabNeighborCellTest.py155 self.ad = self.android_devices[0]
156 self.ad.sim_card = getattr(self.ad, "sim_card", None)
199 self.ad.droid.telephonySetPreferredNetworkTypes(
202 toggle_airplane_mode(self.log, self.ad, True)
203 self.ad.droid.telephonyToggleDataConnection(True)
204 self.ad.adb.shell("setprop net.lte.ims.volte.provisioned 1",
209 toggle_airplane_mode(self.log, self.ad, True)
402 ad, argument
424 info_list = ad.droid.telephonyGetAllCellInfo()
491 ad, argument
[all …]
/tools/test/connectivity/acts/framework/tests/
Dacts_android_device_test.py54 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/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/bt/
Dbt_test_utils.py90 def bluetooth_enabled_check(ad, timeout_sec=5): argument
101 if not ad.droid.bluetoothCheckState():
102 ad.droid.bluetoothToggleState(True)
105 ad.ed.pop_event(expected_bluetooth_on_event_name,
108 ad.log.info(
111 if ad.droid.bluetoothCheckState():
112 ad.log.info(".. actual state is ON")
114 ad.log.error(".. actual state is OFF")
117 while not ad.droid.bluetoothCheckState() and time.time() < end_time:
119 return ad.droid.bluetoothCheckState()
[all …]
/tools/test/connectivity/acts/framework/acts/test_utils/net/
Dnet_test_utils.py47 def verify_lte_data_and_tethering_supported(ad): argument
49 wutils.wifi_toggle_state(ad, False)
50 ad.droid.telephonyToggleDataConnection(True)
51 wait_for_cell_data_connection(ad.log, ad, True)
53 verify_http_connection(ad.log, ad),
56 ad.droid.connectivityIsTetheringSupported(),
58 wutils.wifi_toggle_state(ad, True)
61 def set_chrome_browser_permissions(ad): argument
75 ad.adb.shell(cmd)
77 logging.warning("adb command %s failed on %s" % (cmd, ad.serial))
[all …]
/tools/test/connectivity/acts/framework/acts/
Dutils.py419 for ad in android_devices:
420 msg = "SL4A connection not established properly on %s." % ad.serial
421 assert ad.droid, msg
515 def sync_device_time(ad): argument
523 ad.adb.shell("settings put global auto_time 0", ignore_status=True)
524 ad.adb.shell("settings put global auto_time_zone 0", ignore_status=True)
525 droid = ad.droid
607 def force_airplane_mode(ad, new_state, timeout_value=60): argument
625 def wait_for_device_with_timeout(ad): argument
626 ad.adb.wait_for_device()
[all …]

1234567