diff options
author | Martin Fietz <martin.fietz@gmail.com> | 2018-01-09 20:13:14 +0100 |
---|---|---|
committer | Martin Fietz <martin.fietz@gmail.com> | 2018-01-09 20:13:14 +0100 |
commit | 59a1b4a2bb72e747cb86fc5fb6bb3c9a9811bb0b (patch) | |
tree | e86b5235c320b58c4dcb50fcf23ddbcdee73ad34 /app/src/main | |
parent | b1c212c2fc62b96f272fc0cedf683018ff312801 (diff) | |
download | AntennaPod-59a1b4a2bb72e747cb86fc5fb6bb3c9a9811bb0b.zip |
Cleanup executeAsync
Diffstat (limited to 'app/src/main')
5 files changed, 5 insertions, 27 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java index 8ede947c5..31d0fb1a3 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java @@ -171,11 +171,7 @@ public class GpodnetAuthenticationActivity extends AppCompatActivity { return null; } }; - if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) { - authTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, service); - } else { - authTask.execute(); - } + authTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, service); } }); } diff --git a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlFeedQueuer.java b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlFeedQueuer.java index 4449d82c2..fcd5cff00 100644 --- a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlFeedQueuer.java +++ b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlFeedQueuer.java @@ -56,13 +56,8 @@ public class OpmlFeedQueuer extends AsyncTask<Void, Void, Void> { return null; } - @SuppressLint("NewApi") public void executeAsync() { - if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) { - executeOnExecutor(THREAD_POOL_EXECUTOR); - } else { - execute(); - } + executeOnExecutor(THREAD_POOL_EXECUTOR); } } diff --git a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java index 62ea85811..88bd35b7c 100644 --- a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java +++ b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java @@ -93,13 +93,8 @@ public class OpmlImportWorker extends return exception != null; } - @SuppressLint("NewApi") public void executeAsync() { - if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) { - executeOnExecutor(THREAD_POOL_EXECUTOR); - } else { - execute(); - } + executeOnExecutor(THREAD_POOL_EXECUTOR); } } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java index 15e9c9943..a54c90862 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java @@ -160,10 +160,6 @@ public abstract class PodcastListFragment extends Fragment { } }; - if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) { - loaderTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - } else { - loaderTask.execute(); - } + loaderTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java index d2c7f32dd..1e46b1ac5 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java @@ -135,11 +135,7 @@ public class TagListFragment extends ListFragment { } } }; - if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) { - loadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - } else { - loadTask.execute(); - } + loadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } } |