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

Commit fb617861 authored by Rongxuan Liu's avatar Rongxuan Liu
Browse files

[le audio] Broadcast reset saved fallback active device

Followup CL to address comment from aosp/2908958. We'd need to reset
this device at service start() and stop().

Bug: 319939252
Bug: 316005152
Test: atest LeAudioServiceTest
Test: manual test with new UI and switch active device during broadcast
Change-Id: I525b061a0a87bbdb1e859c4af648c70295c69fa7
parent 4988757b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -372,7 +372,8 @@ public class LeAudioService extends ProfileService {

        mAudioManager.registerAudioDeviceCallback(mAudioManagerAudioDeviceCallback,
                       mHandler);

        // clear mUnicastGroupIdDeactivatedForBroadcastTransition to default
        updateFallbackUnicastGroupIdForBroadcast(LE_AUDIO_GROUP_ID_INVALID);
        // Mark service as started
        setLeAudioService(this);

@@ -499,7 +500,8 @@ public class LeAudioService extends ProfileService {
        }

        mAudioManager.unregisterAudioDeviceCallback(mAudioManagerAudioDeviceCallback);

        // clear mUnicastGroupIdDeactivatedForBroadcastTransition to default
        updateFallbackUnicastGroupIdForBroadcast(LE_AUDIO_GROUP_ID_INVALID);
        mAdapterService = null;
        mAudioManager = null;
        mMcpService = null;