| Index: chromeos/audio/cras_audio_handler.cc
|
| diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc
|
| index a8f8036134ead71310d5a6748f4230045971f1f3..6a12d344cf4e662c2368882f380ed6b82867c889 100644
|
| --- a/chromeos/audio/cras_audio_handler.cc
|
| +++ b/chromeos/audio/cras_audio_handler.cc
|
| @@ -1016,12 +1016,18 @@ bool CrasAudioHandler::GetActiveDeviceFromUserPref(bool is_input,
|
|
|
| bool active = false;
|
| bool activate_by_user = false;
|
| + // If the device entry is not found in prefs, it is likley a new audio
|
| + // device plugged in after the cros is powered down. We should ignore the
|
| + // previously saved active device, and select the active device by priority.
|
| + // crbug.com/622045.
|
| if (!audio_pref_handler_->GetDeviceActive(device, &active,
|
| - &activate_by_user) ||
|
| - !active) {
|
| - continue;
|
| + &activate_by_user)) {
|
| + return false;
|
| }
|
|
|
| + if (!active)
|
| + continue;
|
| +
|
| if (!found_active_device) {
|
| found_active_device = true;
|
| *active_device = device;
|
|
|