Change DataUsageSummaryPreference.setLimitInfo(String text) to take CharSequence
"CharSequence is more correct" than String. Change method to take in CharSequence parameter and modify callers/tests. Bug: b/74960034 Test: RunSettingsRoboTests:DataUsageSummaryPreferenceTest and RunSettingsRoboTests:DataUsageSummaryPreferenceControllerTest Change-Id: Ic83bde57bafff8416c0bd86b1ff2beb44ea12d0e
This commit is contained in:
@@ -203,15 +203,15 @@ public class DataUsageSummaryPreferenceController extends BasePreferenceControll
|
||||
summaryPreference.setLimitInfo(TextUtils.expandTemplate(
|
||||
mContext.getText(R.string.cell_data_warning_and_limit),
|
||||
Formatter.formatFileSize(mContext, info.warningLevel),
|
||||
Formatter.formatFileSize(mContext, info.limitLevel)).toString());
|
||||
Formatter.formatFileSize(mContext, info.limitLevel)));
|
||||
} else if (info.warningLevel > 0) {
|
||||
summaryPreference.setLimitInfo(TextUtils.expandTemplate(
|
||||
mContext.getText(R.string.cell_data_warning),
|
||||
Formatter.formatFileSize(mContext, info.warningLevel)).toString());
|
||||
Formatter.formatFileSize(mContext, info.warningLevel)));
|
||||
} else if (info.limitLevel > 0) {
|
||||
summaryPreference.setLimitInfo(TextUtils.expandTemplate(
|
||||
mContext.getText(R.string.cell_data_limit),
|
||||
Formatter.formatFileSize(mContext, info.limitLevel)).toString());
|
||||
Formatter.formatFileSize(mContext, info.limitLevel)));
|
||||
} else {
|
||||
summaryPreference.setLimitInfo(null);
|
||||
}
|
||||
|
Reference in New Issue
Block a user