Support getDynamicSummary in BasePreferenceController
Adds dynamic summary getter in relevant BasePreferenceControllers. Preferece controllers that don't have dynamic summaries or which are not yet BasePreferenceControllers are not changed right now. Change-Id: I435ccab7758d90515583fd8ca10a9b1ef0c858b9 Fixes: 71514936 Test: robotests
This commit is contained in:
@@ -77,7 +77,8 @@ public class HeaderPreferenceController extends NotificationPreferenceController
|
||||
: mAppRow.label;
|
||||
}
|
||||
|
||||
CharSequence getSummary() {
|
||||
@Override
|
||||
public String getSummary() {
|
||||
if (mChannel != null) {
|
||||
if (mChannelGroup != null && mChannelGroup.getGroup() != null
|
||||
&& !TextUtils.isEmpty(mChannelGroup.getGroup().getName())) {
|
||||
@@ -87,12 +88,12 @@ public class HeaderPreferenceController extends NotificationPreferenceController
|
||||
summary.append(bidi.unicodeWrap(mContext.getText(
|
||||
R.string.notification_header_divider_symbol_with_spaces)));
|
||||
summary.append(bidi.unicodeWrap(mChannelGroup.getGroup().getName().toString()));
|
||||
return summary;
|
||||
return summary.toString();
|
||||
} else {
|
||||
return mAppRow.label;
|
||||
return mAppRow.label.toString();
|
||||
}
|
||||
} else if (mChannelGroup != null && mChannelGroup.getGroup() != null) {
|
||||
return mAppRow.label;
|
||||
return mAppRow.label.toString();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user