From 485e7e13f410072c7c79368338ec3eba92c39169 Mon Sep 17 00:00:00 2001 From: Wonsik Kim Date: Mon, 26 Jan 2015 17:28:55 +0900 Subject: [PATCH] TIF: fix loud volume after input switch when volume is 0 Bug: 19134440 Change-Id: I6291f299a27315e79b505ea36bf96c79437e6b53 --- .../java/com/android/server/tv/TvInputHardwareManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/tv/TvInputHardwareManager.java b/services/core/java/com/android/server/tv/TvInputHardwareManager.java index 2af56fe3e1197..50b22624421ba 100644 --- a/services/core/java/com/android/server/tv/TvInputHardwareManager.java +++ b/services/core/java/com/android/server/tv/TvInputHardwareManager.java @@ -677,7 +677,9 @@ class TvInputHardwareManager implements TvInputHal.Callback { private AudioDevicePort mAudioSource; private List mAudioSink = new ArrayList<>(); private AudioPatch mAudioPatch = null; - private float mCommittedVolume = 0.0f; + // Set to an invalid value for a volume, so that current volume can be applied at the + // first call to updateAudioConfigLocked(). + private float mCommittedVolume = -1f; private float mSourceVolume = 0.0f; private TvStreamConfig mActiveConfig = null;