| Index: chromeos/audio/cras_audio_handler.cc
|
| diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc
|
| index 456ce6cc54414a3d9f937324eb8f8dd1988c5456..1fed1566b9bb639110f572e29ca8f820e7b5eca1 100644
|
| --- a/chromeos/audio/cras_audio_handler.cc
|
| +++ b/chromeos/audio/cras_audio_handler.cc
|
| @@ -1015,12 +1015,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;
|
|
|