Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0985381 authored by Wenyu Zhang's avatar Wenyu Zhang Committed by Gerrit Code Review
Browse files

Merge "Inform AudioManager when hfp is disconnected" into main

parents 71740aae 0c4f06b7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1395,6 +1395,17 @@ public class HeadsetService extends ProfileService {
                                    + disconnectStatus);
                }
            }

            // Make sure the Audio Manager knows the previous active device is no longer active.
            if (Utils.isScoManagedByAudioEnabled()) {
                mSystemInterface
                    .getAudioManager()
                    .handleBluetoothActiveDeviceChanged(
                        null,
                        mActiveDevice,
                        BluetoothProfileConnectionInfo.createHfpInfo());
            }

            mActiveDevice = null;
            mNativeInterface.setActiveDevice(null);
            broadcastActiveDevice(null);