/packages/modules/Bluetooth/system/blueberry/controllers/ |
D | android_bt_target_device.py | 60 def __init__(self, config: Dict[str, Any]) -> None: argument 63 self.config = config 64 self.pri_ad = None 65 self.sec_ad = None 66 self.serial = config.get('device_id', None) 67 self.audio_params = config.get('audio_params', None) 69 if self.serial: 71 self._ad = android_device.AndroidDevice(self.serial) 72 self.aud = adb_ui_device.AdbUiDevice(self._ad) 73 self.pri_ad = android_bluetooth_decorator.AndroidBluetoothDecorator( [all …]
|
/packages/modules/AdServices/adservices/scripts/ |
D | adservices_ui_tests.py | 118 def _write(self, xml, filepath): argument 123 def _generate_test_files(self): argument 124 os.makedirs(self.TEST_DIR, exist_ok=True) 125 os.makedirs(self.TEST_LAYOUT_DIR, exist_ok=True) 127 self._write(self.TEST_STRINGS_XML, self.TEST_STRINGS_FILE) 128 self._write(self.TEST_DIMENS_XML, self.TEST_DIMENS_FILE) 129 self._write(self.TEST_PUBLIC_XML, self.TEST_PUBLIC_FILE) 131 def _generate_ota_test_files(self): argument 132 os.makedirs(self.TEST_OTA_DIR, exist_ok=True) 133 os.makedirs(self.TEST_OTA_LAYOUT_DIR, exist_ok=True) [all …]
|
/packages/modules/Bluetooth/floss/pandora/server/ |
D | bluetooth.py | 59 def __init__(self): argument 60 self.setup_mainloop() 63 self.is_clean = False 66 self.manager_client = manager_client.FlossManagerClient(self.bus) 67 self.adapter_client = adapter_client.FlossAdapterClient(self.bus, self.DEFAULT_ADAPTER) 68 …self.advertising_client = advertising_client.FlossAdvertisingClient(self.bus, self.DEFAULT_ADAPTER) 69 self.scanner_client = scanner_client.FlossScannerClient(self.bus, self.DEFAULT_ADAPTER) 70 self.qa_client = qa_client.FlossQAClient(self.bus, self.DEFAULT_ADAPTER) 71 self.media_client = media_client.FlossMediaClient(self.bus, self.DEFAULT_ADAPTER) 72 self.gatt_client = gatt_client.FlossGattClient(self.bus, self.DEFAULT_ADAPTER) [all …]
|
/packages/modules/Bluetooth/floss/pandora/floss/ |
D | adapter_client.py | 32 def on_address_changed(self, addr): argument 40 def on_device_found(self, remote_device): argument 48 def on_discovering_changed(self, discovering): argument 56 def on_ssp_request(self, remote_device, class_of_device, variant, passkey): argument 71 def on_pin_request(self, remote_device, cod, min_16_digit): argument 84 def on_pin_display(self, remote_device, pincode): argument 95 def on_bond_state_changed(self, status, address, state): argument 108 def on_device_properties_changed(self, remote_device, props): argument 127 def on_device_connected(self, remote_device): argument 135 def on_device_disconnected(self, remote_device): argument [all …]
|
D | scanner_client.py | 32 def on_scanner_registered(self, uuid, scanner_id, status): argument 42 def on_scan_result(self, scan_result): argument 50 def on_advertisement_found(self, scanner_id, scan_result): argument 59 def on_advertisement_lost(self, scanner_id, scan_result): argument 68 def on_suspend_mode_change(self, suspend_mode): argument 83 def __init__(self, scanner_id, uuid, status): argument 91 self.scanner_id = scanner_id 92 self.uuid = uuid 93 self.status = status 94 self.events = { [all …]
|
D | gatt_client.py | 29 def on_client_registered(self, status, scanner_id): argument 38 def on_client_connection_state(self, status, client_id, connected, addr): argument 49 def on_phy_update(self, addr, tx_phy, rx_phy, status): argument 60 def on_phy_read(self, addr, tx_phy, rx_phy, status): argument 71 def on_search_complete(self, addr, services, status): argument 81 def on_characteristic_read(self, addr, status, handle, value): argument 92 def on_characteristic_write(self, addr, status, handle): argument 102 def on_execute_write(self, addr, status): argument 111 def on_descriptor_read(self, addr, status, handle, value): argument 122 def on_descriptor_write(self, addr, status, handle): argument [all …]
|
/packages/modules/NeuralNetworks/tools/api/ |
D | generate_api.py | 13 def __init__(self, filename): argument 14 self.filename = filename 15 self.line = None # most recently read line 16 self.lineno = -1 # zero-based 17 def finish(self): argument 21 def handle_line(self): argument 25 def read(self): argument 26 with open(self.filename) as f: 28 for self.lineno in range(len(lines)): 29 self.line = lines[self.lineno] [all …]
|
/packages/modules/NeuralNetworks/tools/systrace_parser/parser/test/ |
D | test_stats.py | 7 def setUp(self): argument 8 self.app_phase = AppPhase() 9 self.tracker1 = Tracker(1, False, self.app_phase) 10 self.tracker2 = Tracker(2, True, self.app_phase) 11 self.timevars = dict() 14 self.timevars[name] = self.from_spectime(name) 16 def from_spectime(self, spectime): argument 19 def feed_spec_text(self, text): argument 28 self.tracker1.handle_mark(self.from_spectime(time), mark) 30 self.tracker2.handle_mark(self.from_spectime(time), mark) [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/gd/security/ |
D | le_security_test.py | 54 def setup_class(self): argument 55 … gd_base_test.GdBaseTestClass.setup_class(self, dut_module='SECURITY', cert_module='SECURITY') 57 def setup_test(self): argument 59 gd_base_test.GdBaseTestClass.setup_test(self) 61 self.dut_security = PyLeSecurity(self.dut) 62 self.cert_security = PyLeSecurity(self.cert) 63 self.dut_hci = PyHci(self.dut) 65 raw_addr = self.dut.hci_controller.GetMacAddress(empty_proto.Empty()).address 67 …self.dut_address = common.BluetoothAddressWithType(address=common.BluetoothAddress(address=raw_add… 71 address_with_type=self.dut_address) [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/topshim/lib/ |
D | gatt_client.py | 39 def __init__(self, port=8999): argument 40 self.__channel = grpc.aio.insecure_channel("localhost:%d" % port) 41 self.__gatt_stub = facade_pb2_grpc.GattServiceStub(self.__channel) 44 async def close(self): argument 48 for task in self.__task_list: 51 self.__task_list.clear() 52 await self.__channel.close() 54 async def register_advertiser(self): argument 57 await self.__gatt_stub.RegisterAdvertiser(empty_proto.Empty()) 59 async def unregister_advertiser(self, advertiser_id): argument [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/gd/cert/ |
D | gd_device.py | 145 …def __init__(self, grpc_port: str, grpc_root_server_port: str, signal_port: str, cmd: List[str], l… argument 162 self.verbose_mode = verbose_mode 163 self.host_only_device = False 164 self.grpc_root_server_port = int(grpc_root_server_port) 165 self.grpc_port = int(grpc_port) 166 self.signal_port = int(signal_port) 167 self.name = name 168 self.type_identifier = type_identifier 169 self.label = label 170 self.log_path_base = get_current_context().get_full_output_path() [all …]
|
/packages/modules/Bluetooth/android/pandora/mmi2grpc/mmi2grpc/ |
D | gatt.py | 82 def __init__(self, channel, rootcanal): argument 84 self.gatt = GATT(channel) 85 self.host = Host(channel) 86 self.security = Security(channel) 87 self.security_storage = SecurityStorage(channel) 88 self.rootcanal = rootcanal 89 self.connection = None 90 self.services = None 91 self.characteristics = None 92 self.descriptors = None [all …]
|
D | avrcp.py | 43 def __init__(self, channel): argument 46 self.host = Host(channel) 47 self.a2dp = A2DP(channel) 48 self.avrcp = AVRCP(channel) 49 self.mediaplayer = MediaPlayer(channel) 52 def TSC_AVDTP_mmi_iut_accept_connect(self, test: str, pts_addr: bytes, **kwargs): argument 65 self.connection = self.host.WaitConnection(address=pts_addr).connection 68 self.source = self.a2dp.WaitSource(connection=self.connection).source 73 self.sink = self.a2dp.WaitSink(connection=self.connection).sink 79 def TSC_AVCTP_mmi_iut_accept_connect_control(self, **kwargs): argument [all …]
|
D | gap.py | 32 def __init__(self, channel, rootcanal): argument 34 self.gatt = GATT(channel) 35 self.host = Host(channel) 36 self.security = Security(channel) 37 self.security_storage = SecurityStorage(channel) 38 self.rootcanal = rootcanal 40 self.connection = None 41 self.pairing_events = None 42 self.inquiry_responses = None 43 self.scan_responses = None [all …]
|
D | hfp.py | 39 def __init__(self, test, channel, rootcanal, modem): argument 41 self.hfp = HFP(channel) 42 self.host = Host(channel) 43 self.security = Security(channel) 44 self.security_storage = SecurityStorage(channel) 45 self.rootcanal = rootcanal 46 self.modem = modem 47 self.connection = None 49 self._auto_confirm_requests() 51 def asyncWaitConnection(self, pts_addr, delay=WAIT_DELAY_BEFORE_CONNECTION): argument [all …]
|
D | __init__.py | 61 def __init__(self, test: str, args: List[str], **kwargs): argument 68 self.pandora_server_port = int(args[0]) if len(args) > 0 else PANDORA_SERVER_PORT 69 self.rootcanal_control_port = int(args[1]) if len(args) > 1 else ROOTCANAL_CONTROL_PORT 70 self.modem_simulator_port = int(args[2]) if len(args) > 2 else MODEM_SIMULATOR_PORT 72 self.test = test 73 self.rootcanal = None 74 self.modem = None 77 self._a2dp = None 78 self._avrcp = None 79 self._bnep = None [all …]
|
D | a2dp.py | 43 def __init__(self, channel, rootcanal): argument 46 self.host = Host(channel) 47 self.a2dp = A2DP(channel) 48 self.rootcanal = rootcanal 51 return PlaybackAudioRequest(data=data, source=self.source) 53 self.audio = AudioSignal(lambda frames: self.a2dp.PlaybackAudio(map(convert_frame, frames)), 57 def TSC_AVDTP_mmi_iut_accept_connect(self, test: str, pts_addr: bytes, **kwargs): argument 71 self.connection = self.host.WaitConnection(address=pts_addr).connection 74 self.source = self.a2dp.OpenSource(connection=self.connection).source 76 self.source = self.a2dp.WaitSource(connection=self.connection).source [all …]
|
/packages/services/Car/tools/watchdog/parser/ |
D | carwatchdog_dump_parser.py | 81 def __init__(self): argument 82 self.fingerprint = None 83 self.brand = None 84 self.product = None 85 self.device = None 86 self.version_release = None 87 self.id = None 88 self.version_incremental = None 89 self.type = None 90 self.tags = None [all …]
|
/packages/modules/Bluetooth/ |
D | build.py | 159 def __init__(self, use_flags): argument 165 self.flags = {} 169 self.set_flag(use, False) 173 self.set_flag(use, value) 179 self.set_flag(use, value) 181 def set_flag(self, key, value=True): argument 182 setattr(self, key, value) 183 self.flags[key] = value 188 def __init__(self, args): argument 194 self.args = args [all …]
|
/packages/modules/Uwb/tests/cts/hostsidetests/multidevices/uwb/FiraRangingTests/ |
D | ranging_test.py | 57 def __init__(self, configs: config_parser.TestRunConfig): argument 64 self.tests = _TEST_CASES 66 def setup_class(self): argument 68 self.uwb_devices = [ 70 for ad in self.android_devices 72 self.initiator, self.responder = self.uwb_devices 73 self.device_addresses = self.user_params.get("device_addresses", 75 self.initiator_addr, self.responder_addr = self.device_addresses 76 self.new_responder_addr = [4, 5] 77 self.p_sts_sub_session_id = 11 [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/avrcp/ |
D | bluetooth_avrcp_test.py | 35 def __init__(self, configs): argument 37 self.derived_bt_device = None 38 self.pri_device = None 39 self.is_android_bt_target_device = None 40 self.tracks = None 42 def setup_class(self): argument 44 super(BluetoothAvrcpTest, self).setup_class() 46 for device in self.android_devices: 51 self.pri_device = self.android_devices[0] 53 if len(self.android_devices) > 1 and not self.derived_bt_devices: [all …]
|
/packages/modules/adb/ |
D | test_device.py | 47 def wrapper(self, *args): argument 48 was_root = self.device.shell(['id', '-un'])[0].strip() == 'root' 50 self.device.unroot() 51 self.device.wait() 54 func(self, *args) 57 self.device.root() 58 self.device.wait() 64 def setUp(self) -> None: argument 65 self.device = adb.get_device() 69 def test_smoke(self): argument [all …]
|
/packages/modules/NeuralNetworks/tools/test_generator/ |
D | test_generator.py | 86 def __init__(self, *args, sep="_", showZero=False, startsFrom=0, skipRenaming=False): argument 89 self.name = name 93 while uniqueName in self.__class__.existingNames: 96 self.__class__.existingNames.add(uniqueName) 97 self.name = uniqueName 99 def __str__(self): argument 100 return self.name 104 def __eq__(self, other): argument 105 return isinstance(other, NamedObject) and self.name == other.name 107 def __ne__(self, other): argument [all …]
|
/packages/modules/Bluetooth/system/blueberry/utils/ |
D | blueberry_base_test.py | 25 def __init__(self, configs): argument 27 self._upload_test_report = None 28 self.capture_bugreport_on_fail = None 29 self.android_devices = None 30 self.derived_bt_devices = None 31 self.ignore_device_setup_failures = None 32 self._test_metrics = [] 34 def setup_generated_tests(self): argument 51 test_iterations = int(self.user_params.get('test_iterations', 0)) 55 test_method_selector = self.user_params.get('test_method_selector', 'all') [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/sl4a_sl4a/lib/ |
D | le_scanner.py | 38 def __init__(self, device): argument 39 self.device = device 41 def __wait_for_scan_result_event(self, expected_event_name, timeout=60): argument 43 event_info = self.device.ed.pop_event(expected_event_name, timeout) 49 def scan_for_address_expect_none(self, address, addr_type): argument 50 if self.is_scanning: 53 self.is_scanning = True 55 self.device.sl4a.bleSetScanSettingsScanMode(ble_scan_settings_modes['low_latency']) 56 self.device.sl4a.bleSetScanSettingsLegacy(False) 57 …self.filter_list, self.scan_settings, self.scan_callback = generate_ble_scan_objects(self.device.s… [all …]
|