/aosp12/system/security/keystore2/src/database/ |
H A D | versioning.rs | 130 .unwrap(); in upgrade_database_test() 142 .unwrap(); in upgrade_database_test() 169 .unwrap() in upgrade_database_test() 181 .unwrap() in upgrade_database_test() 195 tx.commit().unwrap(); in create_or_get_version_new_database() 232 tx.commit().unwrap(); in create_or_get_version_new_database() 247 tx.commit().unwrap(); in create_or_get_version_new_database() 254 tx.commit().unwrap(); in create_or_get_version_new_database() 293 .unwrap(); in create_or_get_version_legacy_database() 298 tx.commit().unwrap(); in create_or_get_version_legacy_database() [all …]
|
/aosp12/packages/modules/Virtualization/zipfuse/src/ |
H A D | inode.rs | 143 let data = self.get(parent).unwrap(); in find() 244 it.unwrap() in setup() 251 let inode = inode.unwrap(); in check_dir() 254 let inode_data = inode_data.unwrap(); in check_dir() 264 let inode = inode.unwrap(); in check_file() 267 let inode_data = inode_data.unwrap(); in check_file() 297 assert_eq!(0, it.get(inode).unwrap().get_directory().unwrap().len()); in one_dir() 347 zip.start_file("foo", opt).unwrap(); in complex_hierarchy() 348 zip.start_file("bar", opt).unwrap(); in complex_hierarchy() 378 zip.write_all(&[0; 10]).unwrap(); in file_size() [all …]
|
H A D | main.rs | 320 let open_dirs = self.open_dirs.lock().unwrap(); in readdir() 461 let metadata = metadata.unwrap(); in check_file() 477 let metadata = metadata.unwrap(); in check_dir() 483 let iter = iter.unwrap(); in check_dir() 487 let entry = de.unwrap(); in check_dir() 519 zip.write_all(b"0123456789").unwrap(); in single_file() 570 zip.start_file("x/y1", opt).unwrap(); in complex_hierarchy() 571 zip.start_file("x/y2", opt).unwrap(); in complex_hierarchy() 574 zip.start_file("foo", opt).unwrap(); in complex_hierarchy() 575 zip.start_file("bar", opt).unwrap(); in complex_hierarchy() [all …]
|
/aosp12/system/bt/gd/rust/packets/ |
H A 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 …]
|
/aosp12/frameworks/native/libs/binder/rust/src/ |
H A D | parcel.rs | 235 let len = len.try_into().unwrap(); in resize_out_vec() 257 let len = len.try_into().unwrap(); in resize_nullable_out_vec() 375 parcel.write(&1i32).unwrap(); in test_read_write() 381 let i: i32 = parcel.read().unwrap(); in test_read_write() 446 parcel.read::<f32>().unwrap(), in test_read_data() 479 parcel.read::<Option<String>>().unwrap().unwrap(), in test_utf8_utf16_conversions() 491 parcel.read::<Option<String>>().unwrap().unwrap(), in test_utf8_utf16_conversions() 519 parcel.read::<Vec<String>>().unwrap(), in test_utf8_utf16_conversions() 523 parcel.read::<Vec<String>>().unwrap(), in test_utf8_utf16_conversions() 555 parcel.read().unwrap(), in test_sized_write() [all …]
|
/aosp12/system/security/keystore2/src/ |
H A D | async_task.rs | 72 .unwrap() in get_mut() 85 .unwrap() in get_or_put_with() 218 .unwrap(); in spawn_thread() 354 start_sender.send(()).unwrap(); in test_async_task() 369 sender.send(()).unwrap(); in test_async_task_chain() 372 receiver.recv().unwrap(); in test_async_task_chain() 387 done_receiver.recv().unwrap(); in test_async_task_panic() 419 done_receiver.recv().unwrap(); in test_async_task_idle() 440 done_receiver.recv().unwrap(); in test_async_task_idle() 522 idle_receiver.recv().unwrap(); in test_async_task_idle_panic() [all …]
|
H A 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()
|
/aosp12/system/bt/gd/rust/facade_proto/ |
H A 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 …]
|
/aosp12/system/bt/gd/rust/linux/dbus_projection/src/ |
H A 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());
|
/aosp12/system/bt/gd/rust/common/src/ |
H A D | time.rs | 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() 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() 90 let runtime = tokio::runtime::Runtime::new().unwrap(); in alarm_simple_case() 105 let runtime = tokio::runtime::Runtime::new().unwrap(); in alarm_clear_ready_after_expired() 124 let runtime = tokio::runtime::Runtime::new().unwrap(); in interval_schedule_and_then_drop() [all …]
|
/aosp12/system/bt/gd/rust/hal/src/ |
H A 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()
|
H A 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()
|
/aosp12/frameworks/base/core/java/com/android/internal/inputmethod/ |
H A D | ResultCallbacks.java | 73 final Completable.Int value = unwrap(atomicRef); in of() 83 final Completable.Int value = unwrap(atomicRef); in of() 110 final Completable.CharSequence value = unwrap(atomicRef); 137 final Completable.ExtractedText value = unwrap(atomicRef); 164 final Completable.SurroundingText value = unwrap(atomicRef); 191 final Completable.InputBindResult value = unwrap(atomicRef); 201 final Completable.InputBindResult value = unwrap(atomicRef); 226 final Completable.Boolean value = unwrap(atomicRef); 236 final Completable.Boolean value = unwrap(atomicRef); 372 final Completable.Void value = unwrap(atomicRef); [all …]
|
/aosp12/system/bt/gd/rust/facade/src/ |
H A D | main.rs | 26 let rt = Arc::new(Runtime::new().unwrap()); in 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() 102 let mut sigint_tx = SIGINT_TX.lock().unwrap(); in handle_sigint() [all …]
|
/aosp12/system/bt/gd/rust/linux/dbus_projection/dbus_macros/src/ |
H A 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() 41 p.path.get_ident().unwrap() in generate_dbus_exporter() 52 let ast: ItemImpl = syn::parse(item.clone()).unwrap(); in generate_dbus_exporter() 68 let attr_args = attr.parse_meta().unwrap(); in generate_dbus_exporter() 129 let #ident = #ident.unwrap(); in generate_dbus_exporter() 255 t.path.get_ident().unwrap().to_string() in dbus_propmap() 271 let mut iter = iter.next().unwrap().as_iter().unwrap(); in dbus_propmap() 276 let k = i1.unwrap().as_str().unwrap().to_string(); in dbus_propmap() 387 p.path.get_ident().unwrap() in dbus_proxy_obj() [all …]
|
/aosp12/frameworks/native/libs/binder/rust/src/parcel/ |
H A D | parcelable.rs | 729 let custom2 = Custom::deserialize(&parcel).unwrap(); in test_custom_parcelable() 755 assert_eq!(parcel.read::<u32>().unwrap(), 4); in test_slice_parcelables() 756 assert_eq!(parcel.read::<u32>().unwrap(), 1); in test_slice_parcelables() 757 assert_eq!(parcel.read::<u32>().unwrap(), 0); in test_slice_parcelables() 758 assert_eq!(parcel.read::<u32>().unwrap(), 0); in test_slice_parcelables() 759 assert_eq!(parcel.read::<u32>().unwrap(), 1); in test_slice_parcelables() 785 let vec = Vec::<u8>::deserialize(&parcel).unwrap(); in test_slice_parcelables() 806 let vec = Vec::<u8>::deserialize(&parcel).unwrap(); in test_slice_parcelables() 822 assert_eq!(parcel.read::<u32>().unwrap(), 42); // 42 in test_slice_parcelables() 828 let vec = Vec::<u16>::deserialize(&parcel).unwrap(); in test_slice_parcelables() [all …]
|
/aosp12/system/bt/gd/rust/hci/src/ |
H A 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()
|
/aosp12/system/bt/gd/rust/linux/service/ |
H A 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()
|
/aosp12/system/bt/gd/rust/link/src/acl/classic/ |
H A 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() 261 c.hci_evt_tx.send(event).await.unwrap(); in dispatch_to() 279 evt_tx.send(ConnectionEvent::Disconnected(evt.get_reason())).await.unwrap(); in run_connection() [all …]
|
/aosp12/system/bt/gd/rust/linux/stack/btif_macros/src/ |
H A 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()
|
/aosp12/system/bt/gd/rust/linux/mgmt/src/bin/btmanagerd/ |
H A 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() 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() 451 assert_eq!(*state_machine.state.try_lock().unwrap(), State::Off); in initial_state_is_off() 459 assert_eq!(*state_machine.state.try_lock().unwrap(), State::Off); in off_turnoff_should_noop() 489 assert_eq!(*state_machine.state.try_lock().unwrap(), State::On); in turningon_bluetooth_started() 554 assert_eq!(*state_machine.state.try_lock().unwrap(), State::Off); in turningoff_bluetooth_down_should_off() [all …]
|
/aosp12/system/extras/simpleperf/rust/ |
H A 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()
|
/aosp12/system/security/keystore2/selinux/src/ |
H A 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 …]
|
/aosp12/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/crypto/ |
H A D | TlsSessionHandshakeTest.java | 88 when(mMockSslEngine.unwrap( in testprocessHandshakeData_success() 103 .unwrap( in testprocessHandshakeData_success() 112 when(mMockSslEngine.unwrap( in testprocessHandshakeData_wrapFailure() 133 .unwrap(eq(PACKET_BUFFER_POSITION_LIMIT), eq(APPLICATION_BUFFER_AVP_CLEARED)); in testprocessHandshakeData_wrapFailure() 140 when(mMockSslEngine.unwrap( in testprocessHandshakeData_unwrapFailure() 150 when(mMockSslEngine.unwrap( in testprocessHandshakeData_underflow() 160 when(mMockSslEngine.unwrap( in testprocessHandshakeData_overflow() 189 when(mMockSslEngine.unwrap( in testprocessHandshakeData_unwrapClosed() 199 when(mMockSslEngine.unwrap( in testprocessHandshakeData_wrapFinished() 215 .unwrap( in testprocessHandshakeData_wrapFinished() [all …]
|
/aosp12/system/keymaster/tests/ |
H A D | android_keymaster_test_utils.cpp | 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() 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() 884 return unwrap(dev)->get_key_characteristics(unwrap(dev), key_blob, client_id, app_data, in get_key_characteristics() 897 return unwrap(dev)->import_key(unwrap(dev), params, key_format, key_data, key_blob, in import_key() 907 return unwrap(dev)->export_key(unwrap(dev), export_format, key_to_export, client_id, in export_key() 917 return unwrap(dev)->begin(unwrap(dev), purpose, key, in_params, out_params, in begin() [all …]
|