java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification.
<pre><code>@Override
protected void onPostExecute(Pair &lt; Boolean, Integer &gt; result) {
    Log.d("XXX", "Result : " + result.second);
    if (isCancelled())
        return;

    if (result.second &gt; 0)
        nextPage();
    notifyDataSetChanged();

    if (result.first)
        notifyMayHaveMorePages();
    else
        notifyNoMorePages();

};
</code></pre>

<p>I am getting the following exception... </p>

<blockquote>
  <p>05-02 12:34:16.423: E/AndroidRuntime(12814): FATAL EXCEPTION: main
  05-02 12:34:16.423: E/AndroidRuntime(12814):
  java.lang.IllegalStateException: The content of the adapter has
  changed but ListView did not receive a notification. Make sure the
  content of your adapter is not modified from a background thread, but
  only from the UI thread. [in ListView(2131034225, class
  com.greenway.primemobile.common.SectionedListView) with Adapter(class
  android.widget.HeaderViewListAdapter)] 05-02 12:34:16.423:
  E/AndroidRuntime(12814):  at
  android.widget.ListView.layoutChildren(ListView.java:1544) 05-02
  12:34:16.423: E/AndroidRuntime(12814):  at
  android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4042)
  05-02 12:34:16.423: E/AndroidRuntime(12814):  at
  android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
  05-02 12:34:16.423: E/AndroidRuntime(12814):  at
  android.view.Choreographer.doCallbacks(Choreographer.java:562) 05-02
  12:34:16.423: E/AndroidRuntime(12814):  at
  android.view.Choreographer.doFrame(Choreographer.java:531) 05-02
  12:34:16.423: E/AndroidRuntime(12814):  at
  android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
  05-02 12:34:16.423: E/AndroidRuntime(12814):  at
  android.os.Handler.handleCallback(Handler.java:725) 05-02
  12:34:16.423: E/AndroidRuntime(12814):  at
  android.os.Handler.dispatchMessage(Handler.java:92) 05-02
  12:34:16.423: E/AndroidRuntime(12814):  at
  android.os.Looper.loop(Looper.java:137) 05-02 12:34:16.423:
  E/AndroidRuntime(12814):  at
  android.app.ActivityThread.main(ActivityThread.java:5041) 05-02
  12:34:16.423: E/AndroidRuntime(12814):  at
  java.lang.reflect.Method.invokeNative(Native Method) 05-02
  12:34:16.423: E/AndroidRuntime(12814):  at
  java.lang.reflect.Method.invoke(Method.java:511) 05-02 12:34:16.423:
  E/AndroidRuntime(12814):  at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
  05-02 12:34:16.423: E/AndroidRuntime(12814):  at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 05-02
  12:34:16.423: E/AndroidRuntime(12814):  at
  dalvik.system.NativeStart.main(Native Method)</p>
</blockquote>
