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

Commit fe0fd900 authored by William Escande's avatar William Escande
Browse files

Use the systemService for Bluetooth

Bug: 216476895
Test: Build + boot
Change-Id: I1d912f13a624f9a55e887b3843be8bfb22860688
parent 81c03370
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ public class TelecomSystem {
                        }
                    });
            BluetoothDeviceManager bluetoothDeviceManager = new BluetoothDeviceManager(mContext,
                    new BluetoothManager(mContext).getAdapter());
                    mContext.getSystemService(BluetoothManager.class).getAdapter());
            BluetoothRouteManager bluetoothRouteManager = new BluetoothRouteManager(mContext, mLock,
                    bluetoothDeviceManager, new Timeouts.Adapter());
            BluetoothStateReceiver bluetoothStateReceiver = new BluetoothStateReceiver(
+2 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import android.app.AppOpsManager;
import android.bluetooth.BluetoothManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -348,6 +349,7 @@ public class TelecomSystemTest extends TelecomTestCase {
        doNothing().when(mSpyContext).sendBroadcastAsUser(any(), any(), any());

        doReturn(mock(AppOpsManager.class)).when(mSpyContext).getSystemService(AppOpsManager.class);
        doReturn(mock(BluetoothManager.class)).when(mSpyContext).getSystemService(BluetoothManager.class);

        mHandlerThread = new HandlerThread("TelecomHandlerThread");
        mHandlerThread.start();