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:
@@ -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