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

Commit 880b201d authored by Hsin-yu Chao's avatar Hsin-yu Chao Committed by Gerrit Code Review
Browse files

Merge "Fix incorrect previous active device" into main

parents 4253e1cd 5ebfd59c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1415,6 +1415,7 @@ public class HeadsetService extends ProfileService {
            }

            // Make sure the Audio Manager knows the previous active device is no longer active.
            BluetoothDevice previousActiveDevice = mActiveDevice;
            mActiveDevice = null;
            mNativeInterface.setActiveDevice(null);
            if (Utils.isScoManagedByAudioEnabled()) {
@@ -1422,7 +1423,7 @@ public class HeadsetService extends ProfileService {
                        .getAudioManager()
                        .handleBluetoothActiveDeviceChanged(
                                null,
                                mActiveDevice,
                                previousActiveDevice,
                                BluetoothProfileConnectionInfo.createHfpInfo());
            } else {
                broadcastActiveDevice(null);