aboutsummaryrefslogtreecommitdiff
path: root/service/src/com/android
diff options
context:
space:
mode:
authorHongwei Wang <hwwang@google.com>2018-06-20 02:07:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-06-20 02:07:06 +0000
commit743afde600b795dc95652c15ba921f7793a9a667 (patch)
tree8836dfcd3098688be1427319df4afb59e010e3ac /service/src/com/android
parentcf6d16cbadc4916e67c60573178791cf25b3ff09 (diff)
parentae66b13f9da852b6a78e1a6054b34641b12e7875 (diff)
downloadCar-743afde600b795dc95652c15ba921f7793a9a667.tar.gz
Merge "Ensure the initial volume when creating audio patch" into pi-dev
Diffstat (limited to 'service/src/com/android')
-rw-r--r--service/src/com/android/car/CarAudioService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/service/src/com/android/car/CarAudioService.java b/service/src/com/android/car/CarAudioService.java
index f3426c1f62..1f9fad0edf 100644
--- a/service/src/com/android/car/CarAudioService.java
+++ b/service/src/com/android/car/CarAudioService.java
@@ -719,6 +719,11 @@ public class CarAudioService extends ICarAudio.Stub implements CarServiceBase {
Preconditions.checkNotNull(patch[0],
"createAudioPatch didn't provide expected single handle");
Log.d(CarLog.TAG_AUDIO, "Audio patch created: " + patch[0]);
+
+ // Ensure the initial volume on output device port
+ int groupId = getVolumeGroupIdForUsage(usage);
+ setGroupVolume(groupId, getGroupVolume(groupId), 0);
+
return new CarAudioPatchHandle(patch[0]);
}