Home
last modified time | relevance | path

Searched refs:devices (Results 1 – 25 of 223) sorted by relevance

123456789

/frameworks/base/services/robotests/src/com/android/server/media/
DAudioPoliciesBluetoothRouteControllerTest.java118 Set<BluetoothDevice> devices = generateFakeBluetoothDevicesSet( in selectRoute_noDeviceWithGivenAddress_returnsFalse() local
121 mShadowBluetoothAdapter.setBondedDevices(devices); in selectRoute_noDeviceWithGivenAddress_returnsFalse()
129 Set<BluetoothDevice> devices = generateFakeBluetoothDevicesSet( in selectRoute_deviceIsInDevicesSet_returnsTrue() local
132 mShadowBluetoothAdapter.setBondedDevices(devices); in selectRoute_deviceIsInDevicesSet_returnsTrue()
140 Set<BluetoothDevice> devices = generateFakeBluetoothDevicesSet( in selectRoute_resetSelectedDevice_returnsTrue() local
143 mShadowBluetoothAdapter.setBondedDevices(devices); in selectRoute_resetSelectedDevice_returnsTrue()
151 Set<BluetoothDevice> devices = generateFakeBluetoothDevicesSet( in selectRoute_noSelectedDevice_returnsTrue() local
154 mShadowBluetoothAdapter.setBondedDevices(devices); in selectRoute_noSelectedDevice_returnsTrue()
161 Set<BluetoothDevice> devices = generateFakeBluetoothDevicesSet( in getSelectedRoute_updateRouteFailed_returnsNull() local
164 mShadowBluetoothAdapter.setBondedDevices(devices); in getSelectedRoute_updateRouteFailed_returnsNull()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/
DCastTileTest.java186 List<CastDevice> devices = new ArrayList<>(); in testStateActive_wifiEnabledAndCasting() local
187 devices.add(device); in testStateActive_wifiEnabledAndCasting()
188 when(mController.getCastDevices()).thenReturn(devices); in testStateActive_wifiEnabledAndCasting()
230 List<CastDevice> devices = new ArrayList<>(); in stateActive_wifiConnectedAndCasting_newPipeline() local
231 devices.add(device); in stateActive_wifiConnectedAndCasting_newPipeline()
232 when(mController.getCastDevices()).thenReturn(devices); in stateActive_wifiConnectedAndCasting_newPipeline()
297 List<CastDevice> devices = new ArrayList<>(); in testStateActive_hotspotEnabledAndConnectedAndCasting() local
298 devices.add(device); in testStateActive_hotspotEnabledAndConnectedAndCasting()
299 when(mController.getCastDevices()).thenReturn(devices); in testStateActive_hotspotEnabledAndConnectedAndCasting()
321 List<CastDevice> devices = new ArrayList<>(); in testHandleClick_castDevicePresent() local
[all …]
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/
DDeviceDescriptor.cpp224 void DeviceVector::add(const DeviceVector &devices) in add() argument
227 for (const auto& device : devices) { in add()
290 void DeviceVector::remove(const DeviceVector &devices) in remove() argument
292 for (const auto& device : devices) { in remove()
299 DeviceVector devices; in getDevicesFromHwModule() local
302 devices.add(device); in getDevicesFromHwModule()
305 return devices; in getDevicesFromHwModule()
346 DeviceVector devices; in getDevicesFromTypes() local
348 return devices; in getDevicesFromTypes()
352 devices.add(itemAt(i)); in getDevicesFromTypes()
[all …]
DAudioOutputDescriptor.cpp277 devices().toString(true /*includeSensitiveInfo*/).c_str()); in dump()
350 DeviceVector SwAudioOutputDescriptor::devices() const in devices() function in android::SwAudioOutputDescriptor
353 DeviceVector devices = mOutput1->devices(); in devices() local
354 devices.merge(mOutput2->devices()); in devices()
355 return devices; in devices()
388 bool SwAudioOutputDescriptor::supportsAllDevices(const DeviceVector &devices) const in supportsAllDevices()
390 return supportedDevices().containsAllDevices(devices); in supportsAllDevices()
393 bool SwAudioOutputDescriptor::supportsAtLeastOne(const DeviceVector &devices) const in supportsAtLeastOne()
395 return filterSupportedDevices(devices).size() > 0; in supportsAtLeastOne()
398 bool SwAudioOutputDescriptor::supportsDevicesForPlayback(const DeviceVector &devices) const in supportsDevicesForPlayback()
[all …]
/frameworks/av/services/audiopolicy/engine/common/src/
DEngineBase.cpp387 T t, device_role_t role, const AudioDeviceTypeAddrVector &devices, in setDevicesRoleForT() argument
396 tDevicesRoleMap[std::make_pair(t, role)] = devices; in setDevicesRoleForT()
402 it->second = excludeDeviceTypeAddrsFrom(it->second, devices); in setDevicesRoleForT()
411 it->second = joinDeviceTypeAddrs(it->second, devices); in setDevicesRoleForT()
413 tDevicesRoleMap[std::make_pair(t, role)] = devices; in setDevicesRoleForT()
421 it->second = excludeDeviceTypeAddrsFrom(it->second, devices); in setDevicesRoleForT()
439 T t, device_role_t role, const AudioDeviceTypeAddrVector &devices, in removeDevicesRoleForT() argument
451 it->second = excludeDeviceTypeAddrsFrom(it->second, devices); in removeDevicesRoleForT()
496 T t, device_role_t role, AudioDeviceTypeAddrVector &devices, const std::string& logStr, in getDevicesRoleForT() argument
512 devices = it->second; in getDevicesRoleForT()
[all …]
/frameworks/av/services/audiopolicy/engineconfigurable/src/
DInputSource.cpp48 status_t Element<audio_source_t>::set(audio_devices_t devices) in set() argument
50 if (!audio_is_input_device(devices)) { in set()
52 __FUNCTION__, devices, getName().c_str()); in set()
55 ALOGV("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str()); in set()
56 mApplicableDevices = devices; in set()
/frameworks/av/media/libaudioclient/tests/
Daudiosystem_tests.cpp409 AudioDeviceTypeAddrVector devices; in TEST_F() local
411 DEVICE_ROLE_PREFERRED, devices)); in TEST_F()
413 DEVICE_ROLE_NONE, devices)); in TEST_F()
415 devices); in TEST_F()
428 DEVICE_ROLE_PREFERRED, devices)); in TEST_F()
429 EXPECT_EQ(devices, outputDevices); in TEST_F()
433 mediaStrategy.getId(), DEVICE_ROLE_PREFERRED, devices)); in TEST_F()
495 AudioDeviceTypeAddrVector devices; in TEST_F() local
497 DEVICE_ROLE_NONE, devices)); in TEST_F()
509 AudioSystem::getDevicesForRoleAndCapturePreset(audioSource, role, devices)); in TEST_F()
[all …]
/frameworks/av/services/audiopolicy/enginedefault/src/
DEngine.cpp227 availableOutputDevices.remove(desc->devices().getDevicesFromTypes({ in filterOutputDevicesForStrategy()
283 DeviceVector devices; in getDevicesForStrategyInt() local
288 devices = availableOutputDevices.getDevicesFromType(AUDIO_DEVICE_OUT_SPEAKER); in getDevicesForStrategyInt()
294 devices = availableOutputDevices.getFirstDevicesFromTypes( in getDevicesForStrategyInt()
301 if (!devices.isEmpty()) break; in getDevicesForStrategyInt()
302 devices = availableOutputDevices.getFirstDevicesFromTypes({ in getDevicesForStrategyInt()
317 devices = availableOutputDevices.getFirstDevicesFromTypes({ in getDevicesForStrategyInt()
334 devices = devices2; in getDevicesForStrategyInt()
343 devices.replaceDevicesByType( in getDevicesForStrategyInt()
349 devices.add(devices2); in getDevicesForStrategyInt()
[all …]
/frameworks/av/services/audiopolicy/common/managerdefinitions/include/
DAudioIODescriptorInterface.h43 IoDescriptor& desc, Filter filter, bool& active, const DeviceVector& devices) in findPreferredDevice() argument
55 return devices.getDeviceFromId( in findPreferredDevice()
61 return devices.getDeviceFromId(activeClientsWithRoute[0]->preferredDeviceId()); in findPreferredDevice()
70 IoCollection& ioCollection, Filter filter, const DeviceVector& devices) in findPreferredDevice() argument
76 sp<DeviceDescriptor> curDevice = findPreferredDevice(desc, filter, active, devices); in findPreferredDevice()
DDeviceDescriptor.h120 void add(const DeviceVector &devices);
122 void remove(const DeviceVector &devices);
197 bool containsAtLeastOne(const DeviceVector &devices) const;
204 bool containsAllDevices(const DeviceVector &devices) const;
211 DeviceVector filter(const DeviceVector &devices) const;
226 ssize_t merge(const DeviceVector &devices) in merge() argument
229 add(devices); in merge()
232 ssize_t ret = SortedVector::merge(devices); in merge()
/frameworks/av/services/audiopolicy/engine/common/include/
DEngineBase.h109 const AudioDeviceTypeAddrVector &devices) override;
112 const AudioDeviceTypeAddrVector &devices) override;
117 AudioDeviceTypeAddrVector &devices) const override;
149 const AudioDeviceTypeAddrVector &devices) override;
152 const AudioDeviceTypeAddrVector &devices) override;
160 device_role_t role, const AudioDeviceTypeAddrVector& devices,
164 device_role_t role, const AudioDeviceTypeAddrVector& devices) override;
170 device_role_t role, AudioDeviceTypeAddrVector &devices) const override;
199 DeviceVector& devices) const;
/frameworks/av/services/audiopolicy/managerdefault/
DAudioPolicyManager.h228 AudioDeviceTypeAddrVector *devices,
296 const AudioDeviceTypeAddrVector& devices);
299 const AudioDeviceTypeAddrVector& devices);
304 const AudioDeviceTypeAddrVector &devices);
308 const AudioDeviceTypeAddrVector &devices);
315 AudioDeviceTypeAddrVector &devices);
319 const AudioDeviceTypeAddrVector &devices);
323 const AudioDeviceTypeAddrVector &devices);
327 const AudioDeviceTypeAddrVector& devices);
334 AudioDeviceTypeAddrVector &devices);
[all …]
DAudioPolicyManager.cpp328 bool force = (msdOutDevices.isEmpty() || msdOutDevices != desc->devices()) in setDeviceConnectionStateInt()
333 if (desc->mUsePreferredMixerAttributes && newDevices != desc->devices()) { in setDeviceConnectionStateInt()
343 !activeMediaDevices.empty() && desc->devices() != activeMediaDevices && in setDeviceConnectionStateInt()
674 mPrimaryOutput->devices().onlyContainsDevicesWithType(AUDIO_DEVICE_OUT_STUB)) { in updateCallRoutingInternal()
885 rxDevices = mPrimaryOutput->devices(); in setPhoneState()
902 if (desc->mUsePreferredMixerAttributes && newDevices != desc->devices()) { in setPhoneState()
975 const DeviceVector& devices, in getMsdProfileForOutput() argument
987 if (msdHasPatchesToAllDevices(devices.toTypeAddrVector())) { in getMsdProfileForOutput()
1001 const DeviceVector& devices, in getProfileForOutput() argument
1011 mHwModules, devices, samplingRate, format, channelMask, flags, directOnly); in getProfileForOutput()
[all …]
/frameworks/av/services/mediametrics/
DStringUtils.cpp79 std::vector<std::pair<std::string, std::string>> getDeviceAddressPairs(const std::string& devices) in getDeviceAddressPairs() argument
87 for (auto it = devices.begin(); ; ) { in getDeviceAddressPairs()
88 auto token = tokenizer(it, devices.end(), delim); in getDeviceAddressPairs()
91 auto device = tokenizer(it, devices.end(), delim); in getDeviceAddressPairs()
94 token = tokenizer(it, devices.end(), delim); in getDeviceAddressPairs()
98 auto address = tokenizer(it, devices.end(), delim); in getDeviceAddressPairs()
103 token = tokenizer(it, devices.end(), delim); in getDeviceAddressPairs()
109 token = tokenizer(it, devices.end(), delim); in getDeviceAddressPairs()
/frameworks/base/services/core/java/com/android/server/audio/
DAudioDeviceInventory.java430 mPreferredDevicesForCapturePreset.forEach((capturePreset, devices) -> { in dump() argument
432 + " devices:" + devices); }); in dump()
434 mAppliedStrategyRoles.forEach((key, devices) -> { in dump() argument
436 + " role:" + key.second + " devices:" + devices); }); in dump()
438 mAppliedStrategyRolesInt.forEach((key, devices) -> { in dump() argument
440 + " role:" + key.second + " devices:" + devices); }); in dump()
442 mAppliedPresetRoles.forEach((key, devices) -> { in dump() argument
444 + " role:" + key.second + " devices:" + devices); }); in dump()
446 mAppliedPresetRolesInt.forEach((key, devices) -> { in dump() argument
448 + " role:" + key.second + " devices:" + devices); }); in dump()
[all …]
DAudioSystemAdapter.java139 ArrayList<AudioDeviceAttributes> devices = in onRoutingUpdated() local
142 || !sameDeviceList(devices, mLastDevicesForAttr.get(attr))) { in onRoutingUpdated()
145 attr.first, attr.second, devices); in onRoutingUpdated()
354 @NonNull List<AudioDeviceAttributes> devices) { in attrDeviceToDebugString() argument
356 + AudioSystem.deviceSetToString(AudioSystem.generateAudioDeviceTypesSet(devices)); in attrDeviceToDebugString()
405 @NonNull List<AudioDeviceAttributes> devices) { in setDevicesRoleForStrategy() argument
407 return AudioSystem.setDevicesRoleForStrategy(strategy, role, devices); in setDevicesRoleForStrategy()
418 @NonNull List<AudioDeviceAttributes> devices) { in removeDevicesRoleForStrategy() argument
420 return AudioSystem.removeDevicesRoleForStrategy(strategy, role, devices); in removeDevicesRoleForStrategy()
442 @NonNull List<AudioDeviceAttributes> devices) { in setDevicesRoleForCapturePreset() argument
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
DCachedBluetoothDeviceManagerTest.java153 Collection<CachedBluetoothDevice> devices = mCachedDeviceManager.getCachedDevicesCopy(); in addDevice_validCachedDevices_devicesAdded() local
154 assertThat(devices).contains(cachedDevice1); in addDevice_validCachedDevices_devicesAdded()
155 assertThat(devices).contains(cachedDevice2); in addDevice_validCachedDevices_devicesAdded()
197 Collection<CachedBluetoothDevice> devices = mCachedDeviceManager.getCachedDevicesCopy(); in addDevice_sameHiSyncId_validCachedDevices_mainDevicesAdded_subDevicesNotAdded() local
198 assertThat(devices).contains(cachedDevice1); in addDevice_sameHiSyncId_validCachedDevices_mainDevicesAdded_subDevicesNotAdded()
199 assertThat(devices).doesNotContain(cachedDevice2); in addDevice_sameHiSyncId_validCachedDevices_mainDevicesAdded_subDevicesNotAdded()
212 Collection<CachedBluetoothDevice> devices = mCachedDeviceManager.getCachedDevicesCopy(); in addDevice_differentHiSyncId_validCachedDevices_bothAdded() local
213 assertThat(devices).contains(cachedDevice1); in addDevice_differentHiSyncId_validCachedDevices_bothAdded()
214 assertThat(devices).contains(cachedDevice2); in addDevice_differentHiSyncId_validCachedDevices_bothAdded()
231 final Collection<CachedBluetoothDevice> devices = in addDevice_addDuplicatedDevice_duplicateDeviceShouldNotAdded() local
[all …]
/frameworks/base/media/java/android/media/
DAudioSystem.java1831 public static String deviceSetToString(@NonNull Set<Integer> devices) { in deviceSetToString() argument
1834 for (Integer device : devices) { in deviceSetToString()
1855 final AudioDeviceAttributes[] devices = new AudioDeviceAttributes[MAX_DEVICE_ROUTING]; in getDevicesForAttributes() local
1856 final int res = getDevicesForAttributes(attributes, devices, forVolume); in getDevicesForAttributes()
1864 for (AudioDeviceAttributes device : devices) { in getDevicesForAttributes()
1879 @NonNull AudioDeviceAttributes[] devices, in getDevicesForAttributes() argument
2104 int strategy, int role, @NonNull List<AudioDeviceAttributes> devices) { in setDevicesRoleForStrategy() argument
2105 if (devices.isEmpty()) { in setDevicesRoleForStrategy()
2108 int[] types = new int[devices.size()]; in setDevicesRoleForStrategy()
2109 String[] addresses = new String[devices.size()]; in setDevicesRoleForStrategy()
[all …]
/frameworks/av/services/audiopolicy/engine/interface/
DEngineInterface.h339 const AudioDeviceTypeAddrVector &devices) = 0;
351 const AudioDeviceTypeAddrVector &devices) = 0;
376 AudioDeviceTypeAddrVector &devices) const = 0;
392 const AudioDeviceTypeAddrVector &devices) = 0;
407 const AudioDeviceTypeAddrVector &devices) = 0;
420 device_role_t role, const AudioDeviceTypeAddrVector& devices) = 0;
445 device_role_t role, AudioDeviceTypeAddrVector &devices) const = 0;
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/
DLocalMediaManagerTest.java246 final List<MediaDevice> devices = new ArrayList<>(); in onDeviceListAdded_addDevicesList() local
249 devices.add(device1); in onDeviceListAdded_addDevicesList()
250 devices.add(device2); in onDeviceListAdded_addDevicesList()
257 mLocalMediaManager.mMediaDeviceCallback.onDeviceListAdded(devices); in onDeviceListAdded_addDevicesList()
265 final List<MediaDevice> devices = new ArrayList<>(); in onDeviceListAdded_addDeviceList() local
269 devices.add(device1); in onDeviceListAdded_addDeviceList()
270 devices.add(device2); in onDeviceListAdded_addDeviceList()
279 mLocalMediaManager.mMediaDeviceCallback.onDeviceListAdded(devices); in onDeviceListAdded_addDeviceList()
287 final List<MediaDevice> devices = new ArrayList<>(); in onDeviceListRemoved_removeAll() local
290 devices.add(device1); in onDeviceListRemoved_removeAll()
[all …]
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbAlsaManager.java216 Stack<UsbAlsaDevice> devices = mAttachedDevices.get(deviceType); in addDeviceToAttachedDevicesMap() local
217 if (devices == null) { in addDeviceToAttachedDevicesMap()
219 devices = mAttachedDevices.get(deviceType); in addDeviceToAttachedDevicesMap()
221 devices.push(device); in addDeviceToAttachedDevicesMap()
231 Stack<UsbAlsaDevice> devices = mAttachedDevices.get(deviceType); in removeDeviceFromAttachedDevicesMap() local
232 if (devices == null) { in removeDeviceFromAttachedDevicesMap()
235 devices.remove(device); in removeDeviceFromAttachedDevicesMap()
236 if (devices.isEmpty()) { in removeDeviceFromAttachedDevicesMap()
258 Stack<UsbAlsaDevice> devices = mAttachedDevices.get(deviceType); in selectDefaultDevice() local
259 if (devices == null || devices.isEmpty()) { in selectDefaultDevice()
[all …]
/frameworks/av/services/audiopolicy/engineconfigurable/parameter-framework/examples/Phone/Settings/
Ddevice_for_product_strategy_phone.pfw91 # Fallback BT Sco devices in case of FORCE_BT_SCO
121 # Fallback BT Sco devices in case of FORCE_BT_SCO
151 # Fallback BT Sco devices in case of FORCE_BT_SCO
181 # Fallback BT Sco devices in case of FORCE_BT_SCO
208 # Fallback BT Sco devices in case of FORCE_BT_SCO
258 # Fallback BT Sco devices in case of FORCE_BT_SCO
296 # Fallback BT Sco devices in case of FORCE_BT_SCO
324 # Fallback BT Sco devices in case of FORCE_BT_SCO
352 # Fallback BT Sco devices in case of FORCE_BT_SCO
380 # Fallback BT Sco devices in case of FORCE_BT_SCO
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/
DMediaManager.java83 protected void dispatchDeviceListRemoved(List<MediaDevice> devices) { in dispatchDeviceListRemoved() argument
85 callback.onDeviceListRemoved(devices); in dispatchDeviceListRemoved()
115 void onDeviceListAdded(List<MediaDevice> devices); in onDeviceListAdded() argument
122 void onDeviceListRemoved(List<MediaDevice> devices); in onDeviceListRemoved() argument
/frameworks/base/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/src/com/android/hardware/usb/externalmanagementtest/
DUsbUtil.java33 HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in findAllPossibleAndroidDevices() local
35 for (UsbDevice device : devices.values()) { in findAllPossibleAndroidDevices()
79 HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in isDeviceConnected() local
80 for (UsbDevice dev : devices.values()) { in isDeviceConnected()
/frameworks/av/media/libaudiofoundation/
DAudioDeviceTypeAddr.cpp140 const AudioDeviceTypeAddrVector& devices, in excludeDeviceTypeAddrsFrom() argument
145 for (const auto& device : devices) { in excludeDeviceTypeAddrsFrom()
154 const AudioDeviceTypeAddrVector& devices, in joinDeviceTypeAddrs() argument
156 std::set<AudioDeviceTypeAddr> devicesSet(devices.begin(), devices.end()); in joinDeviceTypeAddrs()

123456789