Make HearingAid code more generic

-handle UI updating when sub device connection state changes
-add test case

Bug: 112735753
Test: make -j42 RunSettingsRoboTests
Change-Id: Ie2643657c47a0956aac3f8cac4bfdbdea0399ce8
This commit is contained in:
timhypeng
2018-10-09 11:19:23 +08:00
committed by Hugh Chen
parent 2f5200ea5a
commit c95056d7b5
5 changed files with 36 additions and 7 deletions

View File

@@ -72,7 +72,7 @@ public class BluetoothDetailsHeaderControllerTest extends BluetoothDetailsContro
FakeFeatureFactory.setupForTest();
ShadowEntityHeaderController.setUseMock(mHeaderController);
when(mBluetoothManager.getCachedDeviceManager()).thenReturn(mCachedDeviceManager);
when(mCachedDeviceManager.getHearingAidPairDeviceSummary(mCachedDevice)).thenReturn("abc");
when(mCachedDeviceManager.getSubDeviceSummary(mCachedDevice)).thenReturn("abc");
mController =
new BluetoothDetailsHeaderController(mContext, mFragment, mCachedDevice, mLifecycle,
mBluetoothManager);