Have such error, when trying to update listview in my fragment from asynctask:

```
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.

```

My AsyncTask class 

```
protected Void doInBackground(Void... params) {
        int nextStep;
        BaseAnt tempAnt = null;
        ArrayList<BaseAnt> antList = new ArrayList<BaseAnt>();
        while (true) {
            Log.d("myLogs", "Start from APP");
            nextStep = RandomNumber.getRandomNumber(3);
            switch (nextStep) {
            case 0:
                tempAnt = new GuardAnt();
                AppStat.addToLog("Guard");
                break;
            case 1:
                tempAnt = new MotherAnt();
                AppStat.addToLog("Mother born");
                break;
            case 2:
                tempAnt = new WorkerAnt();
                AppStat.addToLog("Worker born");
                break;
            default:
                break;
            }
            antList.add(tempAnt);
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            for (int i = 0; i < antList.size(); i++)
                antList.get(i).eat();
            publishProgress(String.valueOf(AppStat.WATER));
            if (AppStat.WATER < 0)
                break;
        }
        return null;

    }

    protected void onPostExecute(String result) {

    }

    @Override
    protected void onProgressUpdate(String... values) {
        Log.d("myLogs", "onProgressUpdate");
        LogFragment.mLogAdapter.notifyDataSetChanged();
        LogFragment.mLogAdapter.setSelectToLast();
        StatFragment.tvWater.setText(String.valueOf(AppStat.WATER));
        super.onProgressUpdate(values);
    }

```

AppStat is class extends Application, that cointain info about variables i need and method 

```
    public static void addToLog(String str) {
    if (listLog.size() > 256)
        listLog.remove(0);
    listLog.add(getNowtime() + ": " + str);
}

```

In LogAdapter extends BaseAdapter: 

```
    public void setSelectToLast() {
    Log.d("myLogs","UpdateToLast");
    notifyDataSetChanged();
    LogFragment.lvList.setSelection(getCount() + 1);
}

```

How to fix it?