From 15b8a6df5558d79e29e0ff7982c6bca61a7a1d41 Mon Sep 17 00:00:00 2001 From: pulce Date: Thu, 1 Jan 2015 21:19:12 +0100 Subject: [PATCH] Cleanup --- src/com/windnow/MainActivity.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/com/windnow/MainActivity.java b/src/com/windnow/MainActivity.java index d2f39d7..c3c6354 100755 --- a/src/com/windnow/MainActivity.java +++ b/src/com/windnow/MainActivity.java @@ -151,9 +151,9 @@ private void initiateDl(Station st) { stAda.notifyDataSetChanged(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { new DownloadStation(st).executeOnExecutor( - AsyncTask.THREAD_POOL_EXECUTOR, st.getUrl()); + AsyncTask.THREAD_POOL_EXECUTOR); } else { - new DownloadStation(st).execute(st.getUrl()); + new DownloadStation(st).execute(); } } @@ -162,7 +162,7 @@ private void initiateDl(Station st) { * AsyncTask to download the content... * */ - private class DownloadStation extends AsyncTask { + private class DownloadStation extends AsyncTask { private Station station; private DownloadStation(Station station) { @@ -170,7 +170,7 @@ private DownloadStation(Station station) { } @Override - protected String doInBackground(String... urls) { + protected Void doInBackground(Void... v) { try { if (station.getType() == Station.PIC) { DownloadStations.downloadPic(station); @@ -186,12 +186,11 @@ protected String doInBackground(String... urls) { station.setSecLine(getString(R.string.download_error)); LoadSaveOps.printErrorToLog(e); } - return ""; - + return null; } @Override - protected void onPostExecute(String result) { + protected void onPostExecute(Void v) { stAda.notifyDataSetChanged(); } }