code: public void saveMusicPreferences(final boolean flush) {
          if (Strings.isNotEmpty(musicPreferences)) {
              if (Strings.isNotEmpty(musicVolumePreferenceName)) {
                  saveInPreferences(musicPreferences, musicVolumePreferenceName, musicVolume);
              }
              if (Strings.isNotEmpty(musicEnabledPreferenceName)) {
                  saveInPreferences(musicPreferences, musicEnabledPreferenceName, musicEnabled);
              }
              if (flush) {
                  flushPreferences();
              }
          }
      }
docs: Saves music volume and state in preferences.
  
  @param flush if true, preferences will be truly saved - otherwise it just sets them in the preferences map.