Loading src/com/android/settings/fuelgauge/PowerGaugePreference.java +2 −2 Original line number Diff line number Diff line Loading @@ -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); Loading src/com/android/settings/fuelgauge/PowerUsageSummary.java +1 −3 Original line number Diff line number Diff line Loading @@ -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); Loading src/com/android/settings/location/RecentLocationApps.java +4 −4 Original line number Diff line number Diff line Loading @@ -82,9 +82,9 @@ public class RecentLocationApps { * them for accessibility purposes. */ private static class AccessiblePreference extends Preference { public String mContentDescription; public CharSequence mContentDescription; public AccessiblePreference(Context context, String contentDescription) { public AccessiblePreference(Context context, CharSequence contentDescription) { super(context); mContentDescription = contentDescription; } Loading @@ -103,7 +103,7 @@ public class RecentLocationApps { Drawable icon, CharSequence label, boolean isHighBattery, String contentDescription, CharSequence contentDescription, Preference.OnPreferenceClickListener listener) { AccessiblePreference pref = new AccessiblePreference(mActivity, contentDescription); pref.setIcon(icon); Loading Loading @@ -209,7 +209,7 @@ public class RecentLocationApps { Drawable appIcon = mPackageManager.getApplicationIcon(appInfo); Drawable icon = um.getBadgedDrawableForUser(appIcon, userHandle); CharSequence appLabel = mPackageManager.getApplicationLabel(appInfo); String badgedAppLabel = um.getBadgedLabelForUser(appLabel.toString(), userHandle); CharSequence badgedAppLabel = um.getBadgedLabelForUser(appLabel.toString(), userHandle); preference = createRecentLocationEntry(icon, appLabel, highBattery, badgedAppLabel, new PackageEntryClickedListener(packageName)); Loading Loading
src/com/android/settings/fuelgauge/PowerGaugePreference.java +2 −2 Original line number Diff line number Diff line Loading @@ -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); Loading
src/com/android/settings/fuelgauge/PowerUsageSummary.java +1 −3 Original line number Diff line number Diff line Loading @@ -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); Loading
src/com/android/settings/location/RecentLocationApps.java +4 −4 Original line number Diff line number Diff line Loading @@ -82,9 +82,9 @@ public class RecentLocationApps { * them for accessibility purposes. */ private static class AccessiblePreference extends Preference { public String mContentDescription; public CharSequence mContentDescription; public AccessiblePreference(Context context, String contentDescription) { public AccessiblePreference(Context context, CharSequence contentDescription) { super(context); mContentDescription = contentDescription; } Loading @@ -103,7 +103,7 @@ public class RecentLocationApps { Drawable icon, CharSequence label, boolean isHighBattery, String contentDescription, CharSequence contentDescription, Preference.OnPreferenceClickListener listener) { AccessiblePreference pref = new AccessiblePreference(mActivity, contentDescription); pref.setIcon(icon); Loading Loading @@ -209,7 +209,7 @@ public class RecentLocationApps { Drawable appIcon = mPackageManager.getApplicationIcon(appInfo); Drawable icon = um.getBadgedDrawableForUser(appIcon, userHandle); CharSequence appLabel = mPackageManager.getApplicationLabel(appInfo); String badgedAppLabel = um.getBadgedLabelForUser(appLabel.toString(), userHandle); CharSequence badgedAppLabel = um.getBadgedLabelForUser(appLabel.toString(), userHandle); preference = createRecentLocationEntry(icon, appLabel, highBattery, badgedAppLabel, new PackageEntryClickedListener(packageName)); Loading