Loading android/app/src/com/android/bluetooth/btservice/ActiveDeviceManager.java +2 −6 Original line number Diff line number Diff line Loading @@ -679,14 +679,10 @@ public class ActiveDeviceManager implements AdapterService.BluetoothStateCallbac && mAdapterService.isAllSupportedClassicAudioProfilesActive(device)) { setLeAudioActiveDevice(device); } else { if (Flags.leaudioResumeActiveAfterHfpHandover()) { if (device != null) { // remove LE audio active device when it is not null, and not dual mode setLeAudioActiveDevice(null, true); } } else { setLeAudioActiveDevice(null, true); } } } // Just assign locally the new value Loading android/app/src/com/android/bluetooth/hfp/HeadsetService.java +11 −24 Original line number Diff line number Diff line Loading @@ -1429,9 +1429,7 @@ public class HeadsetService extends ProfileService { */ if (mSystemInterface.isInCall() || mSystemInterface.isRinging()) { LeAudioService leAudioService = mFactory.getLeAudioService(); if (leAudioService != null && !leAudioService.getConnectedDevices().isEmpty() && Flags.leaudioResumeActiveAfterHfpHandover()) { if (leAudioService != null && !leAudioService.getConnectedDevices().isEmpty()) { Log.i(TAG, "Make sure no le audio device active for HFP handover."); leAudioService.setInactiveForHfpHandover(mActiveDevice); } Loading Loading @@ -1464,15 +1462,6 @@ public class HeadsetService extends ProfileService { updateInbandRinging(device, true); } } else if (shouldPersistAudio()) { /* If HFP is getting active for a phonecall and there is LeAudio device active, * Lets inactive LeAudio device as soon as possible so there is no CISes connected * when SCO is created */ LeAudioService leAudioService = mFactory.getLeAudioService(); if (leAudioService != null && !Flags.leaudioResumeActiveAfterHfpHandover()) { Log.i(TAG, "Make sure there is no le audio device active."); leAudioService.setInactiveForHfpHandover(mActiveDevice); } if (Utils.isScoManagedByAudioEnabled()) { // tell Audio Framework that active device changed mSystemInterface Loading Loading @@ -2357,7 +2346,6 @@ public class HeadsetService extends ProfileService { // Resumes LE audio previous active device if HFP handover happened before. // Do it here because some controllers cannot handle SCO and CIS // co-existence see {@link LeAudioService#setInactiveForHfpHandover} if (Flags.leaudioResumeActiveAfterHfpHandover()) { LeAudioService leAudioService = mFactory.getLeAudioService(); boolean isLeAudioConnectedDeviceNotActive = leAudioService != null && !leAudioService.getConnectedDevices().isEmpty() Loading @@ -2369,7 +2357,6 @@ public class HeadsetService extends ProfileService { && isLeAudioConnectedDeviceNotActive) { leAudioService.setActiveAfterHfpHandover(); } } // Unsuspend A2DP when SCO connection is gone and call state is idle if (mSystemInterface.isCallIdle() && !Utils.isScoManagedByAudioEnabled()) { Loading android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +2 −4 Original line number Diff line number Diff line Loading @@ -4344,10 +4344,8 @@ public class LeAudioService extends ProfileService { } if (getActiveGroupId() != LE_AUDIO_GROUP_ID_INVALID) { mHfpHandoverDevice = hfpHandoverDevice; if (Flags.leaudioResumeActiveAfterHfpHandover()) { // record the lead device mLeAudioDeviceInactivatedForHfpHandover = mExposedActiveDevice; } removeActiveDevice(true); } } Loading android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -1558,7 +1558,6 @@ public class HeadsetServiceAndStateMachineTest { @Test public void testHfpOnlyHandoverToLeAudioAfterScoDisconnect() { BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); mSetFlagsRule.enableFlags(Flags.FLAG_LEAUDIO_RESUME_ACTIVE_AFTER_HFP_HANDOVER); assertThat(mHeadsetService.mFactory).isNotNull(); mHeadsetService.mFactory = mServiceFactory; Loading flags/leaudio.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -95,16 +95,6 @@ flag { } } flag { name: "leaudio_resume_active_after_hfp_handover" namespace: "bluetooth" description: "Fix for if HFP- LE Audio handover happened, LE audio resume active after the call" bug: "331468678" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "leaudio_allow_leaudio_only_devices" namespace: "bluetooth" Loading Loading
android/app/src/com/android/bluetooth/btservice/ActiveDeviceManager.java +2 −6 Original line number Diff line number Diff line Loading @@ -679,14 +679,10 @@ public class ActiveDeviceManager implements AdapterService.BluetoothStateCallbac && mAdapterService.isAllSupportedClassicAudioProfilesActive(device)) { setLeAudioActiveDevice(device); } else { if (Flags.leaudioResumeActiveAfterHfpHandover()) { if (device != null) { // remove LE audio active device when it is not null, and not dual mode setLeAudioActiveDevice(null, true); } } else { setLeAudioActiveDevice(null, true); } } } // Just assign locally the new value Loading
android/app/src/com/android/bluetooth/hfp/HeadsetService.java +11 −24 Original line number Diff line number Diff line Loading @@ -1429,9 +1429,7 @@ public class HeadsetService extends ProfileService { */ if (mSystemInterface.isInCall() || mSystemInterface.isRinging()) { LeAudioService leAudioService = mFactory.getLeAudioService(); if (leAudioService != null && !leAudioService.getConnectedDevices().isEmpty() && Flags.leaudioResumeActiveAfterHfpHandover()) { if (leAudioService != null && !leAudioService.getConnectedDevices().isEmpty()) { Log.i(TAG, "Make sure no le audio device active for HFP handover."); leAudioService.setInactiveForHfpHandover(mActiveDevice); } Loading Loading @@ -1464,15 +1462,6 @@ public class HeadsetService extends ProfileService { updateInbandRinging(device, true); } } else if (shouldPersistAudio()) { /* If HFP is getting active for a phonecall and there is LeAudio device active, * Lets inactive LeAudio device as soon as possible so there is no CISes connected * when SCO is created */ LeAudioService leAudioService = mFactory.getLeAudioService(); if (leAudioService != null && !Flags.leaudioResumeActiveAfterHfpHandover()) { Log.i(TAG, "Make sure there is no le audio device active."); leAudioService.setInactiveForHfpHandover(mActiveDevice); } if (Utils.isScoManagedByAudioEnabled()) { // tell Audio Framework that active device changed mSystemInterface Loading Loading @@ -2357,7 +2346,6 @@ public class HeadsetService extends ProfileService { // Resumes LE audio previous active device if HFP handover happened before. // Do it here because some controllers cannot handle SCO and CIS // co-existence see {@link LeAudioService#setInactiveForHfpHandover} if (Flags.leaudioResumeActiveAfterHfpHandover()) { LeAudioService leAudioService = mFactory.getLeAudioService(); boolean isLeAudioConnectedDeviceNotActive = leAudioService != null && !leAudioService.getConnectedDevices().isEmpty() Loading @@ -2369,7 +2357,6 @@ public class HeadsetService extends ProfileService { && isLeAudioConnectedDeviceNotActive) { leAudioService.setActiveAfterHfpHandover(); } } // Unsuspend A2DP when SCO connection is gone and call state is idle if (mSystemInterface.isCallIdle() && !Utils.isScoManagedByAudioEnabled()) { Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +2 −4 Original line number Diff line number Diff line Loading @@ -4344,10 +4344,8 @@ public class LeAudioService extends ProfileService { } if (getActiveGroupId() != LE_AUDIO_GROUP_ID_INVALID) { mHfpHandoverDevice = hfpHandoverDevice; if (Flags.leaudioResumeActiveAfterHfpHandover()) { // record the lead device mLeAudioDeviceInactivatedForHfpHandover = mExposedActiveDevice; } removeActiveDevice(true); } } Loading
android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -1558,7 +1558,6 @@ public class HeadsetServiceAndStateMachineTest { @Test public void testHfpOnlyHandoverToLeAudioAfterScoDisconnect() { BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); mSetFlagsRule.enableFlags(Flags.FLAG_LEAUDIO_RESUME_ACTIVE_AFTER_HFP_HANDOVER); assertThat(mHeadsetService.mFactory).isNotNull(); mHeadsetService.mFactory = mServiceFactory; Loading
flags/leaudio.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -95,16 +95,6 @@ flag { } } flag { name: "leaudio_resume_active_after_hfp_handover" namespace: "bluetooth" description: "Fix for if HFP- LE Audio handover happened, LE audio resume active after the call" bug: "331468678" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "leaudio_allow_leaudio_only_devices" namespace: "bluetooth" Loading