Bluetooth: Use string in remote device summary am: 04f5967c95
am: d79f6af9ae
Change-Id: If95cf2c89469d5b9220e3f2741e8c7f9288b655a
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
|
||||
|
@@ -117,14 +117,8 @@ public final class BluetoothDevicePreference extends GearPreference implements
|
||||
* any preference info has changed from the previous value.
|
||||
*/
|
||||
setTitle(mCachedDevice.getName());
|
||||
|
||||
int summaryResId = mCachedDevice.getConnectionSummary();
|
||||
if (summaryResId != 0) {
|
||||
setSummary(summaryResId);
|
||||
} else {
|
||||
setSummary(null); // empty summary for unpaired devices
|
||||
}
|
||||
|
||||
// Null check is done at the framework
|
||||
setSummary(mCachedDevice.getConnectionSummary());
|
||||
|
||||
Pair<Integer, String> pair = Utils.getBtClassDrawableWithDescription(mResources,
|
||||
mCachedDevice);
|
||||
|
Reference in New Issue
Block a user