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

Commit 0a1b0a7e authored by William Escande's avatar William Escande Committed by Automerger Merge Worker
Browse files

Merge "audio_routing_centralization: rm flag and revert" into main am: ec52808e

parents c26d25a3 ec52808e
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -59,7 +59,6 @@ import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.ActiveDeviceManager;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.AudioRoutingManager;
import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.btservice.ServiceFactory;
@@ -1298,13 +1297,11 @@ public class A2dpService extends ProfileService {
        if (toState == BluetoothProfile.STATE_CONNECTED) {
            MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.A2DP);
        }
        if (!Flags.audioRoutingCentralization()) {
        // Set the active device if only one connected device is supported and it was connected
        if (toState == BluetoothProfile.STATE_CONNECTED && (mMaxConnectedAudioDevices == 1)) {
            setActiveDevice(device);
        }
        // When disconnected, ActiveDeviceManager will call setActiveDevice(null)
        }

        // Check if the device is disconnected - if unbond, remove the state machine
        if (toState == BluetoothProfile.STATE_DISCONNECTED) {
@@ -1443,11 +1440,6 @@ public class A2dpService extends ProfileService {
            if (service == null) {
                return false;
            }
            if (Flags.audioRoutingCentralization()) {
                return ((AudioRoutingManager) service.getActiveDeviceManager())
                        .activateDeviceProfile(device, BluetoothProfile.A2DP)
                        .join();
            }

            if (device == null) {
                return service.removeActiveDevice(false);
+1 −5
Original line number Diff line number Diff line
@@ -720,11 +720,7 @@ public class AdapterService extends Service {
            Log.i(TAG, "Phone policy disabled");
        }

        if (Flags.audioRoutingCentralization()) {
            mActiveDeviceManager = new AudioRoutingManager(this, new ServiceFactory());
        } else {
        mActiveDeviceManager = new ActiveDeviceManager(this, new ServiceFactory());
        }
        mActiveDeviceManager.start();

        mSilenceDeviceManager.start();
Loading