Merge "Move over to CharSequence version of badging method." into lmp-dev

This commit is contained in:
Kenny Guy
2014-08-07 21:05:48 +00:00
committed by Android (Google) Code Review
3 changed files with 7 additions and 9 deletions

View File

@@ -34,9 +34,9 @@ public class PowerGaugePreference extends Preference {
private BatteryEntry mInfo;
private int mProgress;
private CharSequence mProgressText;
private final String mContentDescription;
private final CharSequence mContentDescription;
public PowerGaugePreference(Context context, Drawable icon, String contentDescription,
public PowerGaugePreference(Context context, Drawable icon, CharSequence contentDescription,
BatteryEntry info) {
super(context);
setLayoutResource(R.layout.preference_app_percentage);

View File

@@ -295,9 +295,7 @@ public class PowerUsageSummary extends PreferenceFragment {
final BatteryEntry entry = new BatteryEntry(getActivity(), mHandler, mUm, sipper);
final Drawable badgedIcon = mUm.getBadgedDrawableForUser(entry.getIcon(),
userHandle);
// TODO: type of this will be replaced by CharSequence (see
// https://b.corp.google.com/issue?id=16401636 )
final String contentDescription = mUm.getBadgedLabelForUser(entry.getLabel(),
final CharSequence contentDescription = mUm.getBadgedLabelForUser(entry.getLabel(),
userHandle);
final PowerGaugePreference pref = new PowerGaugePreference(getActivity(),
badgedIcon, contentDescription, entry);