private void updateTimeoutSummary(Config config) { mTimeoutPreference.setSummary( ResUtils.getString( getResources(), R.string.settings_timeout_summary, Float.toString(config.getTimeoutNormal() / 1000f), Float.toString(config.getTimeoutShort() / 1000f))); }
private void updateInactiveHoursSummary(Config config) { if (config.isInactiveTimeEnabled()) { int from = config.getInactiveTimeFrom(); int to = config.getInactiveTimeTo(); mInactiveHoursPreference.setSummary( ResUtils.getString( getResources(), R.string.settings_inactive_hours_enabled, DateUtils.formatTime(getActivity(), from / 60, from % 60), DateUtils.formatTime(getActivity(), to / 60, to % 60))); } else { mInactiveHoursPreference.setSummary(getString(R.string.settings_inactive_hours_disabled)); } }