title: Android AsyncTask change
body: <p>Why, when I change</p>
  
  <pre><code>private class DownloadTask extends AsyncTask&lt;Void, Void, Void&gt;{
  
      @Override
      protected Void doInBackground(Void... arg0) {
          try {
              Downloader.DownloadFromUrl("http://www.sciencemag.org/rss/news.xml", openFileOutput("Sciencemag.xml", Context.MODE_PRIVATE));
          } catch (FileNotFoundException e) {
              e.printStackTrace();
          }
          return null;
      }
  
      @Override
      protected void onPostExecute(Void result){
          mAdapter = new SiteAdapter(MainActivity.this, -1, XmlParser.getSingleItemsFromFile(MainActivity.this));
          sitesList.setAdapter(mAdapter);
      }
  }
  </code></pre>
  
  <p>to </p>
  
  <pre><code>private void downloadFile(){
      try {
          Downloader.DownloadFromUrl("http://www.sciencemag.org/rss/news.xml", openFileOutput("Sciencemag.xml", Context.MODE_PRIVATE));
      } catch (FileNotFoundException e) {
          e.printStackTrace();
      }
          mAdapter = new SiteAdapter(MainActivity.this, -1, XmlParser.getSingleItemsFromFile(MainActivity.this));
          sitesList.setAdapter(mAdapter);
  }
  </code></pre>
  
  <p>i get an error? I just want to call method downloadFile() instead of creating instance of inner class DownloadTask and call execute() of this instance.</p>