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

Commit 5e050787 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Disable A2DP source for automotive under certain conditions" into main

parents af08f8f2 a89c1892
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)) {