From d92f2f7c465804eaeab9c4b125c410914cd14a9c Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Tue, 23 Aug 2022 18:29:26 +0200 Subject: [PATCH] AudioDeviceBroker: fix communication client death Make sure that SCO audio is deactivated when a communication route client dies. Previous implementation was just removing the client from the list and updating the current route but wihout requesting the BT Helper to stop SCO. Bug: 243096994 Test: repro steps i nthe bug Change-Id: I09d0e4965933d70e815abe4a24fd3060f0a11564 --- .../core/java/com/android/server/audio/AudioDeviceBroker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java index 82fe6c6654dab..2b8d6a33bb1b1 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java +++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java @@ -1770,8 +1770,8 @@ import java.util.concurrent.atomic.AtomicBoolean; return; } Log.w(TAG, "Communication client died"); - removeCommunicationRouteClient(client.getBinder(), true); - onUpdateCommunicationRouteClient("onCommunicationRouteClientDied"); + setCommunicationRouteForClient(client.getBinder(), client.getPid(), null, + BtHelper.SCO_MODE_UNDEFINED, "onCommunicationRouteClientDied"); } /**