/system/media/camera/docs/ |
D | metadata_model.py | 52 def __init__(self): argument 53 self._parent = None 54 self._name = None 57 def parent(self): argument 58 return self._parent 61 def name(self): argument 62 return self._name 64 def find_all(self, pred): argument 75 if pred(self): 76 yield self [all …]
|
/system/extras/tests/bootloader/ |
D | haltest.py | 23 def __init__(self, *args, **kwargs): argument 24 super(HalTest, self).__init__(*args, **kwargs) 25 self.bootctl = bootctl.Bootctl(self.device) 27 def test_slots(self): argument 30 self.device.root() 31 self.device.wait() 32 num_slots = self.bootctl.get_number_slots() 35 suffix = self.bootctl.get_suffix(slot) 36 self.assertNotEqual(suffix, "(null)") 38 self.assertEqual(len(suffixes), num_slots) [all …]
|
D | bootloadertest.py | 31 def exists_validvals(self, varname, varlist, validlist): argument 32 self.assertIn(varname, varlist) 33 self.assertIn(varlist[varname], validlist) 36 def exists_yes_no(self, varname, varlist): argument 37 return self.exists_validvals(varname, varlist, ["yes", "no"]) 39 def exists_nonempty(self, varname, varlist): argument 40 self.assertIn(varname, varlist) 41 self.assertGreater(len(varlist[varname]), 0) 44 def exists_integer(self, varname, varlist, base=10): argument 46 self.assertIn(varname, varlist) [all …]
|
/system/extras/simpleperf/scripts/ |
D | test.py | 77 def __init__(self): argument 78 self.log_file = 'test.log' 79 remove(self.log_file) 81 self.log_fh = open(self.log_file, 'a') 82 logging.basicConfig(filename=self.log_file) 84 def writeln(self, s): argument 85 return self.write(s + '\n') 87 def write(self, s): argument 89 self.log_fh.write(s) 91 self.flush() [all …]
|
D | app_profiler.py | 39 def __init__(self, path, name, score): argument 40 self.path = path 41 self.name = name 42 self.score = score 44 def __repr__(self): argument 45 return self.__str__() 47 def __str__(self): argument 48 return '[path: %s, name %s, score %s]' % (self.path, self.name, self.score) 58 def __init__(self, ndk_path, device_arch, adb): argument 59 self.adb = adb [all …]
|
D | simpleperf_report_lib.py | 75 def thread_comm(self): argument 76 return _char_pt_to_str(self._thread_comm) 96 def name(self): argument 97 return _char_pt_to_str(self._name) 99 def parse_value(self, data): argument 105 if self.elem_count > 1 and self.elem_size == 1: 109 while length < self.elem_count and bytes_to_str(data[self.offset + length]) != '\x00': 111 return bytes_to_str(data[self.offset : self.offset + length]) 112 unpack_key = self._unpack_key_dict.get(self.elem_size) 114 if not self.is_signed: [all …]
|
D | report_html.py | 34 def __init__(self, output_path): argument 35 self.fh = open(output_path, 'w') 36 self.tag_stack = [] 38 def close(self): argument 39 self.fh.close() 41 def open_tag(self, tag, **attrs): argument 45 self.fh.write('<%s%s>' % (tag, attr_str)) 46 self.tag_stack.append(tag) 47 return self 49 def close_tag(self, tag=None): argument [all …]
|
D | pprof_proto_generator.py | 54 def __init__(self, profile): argument 55 self.profile = profile 56 self.string_table = profile.string_table 58 def show(self): argument 59 p = self.profile 65 self.show_value_type(p.sample_type[i]) 69 self.show_sample(p.sample[i], sub_space) 73 self.show_mapping(p.mapping[i], sub_space) 77 self.show_location(p.location[i], sub_space) 80 self.show_function(p.function[i], sub_space) [all …]
|
/system/bt/gd/cert/ |
D | behavior.py | 29 def get_behaviors(self): argument 48 def __init__(self, reply_stage_factory): argument 49 self._reply_stage_factory = reply_stage_factory 50 self._instances = [] 51 self._invoked_obj = [] 52 self._invoked_condition = Condition() 53 self.set_default_to_crash() 55 def begin(self, matcher): argument 56 return PersistenceStage(self, matcher, self._reply_stage_factory) 58 def append(self, behavior_instance): argument [all …]
|
D | py_l2cap.py | 33 def __init__(self, device, psm, l2cap_stream): argument 34 self._device = device 35 self._psm = psm 36 self._le_l2cap_stream = l2cap_stream 37 self._our_le_l2cap_view = FilteringEventStream(self._le_l2cap_stream, 38 … L2capMatchers.PacketPayloadWithMatchingPsm(self._psm)) 40 def get_event_queue(self): argument 41 return self._our_le_l2cap_view.get_event_queue() 43 def send(self, payload): argument 44 self._device.l2cap.SendDynamicChannelPacket( [all …]
|
D | gd_device.py | 139 …def __init__(self, grpc_port: str, grpc_root_server_port: str, signal_port: str, cmd: List[str], l… argument 156 self.verbose_mode = verbose_mode 157 self.grpc_root_server_port = int(grpc_root_server_port) 158 self.grpc_port = int(grpc_port) 159 self.signal_port = int(signal_port) 160 self.name = name 161 self.type_identifier = type_identifier 162 self.label = label 164 self.log_path_base = get_current_context().get_full_output_path() 165 self.test_runner_base_path = \ [all …]
|
D | py_le_acl_manager.py | 31 def __init__(self, le_acl_manager, address, remote_addr, handle, event_stream): argument 40 self.le_acl_manager = le_acl_manager 43 self.handle = handle 44 self.connection_event_stream = event_stream 45 self.acl_stream = EventStream( 46 self.le_acl_manager.FetchAclData(le_acl_manager_facade.LeHandleMsg(handle=self.handle))) 47 self.remote_address = remote_addr 48 self.own_address = address 49 self.disconnect_reason = None 51 def close(self): argument [all …]
|
D | truth.py | 32 def __init__(self, value): argument 33 self._value = value 35 def isEqualTo(self, other): argument 36 if self._value != other: 37 …raise signals.TestFailure("Expected \"%s\" to be equal to \"%s\"" % (self._value, other), extras=N… 39 def isNotEqualTo(self, other): argument 40 if self._value == other: 41 …raise signals.TestFailure("Expected \"%s\" to not be equal to \"%s\"" % (self._value, other), extr… 43 def isNone(self): argument 44 if self._value is not None: [all …]
|
D | py_hci.py | 31 def __init__(self, handle, acl_stream, device): argument 32 self.handle = int(handle) 33 self.device = device 35 self.our_acl_stream = FilteringEventStream(acl_stream, None) 37 def send(self, pb_flag, b_flag, data): argument 39 … handle=self.handle, packet_boundary_flag=int(pb_flag), broadcast_flag=int(b_flag), data=data) 40 self.device.hci.SendAclData(acl_msg) 42 def send_first(self, data): argument 43 self.send(hci_packets.PacketBoundaryFlag.FIRST_AUTOMATICALLY_FLUSHABLE, 46 def send_continuing(self, data): argument [all …]
|
/system/update_engine/scripts/update_payload/ |
D | payload.py | 73 def __init__(self): argument 74 self.version = None 75 self.manifest_len = None 76 self.metadata_signature_len = None 77 self.size = None 79 def ReadFromPayload(self, payload_file, hasher=None): argument 97 magic = common.Read(payload_file, len(self._MAGIC), hasher=hasher) 98 if magic != self._MAGIC: 101 self.version = _ReadInt(payload_file, self._VERSION_SIZE, True, 103 self.manifest_len = _ReadInt(payload_file, self._MANIFEST_LEN_SIZE, True, [all …]
|
/system/bt/gd/l2cap/classic/cert/ |
D | pts_l2cap_test.py | 30 def setup_test(self): argument 31 self.device_under_test = self.gd_devices[0] 33 self.device_under_test.rootservice.StartStack( 37 self.device_under_test.wait_channel_ready() 39 …dut_address = self.device_under_test.controller_read_only_property.ReadLocalAddress(empty_pb2.Empt… 40 pts_address = self.controller_configs.get('pts_address').lower() 41 self.device_under_test.address = dut_address 43 self.dut_address = common_pb2.BluetoothAddress(address=self.device_under_test.address) 44 self.pts_address = common_pb2.BluetoothAddress(address=str.encode(pts_address)) 46 self.device_under_test.neighbor.EnablePageScan(neighbor_facade.EnableMsg(enabled=True)) [all …]
|
D | cert_l2cap.py | 42 def __init__(self, device, scid, dcid, acl_stream, acl, control_channel, fcs=None): argument 43 self._device = device 44 self._scid = scid 45 self._dcid = dcid 46 self._acl_stream = acl_stream 47 self._acl = acl 48 self._control_channel = control_channel 49 self._config_rsp_received = False 50 self._config_rsp_sent = False 52 …self._our_acl_view = FilteringEventStream(acl_stream, L2capMatchers.ExtractBasicFrameWithFcs(scid)) [all …]
|
/system/bt/gd/l2cap/le/cert/ |
D | cert_le_l2cap.py | 34 def __init__(self, device, scid, dcid, acl_stream, acl, control_channel, initial_credits=0): argument 35 self._device = device 36 self._scid = scid 37 self._dcid = dcid 38 self._acl_stream = acl_stream 39 self._acl = acl 40 self._control_channel = control_channel 41 self._our_acl_view = FilteringEventStream(acl_stream, L2capMatchers.ExtractBasicFrame(scid)) 42 self._credits_left = initial_credits 44 def get_event_queue(self): argument [all …]
|
D | le_l2cap_test.py | 38 def setup_class(self): argument 41 def setup_test(self): argument 44 self.dut_l2cap = PyLeL2cap(self.dut) 45 self.cert_l2cap = CertLeL2cap(self.cert) 46 self.dut_address = common.BluetoothAddressWithType( 48 self.cert_address = common.BluetoothAddressWithType( 52 address_with_type=self.dut_address, 56 …self.dut_l2cap._device.hci_le_initiator_address.SetPrivacyPolicyForInitiatorAddress(dut_privacy_po… 59 address_with_type=self.cert_address, 63 …self.cert_l2cap._device.hci_le_initiator_address.SetPrivacyPolicyForInitiatorAddress(privacy_polic… [all …]
|
/system/update_engine/scripts/ |
D | payload_info_unittest.py | 48 def __init__(self, **kwargs): argument 49 self.list_ops = False 50 self.stats = False 51 self.signatures = False 53 setattr(self, key, val) 54 if not hasattr(self, 'payload_file'): 55 self.payload_file = None 61 def __init__(self, src_extents, dst_extents, op_type, **kwargs): argument 62 self.src_extents = src_extents 63 self.dst_extents = dst_extents [all …]
|
/system/extras/simpleperf/scripts/inferno/ |
D | data_types.py | 20 def __init__(self, method, dso): argument 21 self.method = method 22 self.dso = dso 27 def __init__(self, tid, pid): argument 28 self.tid = tid 29 self.pid = pid 30 self.name = "" 31 self.samples = [] 32 self.flamegraph = FlameGraphCallSite("root", "", 0) 33 self.num_samples = 0 [all …]
|
/system/bt/gd/security/cert/ |
D | le_security_test.py | 65 def setup_class(self): argument 68 def setup_test(self): argument 71 self.dut_security = PyLeSecurity(self.dut) 72 self.cert_security = PyLeSecurity(self.cert) 73 self.dut_hci = PyHci(self.dut) 75 self.dut_address = common.BluetoothAddressWithType( 79 address_with_type=self.dut_address) 80 self.dut.security.SetLeInitiatorAddressPolicy(privacy_policy) 81 self.cert_address = common.BluetoothAddressWithType( 85 address_with_type=self.cert_address) [all …]
|
/system/extras/boottime_tools/io_analysis/ |
D | check_io_trace_all.py | 41 def __init__(self, block_num, start_time, size): argument 42 self.block_num = block_num 43 self.start_time = start_time 44 self.size = size 53 def __init__(self, name): argument 54 self.name = name 55 self.reads = {} # k : dev_num, v : [] of reads 56 self.per_device_total_reads = {} 57 self.writes = {} 58 self.per_device_total_writes = {} [all …]
|
/system/extras/boottime_tools/bootanalyze/ |
D | bugreport_anayze.py | 70 def __init__(self): argument 71 self.events = collections.OrderedDict() #K: keyword, V:time in ms 72 self.timings = collections.OrderedDict() 73 self.shutdown_events = collections.OrderedDict() 74 self.java_crash = collections.OrderedDict() #K:time, V:list of crash infos, each entry per line 75 self.native_crash = collections.OrderedDict() 77 def reset_events_time(self, delta): argument 79 for entry in self.events.iteritems(): 81 self.events = new_events 82 if len(self.native_crash) > 0: [all …]
|
/system/extras/ext4_utils/ |
D | test_mkuserimg_mke2fs.py | 22 def setUp(self): argument 23 self.optional_arguments = { 31 def test_parse_arguments_smoke(self): argument 33 for key, value in self.optional_arguments.items(): 39 self.assertEqual("source_directory", args.src_dir) 40 self.assertEqual("output_file", args.output_file) 41 self.assertEqual("ext4", args.ext_variant) 42 self.assertEqual("data", args.mount_point) 43 self.assertEqual("8192", args.fs_size) 45 self.assertFalse(args.android_sparse) [all …]
|