I create the content of a ListView in the background and when each item is added I update the ListView adapter.Usually it works ok but some times I get this error. And strangely enough it happens 10 times more often in my Galaxy s4 mini than in my HTC Sensation. I don't understand why this happens since I clearly notify the adapter through the UI thread. Any thoughts ?

```
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. Make sure your adapter calls 
notifyDataSetChanged() when its content changes. [in ListView(2131100779, class 
util.TouchInterceptor) with Adapter(class com.bill.deuterh.ListActivity$ListAdapter)]

```

AsyncTask:

```
private class AsyncCaller extends AsyncTask<Void,Void,Void>{

    @Override
    protected void onPostExecute(Void result) {
        // TODO Auto-generated method stub
        super.onPostExecute(result);
        ListActivity.this.runOnUiThread(new Runnable(){
            @Override
            public void run() {
                findViewById(R.id.progress_bar).setVisibility(View.GONE);
            }
        });
    }

    @Override
    protected Void doInBackground(Void... params) {
        // TODO Auto-generated method stub

        for (int i=0;i<table.length;i++){
            if(isCancelled()){break;}
            myList.add(createObject(table[i])));
            ListActivity.this.runOnUiThread(new Runnable(){
                @Override
                public void run() {
                    ListAdapter.notifyDataSetChanged();
                }
            });
        }

        return null;
    }
}

```

(If it matters, I cast the Listview as TouchInterceptor which is a modified google class for supporting the rearrangement of the listview items with drag and drop.)