Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1002)

Unified Diff: chromeos/audio/cras_audio_handler.cc

Issue 1268593002: Fix the UI issue for showing output muted in ash tray after the device wakes up with hdmi output re… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/audio/cras_audio_handler.h ('k') | chromeos/audio/cras_audio_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/audio/cras_audio_handler.cc
diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc
index 1cf03d172d839ca39cce2294492d4dc5e7a9cae5..8ee6009f35c69e6ee1ec3070716b5bf75654fd30 100644
--- a/chromeos/audio/cras_audio_handler.cc
+++ b/chromeos/audio/cras_audio_handler.cc
@@ -69,8 +69,9 @@ void CrasAudioHandler::AudioObserver::OnInputNodeGainChanged(
int /* gain */) {
}
-void CrasAudioHandler::AudioObserver::OnOutputMuteChanged(bool /* mute_on */) {
-}
+void CrasAudioHandler::AudioObserver::OnOutputMuteChanged(
+ bool /* mute_on */,
+ bool /* system_adjust */) {}
void CrasAudioHandler::AudioObserver::OnInputMuteChanged(bool /* mute_on */) {
}
@@ -370,8 +371,9 @@ void CrasAudioHandler::SetOutputMute(bool mute_on) {
}
}
- FOR_EACH_OBSERVER(AudioObserver, observers_,
- OnOutputMuteChanged(output_mute_on_));
+ FOR_EACH_OBSERVER(
+ AudioObserver, observers_,
+ OnOutputMuteChanged(output_mute_on_, false /* system_adjust */));
}
void CrasAudioHandler::AdjustOutputVolumeToAudibleLevel() {
@@ -1014,8 +1016,13 @@ void CrasAudioHandler::UpdateAudioAfterHDMIRediscoverGracePeriod() {
hdmi_rediscovering_ = false;
if (!IsOutputMutedForDevice(active_output_node_id_)) {
// Unmute the audio output after the HDMI transition period.
- VLOG(1) << "Unmute output after HDMI rediscovring grace period.";
+ VLOG(1) << "Unmute output after HDMI rediscovering grace period.";
SetOutputMuteInternal(false);
+
+ // Notify UI about the mute state change.
+ FOR_EACH_OBSERVER(
+ AudioObserver, observers_,
+ OnOutputMuteChanged(output_mute_on_, true /* system adjustment */));
}
}
« no previous file with comments | « chromeos/audio/cras_audio_handler.h ('k') | chromeos/audio/cras_audio_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698