Change PreferenceController#getSummary return type.

Return CharSequence instead of String.

All user visible string should be modeled as CharSequence.

Bug: 73950519
Test: robotest
Change-Id: I30befef0c33f94351d4a2774e283bd1ed804aa8b
This commit is contained in:
Fan Zhang
2018-02-27 10:30:11 -08:00
parent 6a6cc310cf
commit 906572b127
18 changed files with 49 additions and 48 deletions

View File

@@ -38,11 +38,11 @@ public class ScreenPinningPreferenceController extends BasePreferenceController
}
@Override
public String getSummary() {
public CharSequence getSummary() {
return Settings.System.getInt(mContext.getContentResolver(),
Settings.System.LOCK_TO_APP_ENABLED, 0) != 0
? mContext.getString(R.string.switch_on_text)
: mContext.getString(R.string.switch_off_text);
? mContext.getText(R.string.switch_on_text)
: mContext.getText(R.string.switch_off_text);
}
@Override