/frameworks/native/libs/binder/trusty/rust/binder_rpc_test/ |
D | main.rs | 52 assert_eq!(expected, count.unwrap()); in expect_sessions() 106 assert_eq!(result.unwrap().unwrap(), in_binder); 113 let in_binder = session.unwrap().as_binder(); 115 assert_eq!(out_binder.unwrap().unwrap(), in_binder); 128 let held = held.unwrap(); 130 let held = held.unwrap(); 136 let session_name = session.unwrap().getName(); 138 let session_name = session_name.unwrap(); 157 assert_eq!(a.unwrap(), b.unwrap()); 163 let session = session.unwrap(); [all …]
|
/frameworks/native/services/inputflinger/rust/ |
D | input_filter.rs | 86 Result::Ok(self.state.lock().unwrap().enabled) in isEnabled() 90 let first_filter = &mut self.state.lock().unwrap().first_filter; in notifyKey() 96 let first_filter = &mut self.state.lock().unwrap().first_filter; in notifyInputDevicesChanged() 103 let mut state = self.state.lock().unwrap(); in notifyConfigurationChanged() 148 match self.callbacks.read().unwrap().sendKeyEvent(event) { in notify_key() 178 let _ = self.0.read().unwrap().onModifierStateChanged( in modifier_state_changed() 201 self.0.read().unwrap().createInputFilterThread(input_thread_callback).unwrap() in create() 225 assert!(!result.unwrap()); in test_not_enabled_with_default_filter() 234 assert_eq!(test_callbacks.last_event().unwrap(), event); in test_notify_key_with_no_filters() 247 assert_eq!(test_filter.last_event().unwrap(), event); in test_notify_key_with_filter() [all …]
|
D | input_filter_thread.rs | 186 self.inner.write().unwrap() in filter_thread() 190 let looper = self.looper.read().unwrap(); in sleep_until() 197 let looper = self.looper.read().unwrap(); in wake() 204 self.looper.write().unwrap() in looper() 212 self.loop_once(clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap().num_nanoseconds()); in loopOnce() 231 !&self.0.read().unwrap().callbacks.is_empty() in has_callbacks() 235 let callbacks = &mut self.0.write().unwrap().callbacks; in register_thread_callback() 251 let callbacks = &mut self.0.write().unwrap().callbacks; in unregister_thread_callback() 267 let callbacks = &self.0.read().unwrap().callbacks; in notify_timeout_expired() 309 let now = clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap().num_milliseconds(); in test_notify_timeout_called_after_timeout_expired() [all …]
|
D | bounce_keys_filter.rs | 163 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_external_keyboard() 167 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_external_keyboard() 180 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_external_keyboard() 194 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_internal_keyboard() 198 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_internal_keyboard() 202 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_internal_keyboard() 217 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_external_stylus() 222 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_external_stylus() 227 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_external_stylus() 244 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_multiple_external_keyboards() [all …]
|
D | slow_keys_filter.rs | 78 self.0.read().unwrap() in read_inner() 82 self.0.write().unwrap() in write_inner() 256 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_internal_keyboard_not_blocked() 274 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_external_stylus_not_blocked() 288 let down_time = clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap().num_nanoseconds(); in test_notify_key_for_external_keyboard_when_key_pressed_for_threshold_time() 299 next.last_event().unwrap(), in test_notify_key_for_external_keyboard_when_key_pressed_for_threshold_time() 309 let up_time = clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap().num_nanoseconds(); in test_notify_key_for_external_keyboard_when_key_pressed_for_threshold_time() 318 next.last_event().unwrap(), in test_notify_key_for_external_keyboard_when_key_pressed_for_threshold_time() 339 let mut now = clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap().num_nanoseconds(); in test_notify_key_for_external_keyboard_when_key_not_pressed_for_threshold_time() 349 now = clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap().num_nanoseconds(); in test_notify_key_for_external_keyboard_when_key_not_pressed_for_threshold_time() [all …]
|
/frameworks/native/libs/binder/rust/src/ |
D | parcel.rs | 528 let len = len.try_into().unwrap(); in resize_out_vec() 550 let len = len.try_into().unwrap(); in resize_nullable_out_vec() 728 parcel.write(&1i32).unwrap(); in test_read_write() 733 parcel.set_data_position(start).unwrap(); in test_read_write() 736 let i: i32 = parcel.read().unwrap(); in test_read_write() 746 parcel.write(&b"Hello, Binder!\0"[..]).unwrap(); in test_read_data() 753 assert_eq!(parcel.read::<i32>().unwrap(), 15); in test_read_data() 756 assert!(parcel.read::<bool>().unwrap()); in test_read_data() 764 assert_eq!(parcel.read::<i8>().unwrap(), 72i8); in test_read_data() 772 assert_eq!(parcel.read::<u16>().unwrap(), 25928); in test_read_data() [all …]
|
D | service.rs | 33 let instance = CString::new(identifier).unwrap(); in add_service() 54 let instance = CString::new(identifier).unwrap(); in register_lazy_service() 96 let mut count = GUARD_COUNT.lock().unwrap(); in new() 110 let mut count = GUARD_COUNT.lock().unwrap(); in drop()
|
/frameworks/native/libs/bufferstreams/rust/src/subscribers/ |
D | shared.rs | 46 let inner = self.0.lock().unwrap(); in map_inner() 52 let mut inner = self.0.lock().unwrap(); in map_inner_mut() 65 let inner = self.0.lock().unwrap(); in get_subscriber_stream_config() 70 let mut inner = self.0.lock().unwrap(); in on_subscribe() 81 let mut inner = self.0.lock().unwrap(); in on_next() 86 let mut inner = self.0.lock().unwrap(); in on_error() 91 let mut inner = self.0.lock().unwrap(); in on_complete()
|
/frameworks/native/libs/bufferstreams/rust/src/subscriptions/ |
D | shared_buffer_subscription.rs | 44 let mut data = self.0.lock().unwrap(); in take_request() 57 self.0.lock().unwrap().requests in pending_requests() 62 self.0.lock().unwrap().is_cancelled in is_cancelled() 74 let mut data = self.0.lock().unwrap(); in request() 81 let mut data = self.0.lock().unwrap(); in cancel()
|
/frameworks/native/libs/binder/rust/src/parcel/ |
D | parcelable.rs | 1218 parcel.read::<Option<Vec<String>>>()?.unwrap(), in test_custom_parcelable() 1244 let custom2 = Custom::deserialize(parcel.borrowed_ref()).unwrap(); in test_custom_parcelable() 1268 assert_eq!(parcel.read::<u32>().unwrap(), 4); in test_slice_parcelables() 1269 assert_eq!(parcel.read::<u32>().unwrap(), 1); in test_slice_parcelables() 1270 assert_eq!(parcel.read::<u32>().unwrap(), 0); in test_slice_parcelables() 1271 assert_eq!(parcel.read::<u32>().unwrap(), 0); in test_slice_parcelables() 1272 assert_eq!(parcel.read::<u32>().unwrap(), 1); in test_slice_parcelables() 1279 let vec = Vec::<bool>::deserialize(parcel.borrowed_ref()).unwrap(); in test_slice_parcelables() 1296 assert_eq!(parcel.read::<u32>().unwrap(), 4); // 4 items in test_slice_parcelables() 1297 assert_eq!(parcel.read::<u32>().unwrap(), 0x752aff65); // bytes in test_slice_parcelables() [all …]
|
D | parcelable_holder.rs | 85 *self.data.get_mut().unwrap() = ParcelableHolderData::Empty; in reset() 98 *self.data.get_mut().unwrap() = in set_parcelable() 122 let mut data = self.data.lock().unwrap(); in get_parcelable() 167 data: Mutex::new(self.data.lock().unwrap().clone()), in clone() 205 let mut data = self.data.lock().unwrap(); in write_to_parcel() 250 *self.data.get_mut().unwrap() = ParcelableHolderData::Empty; in read_from_parcel() 261 *self.data.get_mut().unwrap() = ParcelableHolderData::Parcel(new_parcel); in read_from_parcel()
|
/frameworks/native/cmds/evemu-record/ |
D | main.rs | 59 io::stdin().lock().lines().next().unwrap().unwrap().parse::<u32>() in get_choice() 62 while choice.is_err() || choice.clone().unwrap() > max { in get_choice() 66 choice.unwrap() in get_choice() 77 let file_name = path.file_name().unwrap().to_str().unwrap(); in pick_input_device() 81 let number = file_name.strip_prefix("event").unwrap().parse::<u32>(); in pick_input_device() 85 let number = number.unwrap(); in pick_input_device() 203 let device_path = args.device.unwrap_or_else(|| pick_input_device().unwrap()); in main()
|
/frameworks/native/libs/bufferstreams/rust/src/buffers/ |
D | buffer_pool.rs | 48 let mut buffer_pool = locked_buffer_pool.lock().unwrap(); in on_return() 88 let mut inner = self.0.lock().unwrap(); in next_buffer() 101 let inner = self.0.lock().unwrap(); in size() 121 let mut buffer_pool = BufferPool::new(1, STREAM_CONFIG).unwrap(); in buffer_pool_next_buffer() 130 let mut buffer_pool = BufferPool::new(1, STREAM_CONFIG).unwrap(); in drop_buffer_returns_to_pool()
|
/frameworks/compile/libbcc/bcinfo/BitReader_3_0/ |
D | BitReader.cpp | 34 *OutModule = wrap(ParseBitcodeFile(unwrap(MemBuf), *unwrap(ContextRef), in LLVMParseBitcodeInContext() 54 *OutM = wrap(getLazyBitcodeModule(unwrap(MemBuf), *unwrap(ContextRef), in LLVMGetBitcodeModuleInContext()
|
/frameworks/compile/libbcc/bcinfo/BitReader_2_7/ |
D | BitReader.cpp | 34 *OutModule = wrap(ParseBitcodeFile(unwrap(MemBuf), *unwrap(ContextRef), in LLVMParseBitcodeInContext() 54 *OutM = wrap(getLazyBitcodeModule(unwrap(MemBuf), *unwrap(ContextRef), in LLVMGetBitcodeModuleInContext()
|
/frameworks/native/libs/binder/trusty/rust/binder_rpc_test/service/ |
D | main.rs | 46 *SESSION_COUNT.lock().unwrap() += 1; in new() 51 *SESSION_COUNT.lock().unwrap() in get_instance_count() 57 *SESSION_COUNT.lock().unwrap() -= 1; in drop() 100 *HOLD_BINDER.lock().unwrap() = binder.cloned(); in holdBinder() 104 Ok((*HOLD_BINDER.lock().unwrap()).clone()) in getHeldBinder() 118 let mut locked = SAME_BINDER.lock().unwrap(); in alwaysGiveMeTheSameBinder()
|
/frameworks/native/libs/binder/rust/tests/ |
D | integration.rs | 122 let mut dump_args = self.dump_args.lock().unwrap(); in dump() 123 dump_args.extend(args.iter().map(|s| s.to_str().unwrap().to_owned())); in dump() 134 let args = self.dump_args.lock().unwrap().clone(); in get_dump_args() 571 assert_eq!(test_client.test().unwrap(), "trivial_client_test"); in trivial_client() 581 assert_eq!(test_client.test().await.unwrap(), "trivial_client_test"); in trivial_client_async() 590 assert_eq!(test_client.test().unwrap(), "wait_for_trivial_client_test"); in wait_for_trivial_client() 600 assert_eq!(test_client.test().await.unwrap(), "wait_for_trivial_client_test"); in wait_for_trivial_client_async() 623 assert_eq!(test_client.get_selinux_context().unwrap(), get_expected_selinux_context()); in get_selinux_context() 634 test_client.get_selinux_context().await.unwrap(), in get_selinux_context_async() 647 test_client.get_selinux_context().await.unwrap(), in get_selinux_context_sync_to_async() [all …]
|
D | ndk_rust_interop.rs | 35 let service_name = unsafe { CStr::from_ptr(service_name) }.to_str().unwrap(); in rust_call_ndk() 93 let service_name = unsafe { CStr::from_ptr(service_name) }.to_str().unwrap(); in rust_start_service()
|
/frameworks/native/libs/bufferstreams/rust/src/publishers/ |
D | buffer_pool_publisher.rs | 66 self.subscriber.as_mut().unwrap().on_subscribe(self.subscription.clone_for_subscriber()); in subscribe() 97 let mut buffer_pool_publisher = BufferPoolPublisher::new(STREAM_CONFIG, 1).unwrap(); in test_send_next_frame() 105 assert!(matches!(events.last().unwrap(), TestingSubscriberEvent::Next(_))); in test_send_next_frame()
|
/frameworks/native/libs/bufferstreams/rust/src/ |
D | lib.rs | 216 assert!(!matches!(events.last().unwrap(), TestingSubscriberEvent::Next(_))); in test_test_implementations_next() 223 assert!(matches!(events.last().unwrap(), TestingSubscriberEvent::Next(_))); in test_test_implementations_next() 238 assert!(matches!(events.last().unwrap(), TestingSubscriberEvent::Complete)); in test_test_implementations_complete() 252 assert!(matches!(events.last().unwrap(), TestingSubscriberEvent::Error(_))); in test_test_implementations_error()
|
/frameworks/native/libs/input/rust/ |
D | lib.rs | 135 Source::from_bits(source).unwrap(), in process_movement() 138 motion_flags.unwrap(), in process_movement() 171 classes: classes.unwrap(), in notify_keyboard_changed() 197 classifier.process_key(DeviceId(device_id), evdev_code, modifier_state.unwrap()); in process_key()
|
/frameworks/native/libs/binder/trusty/rust/binder_rpc_test/binder_rpc_test_session/ |
D | lib.rs | 37 *G_NUM.lock().unwrap() in get_instance_count() 41 *G_NUM.lock().unwrap() += 1; in increment_instance_count() 45 *G_NUM.lock().unwrap() -= 1; in decrement_instance_count()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
D | RebootEscrowManagerTests.java | 641 verify(mServiceConnection, never()).unwrap(any(), anyLong()); in loadRebootEscrowDataIfAvailable_noDataPrimaryUser_Failure() 698 when(mServiceConnection.unwrap(any(), anyLong())) in loadRebootEscrowDataIfAvailable_noDataSecondaryUser_Success() 703 verify(mServiceConnection).unwrap(any(), anyLong()); in loadRebootEscrowDataIfAvailable_noDataSecondaryUser_Success() 754 when(mServiceConnection.unwrap(any(), anyLong())) in loadRebootEscrowDataIfAvailable_noDataWorkProfile_Success() 759 verify(mServiceConnection).unwrap(any(), anyLong()); in loadRebootEscrowDataIfAvailable_noDataWorkProfile_Success() 804 when(mServiceConnection.unwrap(any(), anyLong())) in loadRebootEscrowDataIfAvailable_ServerBased_Success() 807 verify(mServiceConnection).unwrap(any(), anyLong()); in loadRebootEscrowDataIfAvailable_ServerBased_Success() 849 when(mServiceConnection.unwrap(any(), anyLong())).thenThrow(RemoteException.class); in loadRebootEscrowDataIfAvailable_ServerBasedRemoteException_Failure() 851 verify(mServiceConnection).unwrap(any(), anyLong()); in loadRebootEscrowDataIfAvailable_ServerBasedRemoteException_Failure() 893 when(mServiceConnection.unwrap(any(), anyLong())).thenThrow(IOException.class); in loadRebootEscrowDataIfAvailable_ServerBasedIoError_RetryFailure() [all …]
|
D | RebootEscrowProviderServerBasedImplTests.java | 93 when(mServiceConnection.unwrap(any(), anyLong())).thenAnswer(mFakeEncryption); in getAndClearRebootEscrowKey_loopback_success() 109 when(mServiceConnection.unwrap(any(), anyLong())).thenAnswer( in getAndClearRebootEscrowKey_WrongDecryptionMethod_failure() 133 doThrow(RemoteException.class).when(mServiceConnection).unwrap(any(), anyLong()); in getAndClearRebootEscrowKey_ServiceConnectionException_failure()
|
/frameworks/minikin/rust/ |
D | hyphenator.rs | 213 .map(|x: &[u8]| u32::from_le_bytes(x.try_into().unwrap())) in read_u32() 214 .unwrap() in read_u32() 333 self.data.bytes.get(offset..).unwrap() in read_offset_and_slice() 449 (self.entry & 0x7ff).try_into().unwrap() in value() 576 let len: u32 = word.len().try_into().unwrap(); in hyphenate() 627 while i < word.len().try_into().unwrap() { in get_hyph_type_for_arabic() 666 let word_len: u32 = word.len().try_into().unwrap(); in hyphenate_with_no_pattern()
|