title: Is a call to PreferenceManager.setDefaultValues() necessary for clearing preferences?
body: <p>Until now the "Reset to Default" button in the PreferenceActivity of my app did something like this:</p>
  
  <pre><code>SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
  SharedPreferences.Editor editor = preferences.edit();
  editor.clear();
  editor.commit();
  </code></pre>
  
  <p>That's been working fine, but recently I saw the <a href="http://developer.android.com/reference/android/preference/PreferenceManager.html#setDefaultValues%28android.content.Context,%20int,%20boolean%29" rel="nofollow">setDefaultValues</a> method in the PreferenceManager class. The note at the end of the function says that I should call this function after clearing the preferences to set them back to their defaults. So I'm wondering why the documentation is telling me to call this method if everything has been working fine without calling it?</p>
  
  <p>It also doesn't logically seem to be necessary. If you clear the preferences, it's going to do the same thing it did when your application ran for the first time. It's going to use the defaultValue attributes in the preferences to fill in all the values. So it seems redundant to call this extra method.</p>
  
  <p>So is it necessary?</p>