/system/security/keystore2/src/database/ |
D | versioning.rs | 101 let mut conn = Connection::open_in_memory().unwrap(); in upgrade_database_test() 102 conn.execute("ATTACH DATABASE 'file::memory:' as persistent;", NO_PARAMS).unwrap(); in upgrade_database_test() 130 .unwrap(); in upgrade_database_test() 134 conn.execute("DROP TABLE IF EXISTS persistent.version;", NO_PARAMS).unwrap(); in upgrade_database_test() 135 conn.execute("DROP TABLE IF EXISTS persistent.test;", NO_PARAMS).unwrap(); in upgrade_database_test() 142 .unwrap(); in upgrade_database_test() 146 conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in upgrade_database_test() 147 create_or_get_version(&tx, from).unwrap(); in upgrade_database_test() 148 tx.commit().unwrap(); in upgrade_database_test() 152 conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in upgrade_database_test() [all …]
|
/system/bt/gd/rust/packets/ |
D | build.rs | 21 let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); in main() 26 Err(_) => PathBuf::from(env::current_dir().unwrap()).join("../..").canonicalize().unwrap(), in main() 34 PathBuf::from(env::var("CARGO_HOME").unwrap()).join("bin").join("bluetooth_packetgen"); in main() 37 let output = Command::new(packetgen.as_os_str().to_str().unwrap()) in main() 38 .arg("--source_root=".to_owned() + gd_root.as_os_str().to_str().unwrap()) in main() 39 .arg("--out=".to_owned() + out_dir.as_os_str().to_str().unwrap()) in main() 42 .arg(input_files[i].as_os_str().to_str().unwrap()) in main() 44 .unwrap(); in main() 55 outputted[i].as_os_str().to_str().unwrap(), in main() 56 out_dir.join(outputted[i].file_name().unwrap()).as_os_str().to_str().unwrap(), in main() [all …]
|
/system/bt/gd/rust/facade_proto/ |
D | build.rs | 26 paths.iter().map(|p| p.as_ref().as_os_str().to_str().unwrap()).collect() in paths_to_strs() 32 let mut f = fs::File::create(out_dir.join("mod.rs")).unwrap(); in gen_mod_rs() 34 f.write_all(b"// Generated by build.rs\n\n").unwrap(); in gen_mod_rs() 37 let stem = inputs[i].as_ref().file_stem().unwrap(); in gen_mod_rs() 38 f.write_all(format!("pub mod {}; \n", stem.to_str().unwrap()).as_bytes()).unwrap(); in gen_mod_rs() 40 f.write_all(format!("pub mod {}_grpc;\n", stem.to_str().unwrap()).as_bytes()).unwrap(); in gen_mod_rs() 46 let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); in main() 51 match fs::create_dir(proto_out_dir.as_os_str().to_str().unwrap()) { in main() 56 match fs::create_dir(grpc_out_dir.as_os_str().to_str().unwrap()) { in main() 65 Err(_) => PathBuf::from(env::current_dir().unwrap()).join("../..").canonicalize().unwrap(), in main() [all …]
|
/system/bt/gd/rust/linux/dbus_projection/src/ |
D | lib.rs | 28 if !self.callbacks.lock().unwrap().contains_key(&address) { in add() 29 self.callbacks.lock().unwrap().insert(address.clone(), vec![]); in add() 32 (*self.callbacks.lock().unwrap().get_mut(&address).unwrap()).push(callback); in add() 39 conn.add_match_no_cb(&mr.match_str()).await.unwrap(); in setup_watch() 52 if old.unwrap().eq("") || !new.unwrap().eq("") { in setup_watch() 59 let addr = BusName::new(addr.unwrap()).unwrap().into_static(); in setup_watch() 60 if !callbacks_map.lock().unwrap().contains_key(&addr) { in setup_watch() 64 for callback in &callbacks_map.lock().unwrap()[&addr] { in setup_watch() 68 callbacks_map.lock().unwrap().remove(&addr); in setup_watch() 98 return Ok(data.to_i32().unwrap());
|
/system/bt/gd/rust/common/src/ |
D | time.rs | 16 let timer = TimerFd::new(get_clock(), TimerFlags::empty()).unwrap(); in new() 17 Self { fd: AsyncFd::new(timer).unwrap() } in new() 25 .unwrap(); in reset() 35 let mut read_ready = self.fd.readable().await.unwrap(); in expired() 39 self.fd.get_ref().wait().unwrap(); in expired() 51 let timer = TimerFd::new(get_clock(), TimerFlags::empty()).unwrap(); in interval() 52 timer.set(Expiration::Interval(TimeSpec::from(period)), TimerSetTimeFlags::empty()).unwrap(); in interval() 54 Interval { fd: AsyncFd::new(timer).unwrap() } in interval() 65 let mut read_ready = self.fd.readable().await.unwrap(); in tick() 69 self.fd.get_ref().wait().unwrap(); in tick() [all …]
|
/system/bt/gd/rust/hal/src/ |
D | hidl_hal.rs | 22 *CALLBACKS.lock().unwrap() = Some(Callbacks { in provide_hidl_hal() 29 init_rx.recv().await.unwrap(); in provide_hidl_hal() 71 let callbacks = CALLBACKS.lock().unwrap(); in on_init_complete() 72 callbacks.as_ref().unwrap().init_tx.send(()).unwrap(); in on_init_complete() 77 let callbacks = CALLBACKS.lock().unwrap(); in on_event() 79 Ok(p) => callbacks.as_ref().unwrap().evt_tx.send(p).unwrap(), in on_event() 85 let callbacks = CALLBACKS.lock().unwrap(); in on_acl() 87 Ok(p) => callbacks.as_ref().unwrap().acl_tx.send(p).unwrap(), in on_acl() 95 let callbacks = CALLBACKS.lock().unwrap(); in on_iso() 97 Ok(p) => callbacks.as_ref().unwrap().iso_tx.send(p).unwrap(), in on_iso()
|
D | facade.rs | 53 cmd_tx.send(CommandPacket::parse(&data.take_payload()).unwrap()).await.unwrap(); in send_command() 54 sink.success(Empty::default()).await.unwrap(); in send_command() 61 acl_tx.send(AclPacket::parse(&data.take_payload()).unwrap()).await.unwrap(); in send_acl() 62 sink.success(Empty::default()).await.unwrap(); in send_acl() 73 iso_tx.send(IsoPacket::parse(&data.take_payload()).unwrap()).await.unwrap(); in send_iso() 74 sink.success(Empty::default()).await.unwrap(); in send_iso()
|
/system/security/keystore2/src/ |
D | async_task.rs | 72 .unwrap() in get_mut() 85 .unwrap() in get_or_put_with() 163 let mut state = state.lock().unwrap(); in add_idle() 172 let mut state = state.lock().unwrap(); in queue() 205 let mut shelf = state.lock().unwrap().shelf.take().unwrap_or_default(); in spawn_thread() 208 let state = state.lock().unwrap(); in spawn_thread() 218 .unwrap(); in spawn_thread() 288 let s3 = shelf.get_downcast_ref::<String>().unwrap(); in test_shelf() 293 let e2 = shelf.get_downcast_mut::<Elf>().unwrap(); in test_shelf() 299 let e3 = shelf.remove_downcast_ref::<Elf>().unwrap(); in test_shelf() [all …]
|
D | try_insert.rs | 85 assert_eq!(*x.get_or_try_to_insert_with(succeeds).unwrap(), 99); in test() 88 assert_eq!(*x.get_or_try_to_insert_with(fails).unwrap(), 42); in test() 90 assert_eq!(*x.get_or_try_to_insert_with(succeeds).unwrap(), 42); in test() 92 *x.get_or_try_to_insert_with(fails).unwrap() = 2; in test() 94 *x.get_or_try_to_insert_with(succeeds).unwrap() = 3; in test() 97 *x.get_or_try_to_insert_with(succeeds).unwrap() = 5; in test()
|
/system/bt/gd/rust/linux/service/ |
D | build.rs | 4 let target_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap(); in main() 10 println!("cargo:rustc-link-search=native={}", target_dir.into_string().unwrap()); in main() 22 Config::new().probe("libchrome").unwrap(); in main() 23 Config::new().probe("libmodp_b64").unwrap(); in main() 24 Config::new().probe("tinyxml2").unwrap(); in main()
|
/system/bt/gd/rust/facade/src/ |
D | main.rs | 26 let rt = Arc::new(Runtime::new().unwrap()); in main() 52 let root_server_port = value_t!(matches, "root-server-port", u16).unwrap(); in async_main() 53 let grpc_port = value_t!(matches, "grpc-port", u16).unwrap(); in async_main() 54 let signal_port = value_t!(matches, "signal-port", u16).unwrap(); in async_main() 66 .unwrap(); in async_main() 71 block_on(server.shutdown()).unwrap(); in async_main() 76 let mut stream = TcpStream::connect(address).await.unwrap(); in indicate_started() 77 stream.shutdown().await.unwrap(); in indicate_started() 83 *SIGINT_TX.lock().unwrap() = Some(tx); in install_sigint() 91 signal::sigaction(signal::SIGINT, &sig_action).unwrap(); in install_sigint() [all …]
|
D | lib.rs | 45 self.rt.block_on(self.manager.start(req)).unwrap(); in start_stack() 55 self.rt.block_on(self.manager.stop()).unwrap(); in stop_stack() 99 let mut server = builder.build().unwrap(); in start() 106 self.server.shutdown().await.unwrap(); in stop() 132 done.send(()).unwrap(); in create() 139 done.send(()).unwrap(); in create()
|
/system/bt/gd/rust/linux/dbus_projection/dbus_macros/src/ |
D | lib.rs | 18 let mut file = File::create(&path).unwrap(); in debug_output_to_file() 19 file.write_all(gen.to_string().as_bytes()).unwrap(); in debug_output_to_file() 38 let args = Punctuated::<Expr, Comma>::parse_separated_nonempty.parse(attr.clone()).unwrap(); in generate_dbus_exporter() 41 p.path.get_ident().unwrap() in generate_dbus_exporter() 52 let ast: ItemImpl = syn::parse(item.clone()).unwrap(); in generate_dbus_exporter() 53 let api_iface_ident = ast.trait_.unwrap().1.to_token_stream(); in generate_dbus_exporter() 64 if !attr.path.get_ident().unwrap().to_string().eq("dbus_method") { in generate_dbus_exporter() 68 let attr_args = attr.parse_meta().unwrap(); in generate_dbus_exporter() 119 ctx.message().sender().unwrap().into_static(), in generate_dbus_exporter() 129 let #ident = #ident.unwrap(); in generate_dbus_exporter() [all …]
|
/system/extras/simpleperf/rust/ |
D | lib.rs | 25 CString::new(path.to_str().unwrap()).unwrap() in path_to_cstr() 46 RecordScope::USERSPACE => CString::new("cs-etm:u").unwrap(), in record() 47 RecordScope::KERNEL => CString::new("cs-etm:k").unwrap(), in record() 48 RecordScope::BOTH => CString::new("cs-etm").unwrap(), in record()
|
/system/bt/gd/rust/hci/src/ |
D | facade.rs | 69 self.events.register(EventCode::from_u32(code).unwrap(), self.evt_tx.clone()).await; in register_event() 75 .register_le(SubeventCode::from_u32(code).unwrap(), self.le_evt_tx.clone()) in register_le_event() 88 let packet = CommandPacket::parse(&data.take_payload()).unwrap(); in send_command() 92 sink.success(Empty::default()).await.unwrap(); in send_command() 93 let response = commands.send(packet).await.unwrap(); in send_command() 94 evt_tx.send(response).await.unwrap(); in send_command() 102 sink.success(Empty::default()).await.unwrap(); in request_event() 115 sink.success(Empty::default()).await.unwrap(); in request_le_subevent() 122 acl_tx.send(AclPacket::parse(&packet.take_payload()).unwrap()).await.unwrap(); in send_acl() 123 sink.success(Empty::default()).await.unwrap(); in send_acl()
|
/system/bt/gd/rust/linux/adapter/ |
D | build.rs | 19 Config::new().probe("libchrome").unwrap(); in main() 20 Config::new().probe("libmodp_b64").unwrap(); in main() 21 Config::new().probe("tinyxml2").unwrap(); in main()
|
/system/bt/gd/rust/linux/stack/btif_macros/src/ |
D | lib.rs | 18 let mut file = File::create(&path).unwrap(); in debug_output_to_file() 19 file.write_all(gen.to_string().as_bytes()).unwrap(); in debug_output_to_file() 38 let args = Punctuated::<Expr, Comma>::parse_separated_nonempty.parse(attr.clone()).unwrap(); in btif_callbacks_generator() 41 p.path.get_ident().unwrap() in btif_callbacks_generator() 47 p.path.get_ident().unwrap() in btif_callbacks_generator() 52 let ast: ItemTrait = syn::parse(item.clone()).unwrap(); in btif_callbacks_generator() 63 if !attr.path.get_ident().unwrap().to_string().eq("stack_message") { in btif_callbacks_generator() 67 let attr_args = attr.parse_meta().unwrap(); in btif_callbacks_generator()
|
/system/bt/gd/rust/link/src/acl/classic/ |
D | mod.rs | 78 self.requests.send(ConnectionRequest::Disconnect { reason, fut: tx }).await.unwrap(); in disconnect() 79 rx.await.unwrap() in disconnect() 103 self.req_tx.send(Request::Connect { addr }).await.unwrap(); in connect() 109 self.req_tx.send(Request::CancelConnect { addr, fut: tx }).await.unwrap(); in cancel_connect() 110 rx.await.unwrap(); in cancel_connect() 175 fut.send(()).unwrap(); in provide_acl_manager() 200 rx: core_conn.rx.take().unwrap(), in provide_acl_manager() 201 tx: core_conn.tx.take().unwrap(), in provide_acl_manager() 213 … conn_evt_tx.send(Event::ConnectSuccess(connection)).await.unwrap(); in provide_acl_manager() 215 … _ => conn_evt_tx.send(Event::ConnectFail { addr, reason: status }).await.unwrap(), in provide_acl_manager() [all …]
|
/system/bt/gd/rust/linux/stack/src/ |
D | lib.rs | 52 BDAddr { val: raw_addr.clone().try_into().unwrap() } in from_byte_vec() 82 match m.unwrap() { in dispatch() 84 bluetooth.lock().unwrap().adapter_state_changed(state); in dispatch() 88 bluetooth.lock().unwrap().adapter_properties_changed( in dispatch() 96 bluetooth.lock().unwrap().callback_disconnected(id); in dispatch()
|
D | bluetooth.rs | 76 callback.1.on_bluetooth_address_changed(self.local_address.unwrap().to_string()); in update_local_address() 125 .on_bluetooth_state_changed(self.state.to_u32().unwrap(), state.to_u32().unwrap()); in adapter_state_changed() 149 match prop_type.unwrap() { in adapter_properties_changed() 179 self.intf.lock().unwrap().enable() == 0 in enable() 183 self.intf.lock().unwrap().disable() == 0 in disable()
|
/system/bt/gd/rust/linux/mgmt/src/bin/btmanagerd/ |
D | state_machine.rs | 90 let index = observers.iter().position(|x| *x == object_path).unwrap(); in unregister_state_change_observer() 153 let mut fd_ready = r.unwrap(); in mainloop() 167 Some(s) => s.parse::<i32>().unwrap(), in mainloop() 171 Some(s) => s.parse::<i32>().unwrap(), in mainloop() 305 let mut state = self.state.try_lock().unwrap(); // TODO hsz: fix me in action_start_bluetooth() 325 let mut state = self.state.try_lock().unwrap(); // TODO hsz: fix me in action_stop_bluetooth() 339 let mut state = self.state.try_lock().unwrap(); // TODO hsz: fix me in action_on_bluetooth_started() 357 let mut state = self.state.try_lock().unwrap(); // TODO hsz: fix me in action_on_bluetooth_stopped() 380 let mut state = self.state.try_lock().unwrap(); // TODO hsz: fix me in action_on_command_timeout() 451 assert_eq!(*state_machine.state.try_lock().unwrap(), State::Off); in initial_state_is_off() [all …]
|
D | main.rs | 46 cr.data_mut::<state_machine::StateMachineProxy>(ctx.path()).unwrap().clone(); in main() 61 cr.data_mut::<state_machine::StateMachineProxy>(ctx.path()).unwrap().clone(); in main() 75 cr.data_mut::<state_machine::StateMachineProxy>(ctx.path()).unwrap().clone(); in main() 93 cr.data_mut::<state_machine::StateMachineProxy>(ctx.path()).unwrap().clone(); in main() 112 cr.data_mut::<state_machine::StateMachineProxy>(ctx.path()).unwrap().clone(); in main() 135 cr.handle_message(msg, conn).unwrap(); in main()
|
/system/security/keystore2/selinux/src/ |
D | lib.rs | 174 let _lock = LIB_SELINUX_LOCK.lock().unwrap(); in new() 204 let _lock = LIB_SELINUX_LOCK.lock().unwrap(); in lookup() 233 let _lock = LIB_SELINUX_LOCK.lock().unwrap(); in getcon() 257 let _lock = LIB_SELINUX_LOCK.lock().unwrap(); in getpidcon() 294 let _lock = LIB_SELINUX_LOCK.lock().unwrap(); in check_access() 338 match context.to_str().unwrap() { in check_context() 369 let tctx = Context::new("u:object_r:keystore:s0").unwrap(); in context_from_string() 370 let sctx = Context::new("u:r:system_server:s0").unwrap(); in context_from_string() 418 .unwrap() 465 .unwrap() [all …]
|
/system/extras/profcollectd/libprofcollectd/ |
D | scheduler.rs | 62 trace_provider.lock().unwrap().trace( in schedule_periodic() 86 trace_provider.lock().unwrap().trace(&TRACE_OUTPUT_DIR, tag, &config.sampling_period); in one_shot() 95 .unwrap() in process() 106 self.trace_provider.lock().unwrap().get_name() in get_trace_provider_name()
|
/system/keymaster/tests/ |
D | android_keymaster_test_utils.cpp | 800 static const keymaster1_device_t* unwrap(const keymaster1_device_t* dev) { in unwrap() function in keymaster::test::Sha256OnlyWrapper 807 return unwrap(dev)->get_supported_algorithms(unwrap(dev), algorithms, algorithms_length); in get_supported_algorithms() 814 return unwrap(dev)->get_supported_block_modes(unwrap(dev), algorithm, purpose, modes, in get_supported_block_modes() 822 return unwrap(dev)->get_supported_padding_modes(unwrap(dev), algorithm, purpose, modes, in get_supported_padding_modes() 831 keymaster_error_t error = unwrap(dev)->get_supported_digests( in get_supported_digests() 832 unwrap(dev), algorithm, purpose, digests, digests_length); in get_supported_digests() 852 return unwrap(dev)->get_supported_import_formats(unwrap(dev), algorithm, formats, in get_supported_import_formats() 859 return unwrap(dev)->get_supported_export_formats(unwrap(dev), algorithm, formats, in get_supported_export_formats() 864 return unwrap(dev)->add_rng_entropy(unwrap(dev), data, data_length); in add_rng_entropy() 876 return unwrap(dev)->generate_key(unwrap(dev), params, key_blob, characteristics); in generate_key() [all …]
|