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

Commit 8dbbe887 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use the systemService for Bluetooth" am: 00493576

Original change: https://android-review.googlesource.com/c/platform/packages/services/Telecomm/+/1970895

Change-Id: I1a52e36287127e71a57e5dab1e387ca5d6fb1a94
parents c2d2027a 00493576
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -233,7 +233,7 @@ public class TelecomSystem {
                        }
                        }
                    });
                    });
            BluetoothDeviceManager bluetoothDeviceManager = new BluetoothDeviceManager(mContext,
            BluetoothDeviceManager bluetoothDeviceManager = new BluetoothDeviceManager(mContext,
                    new BluetoothManager(mContext).getAdapter());
                    mContext.getSystemService(BluetoothManager.class).getAdapter());
            BluetoothRouteManager bluetoothRouteManager = new BluetoothRouteManager(mContext, mLock,
            BluetoothRouteManager bluetoothRouteManager = new BluetoothRouteManager(mContext, mLock,
                    bluetoothDeviceManager, new Timeouts.Adapter());
                    bluetoothDeviceManager, new Timeouts.Adapter());
            BluetoothStateReceiver bluetoothStateReceiver = new BluetoothStateReceiver(
            BluetoothStateReceiver bluetoothStateReceiver = new BluetoothStateReceiver(
+2 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.when;


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


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


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