Home
last modified time | relevance | path

Searched refs:callbacks (Results 1 – 25 of 321) sorted by relevance

12345678910>>...13

/packages/modules/Bluetooth/system/bta/groups/
Dgroups_test.cc80 callbacks.reset(new MockGroupsCallbacks()); in SetUp()
83 void TearDown() override { DeviceGroups::CleanUp(callbacks.get()); } in TearDown()
85 std::unique_ptr<MockGroupsCallbacks> callbacks; member in bluetooth::groups::GroupsTest
89 DeviceGroups::Initialize(callbacks.get()); in TEST_F()
91 DeviceGroups::CleanUp(callbacks.get()); in TEST_F()
95 DeviceGroups::Initialize(callbacks.get()); in TEST_F()
97 DeviceGroups::Initialize(callbacks.get()); in TEST_F()
99 DeviceGroups::CleanUp(callbacks.get()); in TEST_F()
100 dev_groups_p->CleanUp(callbacks.get()); in TEST_F()
104 DeviceGroups::Initialize(callbacks.get()); in TEST_F()
[all …]
Dgroups.cc80 DeviceGroupsImpl(DeviceGroupsCallbacks* callbacks) { in DeviceGroupsImpl() argument
81 AddCallbacks(callbacks); in DeviceGroupsImpl()
242 void AddCallbacks(DeviceGroupsCallbacks* callbacks) { in AddCallbacks() argument
243 callbacks_.push_back(std::move(callbacks)); in AddCallbacks()
250 callbacks->OnGroupAdded(dev, group_uuid, group_id); in AddCallbacks()
255 bool Clear(DeviceGroupsCallbacks* callbacks) { in Clear() argument
257 [callbacks](auto c) { return c == callbacks; }); in Clear()
333 void DeviceGroups::Initialize(DeviceGroupsCallbacks* callbacks) { in Initialize() argument
336 instance = new DeviceGroupsImpl(callbacks); in Initialize()
340 instance->AddCallbacks(callbacks); in Initialize()
[all …]
/packages/services/Car/libs/car-evs-helper-lib/src/com/android/car/internal/evs/
DCarEvsGLSurfaceView.java65 private CarEvsGLSurfaceView(Context context, ArrayList<BufferCallback> callbacks, in CarEvsGLSurfaceView() argument
70 mRenderer = new GLES20CarEvsBufferRenderer(callbacks, angleInDegree, positions); in CarEvsGLSurfaceView()
92 ArrayList<BufferCallback> callbacks) { in create() argument
93 return create(context, callbacks, DEFAULT_IN_PLANE_ROTATION_ANGLE, DEFAULT_1X1_POSITION); in create()
105 public static CarEvsGLSurfaceView create(Context context, ArrayList<BufferCallback> callbacks, in create() argument
107 return create(context, callbacks, angleInDegree, DEFAULT_1X1_POSITION); in create()
120 public static CarEvsGLSurfaceView create(Context context, ArrayList<BufferCallback> callbacks, in create() argument
122 return create(context, callbacks, DEFAULT_IN_PLANE_ROTATION_ANGLE, positions); in create()
136 public static CarEvsGLSurfaceView create(Context context, ArrayList<BufferCallback> callbacks, in create() argument
140 Preconditions.checkArgument(callbacks != null, "BufferCallback cannot be null."); in create()
[all …]
/packages/modules/Bluetooth/system/gd/rust/linux/stack/src/
Dcallbacks.rs10 callbacks: HashMap<u32, Box<T>>, field
24 callbacks: HashMap::new(), in new()
53 self.callbacks.insert(id, callback); in add_callback()
64 match self.callbacks.get_mut(&id) { in remove_callback()
70 self.callbacks.remove(&id); in remove_callback()
79 self.callbacks.get(&id) in get_by_id()
84 self.callbacks.get_mut(&id) in get_by_id_mut()
89 for (_, ref mut callback) in self.callbacks.iter_mut() { in for_all_callbacks()
125 let mut callbacks = Callbacks::new(tx.clone(), Message::AdapterCallbackDisconnected); in test_add_and_remove() localVariable
130 let cbid = callbacks.add_callback(Box::new(TestCallback::new(cb_string.clone()))); in test_add_and_remove()
[all …]
Dbluetooth_qa.rs3 use crate::callbacks::Callbacks;
57 callbacks: Callbacks<dyn IBluetoothQACallback + Send>, field
64 callbacks: Callbacks::new(tx.clone(), Message::QaCallbackDisconnected), in new()
68 self.callbacks.for_all_callbacks(|cb| { in on_fetch_discoverable_mode_completed()
73 self.callbacks.for_all_callbacks(|cb| { in on_fetch_connectable_completed()
78 self.callbacks.for_all_callbacks(|cb: &mut Box<dyn IBluetoothQACallback + Send>| { in on_set_connectable_completed()
83 self.callbacks.for_all_callbacks(|cb: &mut Box<dyn IBluetoothQACallback + Send>| { in on_fetch_alias_completed()
88 self.callbacks.for_all_callbacks(|cb: &mut Box<dyn IBluetoothQACallback + Send>| { in on_get_hid_report_completed()
93 self.callbacks.for_all_callbacks(|cb: &mut Box<dyn IBluetoothQACallback + Send>| { in on_set_hid_report_completed()
98 self.callbacks.for_all_callbacks(|cb: &mut Box<dyn IBluetoothQACallback + Send>| { in on_send_hid_data_completed()
[all …]
Dbattery_manager.rs2 use crate::callbacks::Callbacks;
63 callbacks: Callbacks<dyn IBatteryManagerCallback + Send>, field
72 let callbacks = Callbacks::new(tx.clone(), Message::BatteryManagerCallbackDisconnected); in new() localVariable
73 Self { battery_provider_manager, callbacks } in new()
78 self.callbacks.remove_callback(callback_id) in remove_callback()
83 self.callbacks.for_all_callbacks(|callback| { in handle_battery_updated()
94 self.callbacks.add_callback(battery_manager_callback) in register_battery_callback()
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/
DAsyncBindingTest.kt67 @Spy private var callbacks = MyCallbacks() in <lambda>() variable in com.android.launcher3.model.AsyncBindingTest
110 MAIN_EXECUTOR.execute { modelHelper.model.addCallbacksAndLoad(callbacks) } in <lambda>()
113 verify(callbacks, never()).bindInflatedItems(any()) in <lambda>()
114 verify(callbacks, atLeastOnce()).bindItems(any(), any()) in <lambda>()
119 callbacks.inflater = itemInflater in <lambda>()
120 MAIN_EXECUTOR.execute { modelHelper.model.addCallbacksAndLoad(callbacks) } in <lambda>()
123 verify(callbacks, never()).bindItems(any(), any()) in <lambda>()
124 verify(callbacks, times(1)).bindInflatedItems(argThat { t -> t.size == 2 }) in <lambda>()
127 reset(callbacks) in <lambda>()
128 MAIN_EXECUTOR.submit(callbacks.pendingTasks!!::executeAllAndDestroy).get() in <lambda>()
[all …]
/packages/modules/Bluetooth/system/bta/vc/
Dvc_test.cc248 callbacks.reset(new MockVolumeControlCallbacks()); in SetUp()
314 callbacks.reset(); in TearDown()
325 VolumeControl::Initialize(callbacks.get(), base::DoNothing()); in TestAppRegister()
513 std::unique_ptr<MockVolumeControlCallbacks> callbacks; member in bluetooth::vc::internal::__anon509a00280111::VolumeControlTest
534 callbacks.get(), in TEST_F()
547 VolumeControl::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
549 VolumeControl::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
555 VolumeControl::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
584 Mock::VerifyAndClearExpectations(callbacks.get()); in TEST_F()
586 EXPECT_CALL(*callbacks, in TEST_F()
[all …]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/media/
DMediaBrowserProxyService.java75 public void connect(String pkg, Bundle rootHints, IMediaBrowserServiceCallbacks callbacks) { in connect() argument
77 + ", callbacks=" + callbacks in connect()
95 mServiceConnection = new MediaServiceConnection(pkg, origRootHints, callbacks); in connect()
110 callbacks.onConnectFailed(); in connect()
119 public void disconnect(IMediaBrowserServiceCallbacks callbacks) { in disconnect() argument
123 mServiceBinder.disconnect(callbacks); in disconnect()
131 public void addSubscriptionDeprecated(String uri, IMediaBrowserServiceCallbacks callbacks) { in addSubscriptionDeprecated() argument
135 mServiceBinder.addSubscriptionDeprecated(uri, callbacks); in addSubscriptionDeprecated()
145 IMediaBrowserServiceCallbacks callbacks) { in removeSubscriptionDeprecated() argument
149 mServiceBinder.removeSubscriptionDeprecated(uri, callbacks); in removeSubscriptionDeprecated()
[all …]
/packages/modules/Bluetooth/system/gd/hci/acl_manager/
Dclassic_impl.h180 std::function<void(ConnectionManagementCallbacks* callbacks)> execute,
183 auto callbacks = find_callbacks(handle); member
184 if (callbacks != nullptr)
185 execute(callbacks);
191 …te(const Address& address, std::function<void(ConnectionManagementCallbacks* callbacks)> execute) { in execute()
193 auto callbacks = find_callbacks(address); in execute() local
194 if (callbacks != nullptr) execute(callbacks); in execute()
361 connections.execute(address, [=, this](ConnectionManagementCallbacks* callbacks) { in create_and_announce_connection()
363 callbacks->OnRoleChange(hci::ErrorCode::SUCCESS, current_role); in create_and_announce_connection()
366callbacks->OnRoleChange(delayed_role_change_->GetStatus(), delayed_role_change_->GetNewRole()); in create_and_announce_connection()
[all …]
/packages/apps/Car/SystemUI/src/com/android/systemui/car/users/
DCarDisplayTrackerImpl.java75 List<DisplayTrackerCallbackData> callbacks;
77 callbacks = List.copyOf(mDisplayCallbacks);
79 CarDisplayTrackerImpl.this.onDisplayAdded(displayId, callbacks);
84 List<DisplayTrackerCallbackData> callbacks;
86 callbacks = List.copyOf(mDisplayCallbacks);
88 CarDisplayTrackerImpl.this.onDisplayRemoved(displayId, callbacks);
93 List<DisplayTrackerCallbackData> callbacks;
95 callbacks = List.copyOf(mDisplayCallbacks);
97 CarDisplayTrackerImpl.this.onDisplayChanged(displayId, callbacks);
113 List<DisplayTrackerCallbackData> callbacks;
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/
DPermissionListenerMultiplexer.kt31 private val callbacks = mutableMapOf<Int, MutableList<PermissionChangeCallback>>() in <lambda>() constant
35 callbacks[uid]?.toList()?.forEach { callback -> callback.onPermissionChange() } in <lambda>()
46 val wasEmpty = callbacks.isEmpty() in <lambda>()
48 callbacks.getOrPut(uid, { mutableListOf() }).add(callback) in <lambda>()
56 if (!callbacks.contains(uid)) { in <lambda>()
60 if (!callbacks[uid]!!.remove(callback)) { in <lambda>()
64 if (callbacks[uid]!!.isEmpty()) { in <lambda>()
65 callbacks.remove(uid) in <lambda>()
68 if (callbacks.isEmpty()) { in <lambda>()
/packages/modules/Bluetooth/system/bta/has/
Dhas_client_test.cc662 callbacks.reset(new MockHasCallbacks()); in SetUp()
765 callbacks.reset(); in TearDown()
776 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TestAppRegister()
799 Mock::VerifyAndClearExpectations(&*callbacks); in TestConnect()
1172 std::unique_ptr<MockHasCallbacks> callbacks; member in bluetooth::has::internal::__anon0c88c72c0111::HasClientTestBase
1201 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
1207 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
1209 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
1215 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
1248 EXPECT_CALL(*callbacks, in TEST_F()
[all …]
/packages/modules/Bluetooth/system/btif/src/
Dbtif_le_audio.cc52 Bind(&LeAudioClientCallbacks::OnInitialized, Unretained(callbacks))); in OnInitialized()
58 Unretained(callbacks), state, address)); in OnConnectionState()
63 Unretained(callbacks), group_id, group_status)); in OnGroupStatus()
69 Unretained(callbacks), addr, group_id, node_status)); in OnGroupNodeStatus()
75 Unretained(callbacks), direction, group_id, in OnAudioConf()
82 Unretained(callbacks), address, snk_audio_location)); in OnSinkAudioLocationAvailable()
91 Unretained(callbacks), local_input_capa_codec_conf, in OnAudioLocalCodecCapabilities()
99 Unretained(callbacks), group_id, input_codec_conf, in OnAudioGroupCurrentCodecConf()
110 Unretained(callbacks), group_id, input_selectable_codec_conf, in OnAudioGroupSelectableCodecConf()
119 Unretained(callbacks), address, action)); in OnHealthBasedRecommendationAction()
[all …]
Dbtif_keystore.cc49 void init(BluetoothKeystoreCallbacks* callbacks) override { in init() argument
51 this->callbacks = callbacks; in init()
60 if (!callbacks) { in ConvertEncryptOrDecryptKeyIfNeeded()
73 if (!callbacks) { in set_encrypt_key_or_remove_key()
84 base::Unretained(callbacks), prefix, decryptedString)); in set_encrypt_key_or_remove_key()
91 if (!callbacks) { in get_key()
100 decryptedString = callbacks->get_key(prefix); in get_key()
119 BluetoothKeystoreCallbacks* callbacks = nullptr; member in bluetooth::bluetooth_keystore::BluetoothKeystoreInterfaceImpl
Dbtif_hearing_aid.cc54 void Init(HearingAidCallbacks* callbacks) override { in Init() argument
55 this->callbacks = callbacks; in Init()
65 Unretained(callbacks), state, address)); in OnConnectionState()
71 Unretained(callbacks), capabilities, hiSyncId, in OnDeviceAvailable()
109 HearingAidCallbacks* callbacks; member in __anone299c8dc0211::HearingAidInterfaceImpl
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DMultiStateCallback.java98 LinkedList<Runnable> callbacks = mCallbacks.valueAt(i); in setState() local
99 while (!callbacks.isEmpty()) { in setState()
100 callbacks.pollFirst().run(); in setState()
167 final LinkedList<Runnable> callbacks; in runOnceAtState() local
169 callbacks = mCallbacks.get(stateMask); in runOnceAtState()
170 if (FeatureFlags.IS_STUDIO_BUILD && callbacks.contains(callback)) { in runOnceAtState()
174 callbacks = new LinkedList<>(); in runOnceAtState()
175 mCallbacks.put(stateMask, callbacks); in runOnceAtState()
177 callbacks.add(callback); in runOnceAtState()
/packages/modules/Bluetooth/system/gd/hci/
Dacl_manager.cc207 void AclManager::RegisterCallbacks(ConnectionCallbacks* callbacks, os::Handler* handler) { in RegisterCallbacks() argument
209 callbacks != nullptr && handler != nullptr, in RegisterCallbacks()
214 common::Unretained(callbacks), in RegisterCallbacks()
218 void AclManager::UnregisterCallbacks(ConnectionCallbacks* callbacks, std::promise<void> promise) { in UnregisterCallbacks() argument
219 log::assert_that(callbacks != nullptr, "assert failed: callbacks != nullptr"); in UnregisterCallbacks()
223 common::Unretained(callbacks), in UnregisterCallbacks()
227 void AclManager::RegisterLeCallbacks(LeConnectionCallbacks* callbacks, os::Handler* handler) { in RegisterLeCallbacks() argument
229 callbacks != nullptr && handler != nullptr, in RegisterLeCallbacks()
234 common::Unretained(callbacks), in RegisterLeCallbacks()
238 void AclManager::RegisterLeAcceptlistCallbacks(LeAcceptlistCallbacks* callbacks) { in RegisterLeAcceptlistCallbacks() argument
[all …]
/packages/services/Car/service/src/com/android/car/
DCarPerUserServiceHelper.java102 List<ServiceCallback> callbacks;
113 callbacks = new ArrayList<>(mServiceCallbacks);
116 for (ServiceCallback callback : callbacks) {
137 List<ServiceCallback> callbacks;
145 callbacks = new ArrayList<>(mServiceCallbacks);
148 for (ServiceCallback callback : callbacks) {
158 List<ServiceCallback> callbacks;
164 callbacks = new ArrayList<>(mServiceCallbacks);
167 for (ServiceCallback callback : callbacks) {
/packages/modules/DnsResolver/
DDnsResolver.cpp31 bool resolv_init(const ResolverNetdCallbacks* callbacks) { in resolv_init() argument
40 gResNetdCallbacks.check_calling_permission = callbacks->check_calling_permission; in resolv_init()
41 gResNetdCallbacks.get_network_context = callbacks->get_network_context; in resolv_init()
42 gResNetdCallbacks.log = callbacks->log; in resolv_init()
44 gResNetdCallbacks.tagSocket = callbacks->tagSocket; in resolv_init()
45 gResNetdCallbacks.evaluate_domain_name = callbacks->evaluate_domain_name; in resolv_init()
/packages/modules/Bluetooth/system/rust/src/connection/mocks/
Dmock_le_manager.rs22 callbacks: Rc<RefCell<Option<Box<dyn LeAclManagerConnectionCallbacks>>>>, field
27 Self { active: Rc::new(RefCell::new(None)), callbacks: Rc::new(RefCell::new(None)) } in new()
48 self.callbacks in on_le_connect()
54 self.callbacks.borrow().as_deref().unwrap().on_le_connect(address, Err(status)); in on_le_connect()
63 self.callbacks.borrow().as_deref().unwrap().on_disconnect(address); in on_le_disconnect()
72 callbacks: impl LeAclManagerConnectionCallbacks + 'static, in register_callbacks()
76 *self.callbacks.borrow_mut() = Some(Box::new(callbacks)); in register_callbacks()
/packages/modules/Bluetooth/system/bta/csis/
Dcsis_client_test.cc435 callbacks.reset(new MockCsisCallbacks()); in SetUp()
502 callbacks.reset(); in TearDown()
513 CsisClient::Initialize(callbacks.get(), in TestAppRegister()
544 EXPECT_CALL(*callbacks, OnConnectionState(test_address, in TestDisconnect()
555 EXPECT_CALL(*callbacks, in TestAddFromStorage()
558 EXPECT_CALL(*callbacks, OnDeviceAvailable(address, _, _, _, _)) in TestAddFromStorage()
708 std::unique_ptr<MockCsisCallbacks> callbacks; member in bluetooth::csis::internal::__anon6ed6c0780111::CsisClientTest
728 CsisClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
734 CsisClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
736 CsisClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F()
[all …]
/packages/modules/Bluetooth/system/gd/hal/
Dhci_hal_android_test.cc35 std::shared_ptr<HciBackendCallbacks> callbacks; member in bluetooth::hal::TestBackend
40 void initialize(std::shared_ptr<HciBackendCallbacks> callbacks) override { in initialize() argument
41 this->callbacks = callbacks; in initialize()
43 [callbacks](std::chrono::milliseconds delay) { in initialize()
45 callbacks->initializationComplete(); in initialize()
/packages/modules/Bluetooth/system/gd/rust/topshim/src/profiles/
Davrcp.rs157 pub fn initialize(&mut self, callbacks: AvrcpCallbacksDispatcher) -> bool { in initialize()
158 if get_dispatchers().lock().unwrap().set::<AvrcpCb>(Arc::new(Mutex::new(callbacks))) { in initialize()
221 callbacks: Option<Box<bindings::btrc_ctrl_callbacks_t>>, field
263 callbacks: None, in new()
267 pub fn initialize(&mut self, callbacks: AvrcpCtrlCallbacksDispatcher) -> bool { in initialize()
269 if get_dispatchers().lock().unwrap().set::<AvrcpCtCb>(Arc::new(Mutex::new(callbacks))) { in initialize()
273 let callbacks = Box::new(bindings::btrc_ctrl_callbacks_t { in initialize() localVariable
297 self.callbacks = Some(callbacks); in initialize()
299 let cb_ptr = LTCheckedPtrMut::from(self.callbacks.as_mut().unwrap()); in initialize()
Dhf_client.rs95 callbacks: Option<Box<bindings::bthf_client_callbacks_t>>, field
104 let cb_ptr = LTCheckedPtrMut::from(self.callbacks.as_mut().unwrap()); in enable()
127 callbacks: None, in new()
135 pub fn initialize(&mut self, callbacks: BthfClientCallbacksDispatcher) -> bool { in initialize()
137 if get_dispatchers().lock().unwrap().set::<BthfClientCb>(Arc::new(Mutex::new(callbacks))) { in initialize()
141 let callbacks = Box::new(bindings::bthf_client_callbacks_t { in initialize() localVariable
167 self.callbacks = Some(callbacks); in initialize()

12345678910>>...13