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

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

Merge "LeAudioService: Handle AudioManager removing Active device" into main...

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

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2762306



Change-Id: Ia91b6ef6f0ca0d00500b5ae80911fd120bc45038
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 80791c37 efc6ccb4
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);
            }
            }
        }
        }
    }
    }