Bluetooth: Use string in remote device summary
* Use String in connected device summary instead of resource id * This allows dynamic strings to be built by CachedBluetoothDevice such as ones involve battery level percentages Bug: 35874078 Test: make, unit test, test with Bluetooth devices Change-Id: I583eac73280ca17387b215a4e7095e27de399998
This commit is contained in:
@@ -53,12 +53,11 @@ public class BluetoothDetailsHeaderController extends BluetoothDetailsController
|
||||
protected void setHeaderProperties() {
|
||||
Pair<Integer, String> pair = Utils.getBtClassDrawableWithDescription
|
||||
(mContext.getResources(), mCachedDevice);
|
||||
int summaryResourceId = mCachedDevice.getConnectionSummary();
|
||||
String summaryText = mCachedDevice.getConnectionSummary();
|
||||
mHeaderController.setLabel(mCachedDevice.getName());
|
||||
mHeaderController.setIcon(mContext.getDrawable(pair.first));
|
||||
mHeaderController.setIconContentDescription(pair.second);
|
||||
mHeaderController.setSummary(
|
||||
summaryResourceId > 0 ? mContext.getString(summaryResourceId) : null);
|
||||
mHeaderController.setSummary(summaryText);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user