Unable to update the header summaries for PreferenceActivity on smartphones running 4.x
<p>From what I've noticed, on smartphones running 4.x when you have a PreferenceActivity with headers, the OS will first create an activity containing the headers. When the user clicks on one item from the headers list, another activity will be created representing the PreferenceFragment for that entry. On tablets, the headers list and this fragment belongs to the same activity and appear simultaneously on the screen.</p>

<p>So, the problem is this. When the user is in the PreferenceFragment, and he changes some setting there, I want to update the corresponding header summary. I have a reference to the headers object from onBuildHeaders() call:</p>

<pre><code>@Override
public void onBuildHeaders(List&lt;Header&gt; aTarget) {
    ...
    headers = aTarget;
}
</code></pre>

<p>Now in order to update the header I loop through this list and check the id:</p>

<pre><code>private void setHeaderSummary(int id, String summary) {
    for (Header header : headers) {
        if (header.id == id) {
            header.summary = summary;
            invalidateHeaders();
            return;
        }
    }
}
</code></pre>

<p>This works perfect on tablets, however on smartphones it has no effect. When the user returns from the PreferenceFragment to the first PreferenceActivity (by hitting the Back button), the headers remain unchanged.</p>
