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

Commit 05bed71d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Disable A2DP source for automotive under certain conditions" into main am: 5e050787

parents aeb1cfe4 5e050787
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import com.android.bluetooth.avrcpcontroller.AvrcpControllerService;
import com.android.bluetooth.bas.BatteryService;
import com.android.bluetooth.bass_client.BassClientService;
import com.android.bluetooth.csip.CsipSetCoordinatorService;
import com.android.bluetooth.flags.Flags;
import com.android.bluetooth.gatt.GattService;
import com.android.bluetooth.hap.HapClientService;
import com.android.bluetooth.hearingaid.HearingAidService;
@@ -165,6 +166,16 @@ public class Config {
            }
        }

        // TODO: b/321806163 Cleanup post the flag cleanup.
        // Disable A2DP source profile for automotive devices only if sink is enabled and
        // concurrent support is not enabled.
        if (!Flags.a2dpConcurrentSourceSink()
                && Utils.isAutomotive(ctx)
                && A2dpSinkService.isEnabled()) {
            setProfileEnabled(BluetoothProfile.A2DP, false);
            setProfileEnabled(BluetoothProfile.AVRCP, false);
        }

        // Disable ASHA if BLE is not supported on this platform even if the platform enabled ASHA
        // accidentally
        if (!Utils.isBleSupported(ctx)) {