Loading android/app/src/com/android/bluetooth/btservice/Config.java +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ public class Config { boolean supported = false; if (config.mClass == HearingAidService.class) { supported = BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false); } else { supported = resources.getBoolean(config.mSupported); } Loading android/app/tests/unit/src/com/android/bluetooth/btservice/ActiveDeviceManagerTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -220,7 +220,7 @@ public class ActiveDeviceManagerTest { @Test public void hearingAidActive_clearA2dpAndHeadsetActive() { Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); a2dpConnected(mA2dpHeadsetDevice); headsetConnected(mA2dpHeadsetDevice); Loading @@ -238,7 +238,7 @@ public class ActiveDeviceManagerTest { @Test public void hearingAidActive_dontSetA2dpAndHeadsetActive() { Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); hearingAidActiveDeviceChanged(mHearingAidDevice); a2dpConnected(mA2dpHeadsetDevice); Loading @@ -255,7 +255,7 @@ public class ActiveDeviceManagerTest { @Test public void hearingAidActive_setA2dpActiveExplicitly() { Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); hearingAidActiveDeviceChanged(mHearingAidDevice); a2dpConnected(mA2dpHeadsetDevice); Loading @@ -275,7 +275,7 @@ public class ActiveDeviceManagerTest { @Test public void hearingAidActive_setHeadsetActiveExplicitly() { Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); hearingAidActiveDeviceChanged(mHearingAidDevice); headsetConnected(mA2dpHeadsetDevice); Loading android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ public class AdapterServiceTest { Process.myUid()).build(); private final boolean hearingAidSupported = BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false); private PowerManager mPowerManager; private PermissionCheckerManager mPermissionCheckerManager; Loading android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ public class HearingAidServiceTest { public void setUp() throws Exception { mTargetContext = InstrumentationRegistry.getTargetContext(); Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); // Set up mocks and test assets MockitoAnnotations.initMocks(this); Loading Loading @@ -127,7 +127,7 @@ public class HearingAidServiceTest { @After public void tearDown() throws Exception { if (!BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)) { if (!BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)) { return; } stopService(); Loading android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidStateMachineTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class HearingAidStateMachineTest { public void setUp() throws Exception { mTargetContext = InstrumentationRegistry.getTargetContext(); Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); // Set up mocks and test assets MockitoAnnotations.initMocks(this); TestUtils.setAdapterService(mAdapterService); Loading @@ -86,7 +86,7 @@ public class HearingAidStateMachineTest { @After public void tearDown() throws Exception { if (!BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)) { if (!BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)) { return; } mHearingAidStateMachine.doQuit(); Loading Loading
android/app/src/com/android/bluetooth/btservice/Config.java +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ public class Config { boolean supported = false; if (config.mClass == HearingAidService.class) { supported = BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false); } else { supported = resources.getBoolean(config.mSupported); } Loading
android/app/tests/unit/src/com/android/bluetooth/btservice/ActiveDeviceManagerTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -220,7 +220,7 @@ public class ActiveDeviceManagerTest { @Test public void hearingAidActive_clearA2dpAndHeadsetActive() { Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); a2dpConnected(mA2dpHeadsetDevice); headsetConnected(mA2dpHeadsetDevice); Loading @@ -238,7 +238,7 @@ public class ActiveDeviceManagerTest { @Test public void hearingAidActive_dontSetA2dpAndHeadsetActive() { Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); hearingAidActiveDeviceChanged(mHearingAidDevice); a2dpConnected(mA2dpHeadsetDevice); Loading @@ -255,7 +255,7 @@ public class ActiveDeviceManagerTest { @Test public void hearingAidActive_setA2dpActiveExplicitly() { Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); hearingAidActiveDeviceChanged(mHearingAidDevice); a2dpConnected(mA2dpHeadsetDevice); Loading @@ -275,7 +275,7 @@ public class ActiveDeviceManagerTest { @Test public void hearingAidActive_setHeadsetActiveExplicitly() { Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); hearingAidActiveDeviceChanged(mHearingAidDevice); headsetConnected(mA2dpHeadsetDevice); Loading
android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ public class AdapterServiceTest { Process.myUid()).build(); private final boolean hearingAidSupported = BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false); private PowerManager mPowerManager; private PermissionCheckerManager mPermissionCheckerManager; Loading
android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ public class HearingAidServiceTest { public void setUp() throws Exception { mTargetContext = InstrumentationRegistry.getTargetContext(); Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); // Set up mocks and test assets MockitoAnnotations.initMocks(this); Loading Loading @@ -127,7 +127,7 @@ public class HearingAidServiceTest { @After public void tearDown() throws Exception { if (!BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)) { if (!BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)) { return; } stopService(); Loading
android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidStateMachineTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class HearingAidStateMachineTest { public void setUp() throws Exception { mTargetContext = InstrumentationRegistry.getTargetContext(); Assume.assumeTrue("Ignore test when HearingAidService is not enabled", BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)); BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)); // Set up mocks and test assets MockitoAnnotations.initMocks(this); TestUtils.setAdapterService(mAdapterService); Loading @@ -86,7 +86,7 @@ public class HearingAidStateMachineTest { @After public void tearDown() throws Exception { if (!BluetoothProperties.audioStreamingForHearingAidSupported().orElse(false)) { if (!BluetoothProperties.isProfileAshaCentralEnabled().orElse(false)) { return; } mHearingAidStateMachine.doQuit(); Loading