Merge "Update new string for One-Handed feature"

This commit is contained in:
Jason Chang
2020-05-26 10:08:23 +00:00
committed by Android (Google) Code Review
3 changed files with 31 additions and 18 deletions

View File

@@ -83,7 +83,11 @@ public class OneHandedTimeoutPreferenceController extends BasePreferenceControll
@Override
public CharSequence getSummary() {
return mTimeoutMap.get(getTimeoutValue());
if (OneHandedSettingsUtils.getSettingsOneHandedModeTimeout(mContext) == 0) {
return mContext.getResources().getString(R.string.screensaver_settings_summary_never);
}
return String.format(mContext.getResources().getString(
R.string.one_handed_timeout_summary), mTimeoutMap.get(getTimeoutValue()));
}
@Override