/packages/modules/Bluetooth/system/bta/groups/ |
D | groups_test.cc | 80 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 …]
|
D | groups.cc | 78 DeviceGroupsImpl(DeviceGroupsCallbacks* callbacks) { in DeviceGroupsImpl() argument 79 AddCallbacks(callbacks); in DeviceGroupsImpl() 241 void AddCallbacks(DeviceGroupsCallbacks* callbacks) { in AddCallbacks() argument 242 callbacks_.push_back(std::move(callbacks)); in AddCallbacks() 249 callbacks->OnGroupAdded(dev, group_uuid, group_id); in AddCallbacks() 254 bool Clear(DeviceGroupsCallbacks* callbacks) { in Clear() argument 256 [callbacks](auto c) { return c == callbacks; }); in Clear() 332 void DeviceGroups::Initialize(DeviceGroupsCallbacks* callbacks) { in Initialize() argument 335 instance = new DeviceGroupsImpl(callbacks); in Initialize() 339 instance->AddCallbacks(callbacks); in Initialize() [all …]
|
/packages/services/Car/car-evs-helper-lib/src/com/android/car/internal/evs/ |
D | CarEvsGLSurfaceView.java | 67 private CarEvsGLSurfaceView(Context context, ArrayList<BufferCallback> callbacks, in CarEvsGLSurfaceView() argument 72 mRenderer = new GLES20CarEvsBufferRenderer(callbacks, angleInDegree, positions); in CarEvsGLSurfaceView() 94 ArrayList<BufferCallback> callbacks) { in create() argument 95 return create(context, callbacks, DEFAULT_IN_PLANE_ROTATION_ANGLE, DEFAULT_1X1_POSITION); in create() 107 public static CarEvsGLSurfaceView create(Context context, ArrayList<BufferCallback> callbacks, in create() argument 109 return create(context, callbacks, angleInDegree, DEFAULT_1X1_POSITION); in create() 122 public static CarEvsGLSurfaceView create(Context context, ArrayList<BufferCallback> callbacks, in create() argument 124 return create(context, callbacks, DEFAULT_IN_PLANE_ROTATION_ANGLE, positions); in create() 138 public static CarEvsGLSurfaceView create(Context context, ArrayList<BufferCallback> callbacks, in create() argument 142 Preconditions.checkArgument(callbacks != null, "BufferCallback cannot be null."); in create() [all …]
|
/packages/modules/Bluetooth/system/bta/vc/ |
D | vc_test.cc | 247 callbacks.reset(new MockVolumeControlCallbacks()); in SetUp() 309 callbacks.reset(); in TearDown() 320 VolumeControl::Initialize(callbacks.get()); in TestAppRegister() 499 std::unique_ptr<MockVolumeControlCallbacks> callbacks; member in bluetooth::vc::internal::__anon2b317e8d0111::VolumeControlTest 514 VolumeControl::Initialize(callbacks.get()); in TEST_F() 520 VolumeControl::Initialize(callbacks.get()); in TEST_F() 522 VolumeControl::Initialize(callbacks.get()); in TEST_F() 528 VolumeControl::Initialize(callbacks.get()); in TEST_F() 557 EXPECT_CALL(*callbacks, in TEST_F() 560 EXPECT_CALL(*callbacks, OnDeviceAvailable(test_address, 2)).Times(0); in TEST_F() [all …]
|
/packages/modules/Bluetooth/system/gd/hci/acl_manager/ |
D | classic_impl.h | 178 std::function<void(ConnectionManagementCallbacks* callbacks)> execute, 181 auto callbacks = find_callbacks(handle); member 182 if (callbacks != nullptr) 183 execute(callbacks); 188 …te(const Address& address, std::function<void(ConnectionManagementCallbacks* callbacks)> execute) { in execute() 190 auto callbacks = find_callbacks(address); in execute() local 191 if (callbacks != nullptr) execute(callbacks); in execute() 379 connections.execute(address, [=](ConnectionManagementCallbacks* callbacks) { in create_and_announce_connection() 381 callbacks->OnRoleChange(hci::ErrorCode::SUCCESS, current_role); in create_and_announce_connection() 385 … callbacks->OnRoleChange(delayed_role_change_->GetStatus(), delayed_role_change_->GetNewRole()); in create_and_announce_connection() [all …]
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/media/ |
D | MediaBrowserProxyService.java | 75 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/apps/Car/SystemUI/src/com/android/systemui/car/users/ |
D | CarDisplayTrackerImpl.java | 75 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/Bluetooth/system/bta/has/ |
D | has_client_test.cc | 653 callbacks.reset(new MockHasCallbacks()); in SetUp() 754 callbacks.reset(); in TearDown() 765 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TestAppRegister() 788 Mock::VerifyAndClearExpectations(&*callbacks); in TestConnect() 1159 std::unique_ptr<MockHasCallbacks> callbacks; member in bluetooth::has::internal::__anon8c9947310111::HasClientTestBase 1189 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F() 1195 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F() 1197 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F() 1203 HasClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F() 1243 *callbacks, in TEST_F() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | PermissionListenerMultiplexer.kt | 34 private val callbacks = mutableMapOf<Int, MutableList<PermissionChangeCallback>>() in <lambda>() constant 38 callbacks[uid]?.toList()?.forEach { callback -> in <lambda>() 51 val wasEmpty = callbacks.isEmpty() in <lambda>() 53 callbacks.getOrPut(uid, { mutableListOf() }).add(callback) in <lambda>() 61 if (!callbacks.contains(uid)) { in <lambda>() 65 if (!callbacks[uid]!!.remove(callback)) { in <lambda>() 69 if (callbacks[uid]!!.isEmpty()) { in <lambda>() 70 callbacks.remove(uid) in <lambda>() 73 if (callbacks.isEmpty()) { in <lambda>()
|
/packages/modules/Bluetooth/system/btif/src/ |
D | btif_keystore.cc | 49 void init(BluetoothKeystoreCallbacks* callbacks) override { in init() argument 51 this->callbacks = callbacks; in init() 60 if (!callbacks) { in ConvertEncryptOrDecryptKeyIfNeeded() 74 if (!callbacks) { in set_encrypt_key_or_remove_key() 85 base::Unretained(callbacks), prefix, decryptedString)); in set_encrypt_key_or_remove_key() 92 if (!callbacks) { in get_key() 101 decryptedString = callbacks->get_key(prefix); in get_key() 120 BluetoothKeystoreCallbacks* callbacks = nullptr; member in bluetooth::bluetooth_keystore::BluetoothKeystoreInterfaceImpl
|
D | btif_le_audio.cc | 49 Unretained(callbacks))); in OnInitialized() 55 Unretained(callbacks), state, address)); in OnConnectionState() 61 Unretained(callbacks), group_id, group_status)); in OnGroupStatus() 68 Unretained(callbacks), addr, group_id, node_status)); in OnGroupNodeStatus() 75 Unretained(callbacks), direction, group_id, in OnAudioConf() 83 Unretained(callbacks), address, snk_audio_location)); in OnSinkAudioLocationAvailable() 92 Unretained(callbacks), local_input_capa_codec_conf, in OnAudioLocalCodecCapabilities() 104 Unretained(callbacks), group_id, input_codec_conf, in OnAudioGroupCodecConf() 109 void Initialize(LeAudioClientCallbacks* callbacks, in Initialize() argument 112 this->callbacks = callbacks; in Initialize() [all …]
|
/packages/modules/Bluetooth/system/gd/rust/linux/stack/src/ |
D | callbacks.rs | 10 callbacks: HashMap<u32, Box<T>>, field 22 Self { callbacks: HashMap::new(), tx, disconnected_message } in new() 41 self.callbacks.insert(id, callback); in add_callback() 52 match self.callbacks.get_mut(&id) { in remove_callback() 57 self.callbacks.remove(&id); in remove_callback() 66 self.callbacks.get(&id) in get_by_id() 71 self.callbacks.get_mut(&id) in get_by_id_mut() 76 for (_, ref mut callback) in self.callbacks.iter_mut() { in for_all_callbacks()
|
D | battery_manager.rs | 2 use crate::callbacks::Callbacks; 61 callbacks: Callbacks<dyn IBatteryManagerCallback + Send>, field 70 let callbacks = Callbacks::new(tx.clone(), Message::BatteryManagerCallbackDisconnected); in new() localVariable 71 Self { battery_provider_manager, callbacks } in new() 76 self.callbacks.remove_callback(callback_id); in remove_callback() 81 self.callbacks.for_all_callbacks(|callback| { in handle_battery_updated() 92 self.callbacks.add_callback(battery_manager_callback) in register_battery_callback()
|
/packages/modules/Bluetooth/system/gd/rust/stack/src/hal/ |
D | hidl_hal.rs | 79 let callbacks = CALLBACKS.lock().unwrap(); in on_init_complete() localVariable 80 callbacks.as_ref().unwrap().init_tx.send(()).unwrap(); in on_init_complete() 85 let callbacks = CALLBACKS.lock().unwrap(); in on_event() localVariable 87 Ok(p) => callbacks.as_ref().unwrap().evt_tx.send(p).unwrap(), in on_event() 93 let callbacks = CALLBACKS.lock().unwrap(); in on_acl() localVariable 95 Ok(p) => callbacks.as_ref().unwrap().acl_tx.send(p).unwrap(), in on_acl() 101 let callbacks = CALLBACKS.lock().unwrap(); in on_sco() localVariable 103 Ok(p) => callbacks.as_ref().unwrap().sco_tx.send(p).unwrap(), in on_sco() 109 let callbacks = CALLBACKS.lock().unwrap(); in on_iso() localVariable 111 Ok(p) => callbacks.as_ref().unwrap().iso_tx.send(p).unwrap(), in on_iso()
|
/packages/modules/Bluetooth/system/gd/hci/ |
D | acl_manager.cc | 206 void AclManager::RegisterCallbacks(ConnectionCallbacks* callbacks, os::Handler* handler) { in RegisterCallbacks() argument 207 ASSERT(callbacks != nullptr && handler != nullptr); in RegisterCallbacks() 211 common::Unretained(callbacks), in RegisterCallbacks() 215 void AclManager::UnregisterCallbacks(ConnectionCallbacks* callbacks, std::promise<void> promise) { in UnregisterCallbacks() argument 216 ASSERT(callbacks != nullptr); in UnregisterCallbacks() 220 common::Unretained(callbacks), in UnregisterCallbacks() 224 void AclManager::RegisterLeCallbacks(LeConnectionCallbacks* callbacks, os::Handler* handler) { in RegisterLeCallbacks() argument 225 ASSERT(callbacks != nullptr && handler != nullptr); in RegisterLeCallbacks() 229 common::Unretained(callbacks), in RegisterLeCallbacks() 233 void AclManager::RegisterLeAcceptlistCallbacks(LeAcceptlistCallbacks* callbacks) { in RegisterLeAcceptlistCallbacks() argument [all …]
|
/packages/services/Car/service/src/com/android/car/ |
D | CarPerUserServiceHelper.java | 100 List<ServiceCallback> callbacks; 111 callbacks = new ArrayList<>(mServiceCallbacks); 114 for (ServiceCallback callback : callbacks) { 135 List<ServiceCallback> callbacks; 143 callbacks = new ArrayList<>(mServiceCallbacks); 146 for (ServiceCallback callback : callbacks) { 156 List<ServiceCallback> callbacks; 162 callbacks = new ArrayList<>(mServiceCallbacks); 165 for (ServiceCallback callback : callbacks) {
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/ |
D | MultiStateCallback.java | 98 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/rust/linux/dbus_projection/src/ |
D | lib.rs | 66 callbacks: Arc<Mutex<HashMap<BusName<'static>, HashMap<u32, Box<dyn Fn(u32) + Send>>>>>, field 72 DisconnectWatcher { next_id: 0, callbacks: Arc::new(Mutex::new(HashMap::new())) } in new() 85 if !self.callbacks.lock().unwrap().contains_key(&address) { in add() 86 self.callbacks.lock().unwrap().insert(address.clone(), HashMap::new()); in add() 90 (*self.callbacks.lock().unwrap().get_mut(&address).unwrap()).insert(id, callback); in add() 100 let callbacks_map = self.callbacks.clone(); in setup_watch() 139 if !self.callbacks.lock().unwrap().contains_key(&address) { in remove() 143 let mut callbacks = self.callbacks.lock().unwrap(); in remove() localVariable 144 match callbacks.get(&address).and_then(|m| m.get(&target_id)) { in remove() 147 let _ = callbacks.get_mut(&address).and_then(|m| m.remove(&target_id)); in remove()
|
/packages/modules/Bluetooth/system/hci/src/ |
D | packet_fragmenter.cc | 85 static const packet_fragmenter_callbacks_t* callbacks; variable 91 callbacks = result_callbacks; in init() 114 callbacks->fragmented(packet, true); in fragment_and_dispatch() 118 callbacks->fragmented(packet, true); in fragment_and_dispatch() 144 callbacks->fragmented(packet, false); in fragment_and_dispatch_acl() 162 callbacks->transmit_finished(packet, false); in fragment_and_dispatch_acl() 168 callbacks->fragmented(packet, true); in fragment_and_dispatch_acl() 196 callbacks->fragmented(packet, false); in fragment_and_dispatch_iso() 214 callbacks->fragmented(packet, true); in fragment_and_dispatch_iso() 327 callbacks->reassembled(partial_packet); in reassemble_and_dispatch_iso() [all …]
|
/packages/modules/Bluetooth/system/main/shim/ |
D | activity_attribution.cc | 43 void RegisterCallbacks(ActivityAttributionCallbacks* callbacks) override { in RegisterCallbacks() argument 44 this->callbacks = callbacks; in RegisterCallbacks() 60 base::Unretained(callbacks), in OnWakeup() 79 base::Unretained(callbacks), callback_logs)); in OnActivityLogsReady() 86 ActivityAttributionCallbacks* callbacks; member in ActivityAttributionInterfaceImpl
|
/packages/modules/DnsResolver/ |
D | DnsResolver.cpp | 31 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/ |
D | mock_le_manager.rs | 22 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/gd/rust/topshim/src/profiles/ |
D | avrcp.rs | 156 pub fn initialize(&mut self, callbacks: AvrcpCallbacksDispatcher) -> bool { in initialize() 157 if get_dispatchers().lock().unwrap().set::<AvrcpCb>(Arc::new(Mutex::new(callbacks))) { in initialize() 220 callbacks: Option<Box<bindings::btrc_ctrl_callbacks_t>>, field 262 callbacks: None, in new() 266 pub fn initialize(&mut self, callbacks: AvrcpCtrlCallbacksDispatcher) -> bool { in initialize() 268 if get_dispatchers().lock().unwrap().set::<AvrcpCtCb>(Arc::new(Mutex::new(callbacks))) { in initialize() 272 let callbacks = Box::new(bindings::btrc_ctrl_callbacks_t { in initialize() localVariable 296 self.callbacks = Some(callbacks); in initialize() 298 let cb_ptr = LTCheckedPtrMut::from(self.callbacks.as_mut().unwrap()); in initialize()
|
D | hf_client.rs | 95 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()
|
/packages/modules/Bluetooth/system/bta/csis/ |
D | csis_client_test.cc | 335 callbacks.reset(new MockCsisCallbacks()); in SetUp() 396 callbacks.reset(); in TearDown() 407 CsisClient::Initialize(callbacks.get(), in TestAppRegister() 438 EXPECT_CALL(*callbacks, OnConnectionState(test_address, in TestDisconnect() 448 EXPECT_CALL(*callbacks, in TestAddFromStorage() 451 EXPECT_CALL(*callbacks, OnDeviceAvailable(address, _, _, _, _)).Times(1); in TestAddFromStorage() 572 std::unique_ptr<MockCsisCallbacks> callbacks; member in bluetooth::csis::internal::__anon350755bd0111::CsisClientTest 592 CsisClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F() 598 CsisClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F() 600 CsisClient::Initialize(callbacks.get(), base::DoNothing()); in TEST_F() [all …]
|