Update the bluetooth battery icon

In ag/2863892, we add a new parameter to tune the size of battery icon.
This cl use this parameter and update the icon in bluetooth detail page.

Bug: 65397557
Test: RunSettingsLibRoboTests & Screenshots
Change-Id: I6dd26f14b3209101dd39320b3720fbd4f79acf54
This commit is contained in:
jackqdyulei
2017-09-13 13:35:02 -07:00
parent 6361c9d851
commit 2c6a016b10
3 changed files with 27 additions and 14 deletions

View File

@@ -51,8 +51,9 @@ public class BluetoothDetailsHeaderController extends BluetoothDetailsController
}
protected void setHeaderProperties() {
final Pair<Drawable, String> pair = Utils.getBtClassDrawableWithDescription
(mContext, mCachedDevice);
final Pair<Drawable, String> pair = Utils.getBtClassDrawableWithDescription(
mContext, mCachedDevice,
mContext.getResources().getFraction(R.fraction.bt_battery_scale_fraction, 1, 1));
String summaryText = mCachedDevice.getConnectionSummary();
mHeaderController.setLabel(mCachedDevice.getName());
mHeaderController.setIcon(pair.first);