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

Commit efc6ccb4 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Automerger Merge Worker
Browse files

Merge "LeAudioService: Handle AudioManager removing Active device" into main am: 2070c387

parents 089ceb11 2070c387
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -1354,7 +1354,8 @@ public class LeAudioService extends ProfileService {
                    continue;
                    continue;
                }
                }


                mExposedActiveDevice = null;
                byte[] addressBytes = Utils.getBytesFromAddress(address);
                BluetoothDevice device = mAdapterService.getDeviceFromByte(addressBytes);


                if (DBG) {
                if (DBG) {
                    Log.d(TAG, " onAudioDevicesRemoved: " + address + ", device type: "
                    Log.d(TAG, " onAudioDevicesRemoved: " + address + ", device type: "
@@ -1363,6 +1364,14 @@ public class LeAudioService extends ProfileService {
                            + ", mActiveAudioInDevice: " + mActiveAudioInDevice
                            + ", mActiveAudioInDevice: " + mActiveAudioInDevice
                            + ", mActiveAudioOutDevice: " +  mActiveAudioOutDevice);
                            + ", mActiveAudioOutDevice: " +  mActiveAudioOutDevice);
                }
                }

                if (device != mExposedActiveDevice) {
                    continue;
                }

                Log.i(TAG, "Audio manager disactivate LeAudio device " + mExposedActiveDevice);
                mExposedActiveDevice = null;
                setActiveDevice(null);
            }
            }
        }
        }
    }
    }