Remove hidden Bluetooth dependencies
Bug: 217736913 Test: pre-submit Change-Id: Ib4e12e8e350ffa08b48f58e8256991d7ed4fa013
This commit is contained in:
@@ -137,7 +137,7 @@ public class AudioOutputSwitchPreferenceControllerTest {
|
||||
mPackageManager = Shadow.extract(mContext.getPackageManager());
|
||||
mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, true);
|
||||
|
||||
mBluetoothManager = new BluetoothManager(mContext);
|
||||
mBluetoothManager = mContext.getSystemService(BluetoothManager.class);
|
||||
mBluetoothAdapter = mBluetoothManager.getAdapter();
|
||||
|
||||
mBluetoothDevice = spy(mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS_1));
|
||||
|
@@ -129,7 +129,7 @@ public class HandsFreeProfileOutputPreferenceControllerTest {
|
||||
when(mLocalBluetoothProfileManager.getHeadsetProfile()).thenReturn(mHeadsetProfile);
|
||||
when(mLocalBluetoothProfileManager.getHearingAidProfile()).thenReturn(mHearingAidProfile);
|
||||
|
||||
mBluetoothManager = new BluetoothManager(mContext);
|
||||
mBluetoothManager = mContext.getSystemService(BluetoothManager.class);
|
||||
mBluetoothAdapter = mBluetoothManager.getAdapter();
|
||||
|
||||
mBluetoothDevice = spy(mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS_1));
|
||||
|
@@ -170,7 +170,7 @@ public class MediaOutputPreferenceControllerTest {
|
||||
when(mLocalBluetoothProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile);
|
||||
when(mLocalBluetoothProfileManager.getHearingAidProfile()).thenReturn(mHearingAidProfile);
|
||||
|
||||
mBluetoothManager = new BluetoothManager(mContext);
|
||||
mBluetoothManager = mContext.getSystemService(BluetoothManager.class);
|
||||
mBluetoothAdapter = mBluetoothManager.getAdapter();
|
||||
|
||||
mBluetoothDevice = spy(mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS_1));
|
||||
|
Reference in New Issue
Block a user