Use ThemedBatteryDrawable in settings

Changed out BatteryMeterDrawable to inherit from ThemedBatteryDrawable
instead of BatteryMeterDrawableBase. Also removed warning text paint
because it seemed unused and simplified the interface.

Bug: 123705805
Test: visual
Change-Id: I30496e3d8881803d9d3d8a316c10387482a8f610
This commit is contained in:
Evan Laird
2019-02-15 14:55:30 -05:00
parent b87dfdc189
commit 35e35622d9
3 changed files with 12 additions and 26 deletions

View File

@@ -98,8 +98,7 @@ public class AdvancedBluetoothDetailsHeaderController extends BasePreferenceCont
new BatteryMeterView.BatteryMeterDrawable(context,
context.getColor(R.color.meter_background_color));
drawable.setBatteryLevel(level);
drawable.setShowPercent(false);
drawable.setBatteryColorFilter(new PorterDuffColorFilter(
drawable.setColorFilter(new PorterDuffColorFilter(
com.android.settings.Utils.getColorAttrDefaultColor(context,
android.R.attr.colorControlNormal),
PorterDuff.Mode.SRC_IN));