code: private void adaptSwitchPreferenceSummary(final boolean showValueAsSummary) {
          if (showValueAsSummary) {
              switchPreference.setSummaryOn(R.string.switch_preference_summary_on);
              switchPreference.setSummaryOff(R.string.switch_preference_summary_off);
          } else {
              switchPreference.setSummaryOn(null);
              switchPreference.setSummaryOff(null);
          }
      }
docs: Adapts the summary of the {@link SwitchPreference}, depending on whether the values of
  preferences should be shown as their summaries.
  
  @param showValueAsSummary
  True, if the values of preferences should be shown as their summaries, false
  otherwise