Move over to CharSequence version of badging method.

Bug: 16484455
Change-Id: Ie5ee010efc439219cb71fd4241fdb798a5f4ea12
This commit is contained in:
Kenny Guy
2014-08-07 22:01:22 +01:00
parent ec08228ea9
commit cc2cbaf421
3 changed files with 7 additions and 9 deletions

View File

@@ -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;
}
@@ -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);
@@ -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));