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

Commit bb4a2f88 authored by Sungsoo Lim's avatar Sungsoo Lim Committed by Gerrit Code Review
Browse files

Merge "Clone ActiveDeviceManager to AudioRoutingManager" into main

parents 28780ab6 143e582e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -973,6 +973,7 @@ public class ActiveDeviceManager implements AdapterService.BluetoothStateCallbac
     *
     * @return true when the fallback device is activated, false otherwise
     */
    @GuardedBy("mLock")
    private boolean setFallbackDeviceActiveLocked() {
        if (DBG) {
            Log.d(TAG, "setFallbackDeviceActive");
@@ -1149,7 +1150,8 @@ public class ActiveDeviceManager implements AdapterService.BluetoothStateCallbac
        return mLeAudioActiveDevice;
    }

    long getHearingAidActiveHiSyncIdLocked() {
    @GuardedBy("mLock")
    private long getHearingAidActiveHiSyncIdLocked() {
        final HearingAidService hearingAidService = mFactory.getHearingAidService();
        if (hearingAidService != null && !mHearingAidActiveDevices.isEmpty()) {
            return hearingAidService.getHiSyncId(mHearingAidActiveDevices.iterator().next());
+6 −1
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ import android.util.SparseArray;

import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.Flags;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
import com.android.bluetooth.a2dp.A2dpService;
@@ -701,7 +702,11 @@ 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 = new SilenceDeviceManager(this, new ServiceFactory(), mLooper);