Remove hidden Bluetooth dependencies

Bug: 217736913
Test: pre-submit
Change-Id: Ib4e12e8e350ffa08b48f58e8256991d7ed4fa013
This commit is contained in:
William Escande
2022-02-16 20:00:59 +01:00
parent 5d17cfd938
commit a95180f228
6 changed files with 17 additions and 6 deletions

View File

@@ -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));

View File

@@ -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));

View File

@@ -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));