Lines Matching refs:device
67 TELEPHONY_LOGE("device callback nullptr");
77 TELEPHONY_LOGI("device callback nullptr");
87 TELEPHONY_LOGI("bluetooth device is already active");
121 TELEPHONY_LOGI("wired headset device is already active");
139 TELEPHONY_LOGI("earpiece device is already active");
295 int32_t AudioProxy::GetPreferredOutputAudioDevice(AudioDevice &device)
314 device.deviceType = AudioDeviceType::DEVICE_BLUETOOTH_SCO;
315 if (memset_s(&device.address, kMaxAddressLen + 1, 0, kMaxAddressLen + 1) != EOK ||
316 memset_s(&device.deviceName, kMaxDeviceNameLen + 1, 0, kMaxDeviceNameLen + 1) != EOK) {
320 if (memcpy_s(device.address, kMaxAddressLen, desc[0]->macAddress_.c_str(),
322 memcpy_s(&device.deviceName, kMaxDeviceNameLen, desc[0]->deviceName_.c_str(),
329 device.deviceType = AudioDeviceType::DEVICE_EARPIECE;
332 device.deviceType = AudioDeviceType::DEVICE_SPEAKER;
337 device.deviceType = AudioDeviceType::DEVICE_WIRED_HEADSET;
381 AudioDevice device;
387 TELEPHONY_LOGI("has already switch to distributed communication device");
398 if (!SetBluetoothDevice(device, desc)) {
401 DelayedSingleton<AudioDeviceManager>::GetInstance()->SetCurrentAudioDevice(device);
404 device.deviceType = AudioDeviceType::DEVICE_EARPIECE;
405 DelayedSingleton<AudioDeviceManager>::GetInstance()->SetCurrentAudioDevice(device.deviceType);
408 device.deviceType = AudioDeviceType::DEVICE_SPEAKER;
409 DelayedSingleton<AudioDeviceManager>::GetInstance()->SetCurrentAudioDevice(device.deviceType);
414 device.deviceType = AudioDeviceType::DEVICE_WIRED_HEADSET;
417 DelayedSingleton<AudioDeviceManager>::GetInstance()->SetCurrentAudioDevice(device.deviceType);
428 bool AudioPreferDeviceChangeCallback::SetBluetoothDevice(AudioDevice &device,
431 device.deviceType = AudioDeviceType::DEVICE_BLUETOOTH_SCO;
432 if (memset_s(&device.address, kMaxAddressLen + 1, 0, kMaxAddressLen + 1) != EOK ||
433 memset_s(&device.deviceName, kMaxDeviceNameLen + 1, 0, kMaxDeviceNameLen + 1) != EOK) {
437 if (memcpy_s(device.address, kMaxAddressLen, desc[0]->macAddress_.c_str(),
439 memcpy_s(device.deviceName, kMaxDeviceNameLen, desc[0]->deviceName_.c_str(),
460 TELEPHONY_LOGI("switch to distributed audio device");