Make the list in advanced battery page sorted by usage.
1. Make the preference dynamically generated in code 2. Make PowerUsageData comparable and add title resource id. Bug: 34385770 Test: RunSettingsRoboTests Change-Id: I1b90b4c6cc7107bc146e3554db04cec7641e1cde
This commit is contained in:
@@ -49,13 +49,8 @@ public class PowerGaugePreference extends TintablePreference {
|
||||
mIconSize = context.getResources().getDimensionPixelSize(R.dimen.app_icon_size);
|
||||
}
|
||||
|
||||
public PowerGaugePreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
final Drawable icon = context.getDrawable(R.drawable.ic_battery_circle);
|
||||
|
||||
setIcon(icon);
|
||||
setWidgetLayoutResource(R.layout.preference_widget_summary);
|
||||
mIconSize = icon.getIntrinsicWidth();
|
||||
public PowerGaugePreference(Context context) {
|
||||
this(context, null, null, null);
|
||||
}
|
||||
|
||||
public void setContentDescription(String name) {
|
||||
|
Reference in New Issue
Block a user