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:
@@ -65,12 +65,10 @@ public class BluetoothDetailsHeaderController extends BluetoothDetailsController
|
||||
.getBtClassDrawableWithDescription(mContext, mCachedDevice,
|
||||
mContext.getResources().getFraction(R.fraction.bt_battery_scale_fraction, 1, 1));
|
||||
String summaryText = mCachedDevice.getConnectionSummary();
|
||||
// If both the hearing aids are connected, two battery status should be shown.
|
||||
final String pairDeviceSummary = mDeviceManager
|
||||
.getHearingAidPairDeviceSummary(mCachedDevice);
|
||||
if (pairDeviceSummary != null) {
|
||||
mHeaderController.setSecondSummary(pairDeviceSummary);
|
||||
}
|
||||
// If both the hearing aids are connected, two device status should be shown.
|
||||
// If Second Summary is unavailable, to set it to null.
|
||||
mHeaderController.setSecondSummary(
|
||||
mDeviceManager.getSubDeviceSummary(mCachedDevice));
|
||||
mHeaderController.setLabel(mCachedDevice.getName());
|
||||
mHeaderController.setIcon(pair.first);
|
||||
mHeaderController.setIconContentDescription(pair.second);
|
||||
|
Reference in New Issue
Block a user