diff options
Diffstat (limited to 'News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader')
7 files changed, 29 insertions, 30 deletions
diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetApiVersion.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetApiVersion.java index f201636a..103506b9 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetApiVersion.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetApiVersion.java @@ -25,13 +25,14 @@ import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; +import de.luhmer.owncloudnewsreader.Constants; import de.luhmer.owncloudnewsreader.SettingsActivity; import de.luhmer.owncloudnewsreader.reader.AsyncTask_Reader; import de.luhmer.owncloudnewsreader.reader.OnAsyncTaskCompletedListener; public class AsyncTask_GetApiVersion extends AsyncTask_Reader { - public AsyncTask_GetApiVersion(final int task_id, final Context context, final OnAsyncTaskCompletedListener[] listener) { - super(task_id, context, listener); + public AsyncTask_GetApiVersion(final Context context, final OnAsyncTaskCompletedListener[] listener) { + super(Constants.TaskID_GetVersion, context, listener); } @Override diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetFeeds.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetFeeds.java index 23b2642b..8d92fc5e 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetFeeds.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetFeeds.java @@ -23,6 +23,7 @@ package de.luhmer.owncloudnewsreader.reader.owncloud; import android.content.Context; +import de.luhmer.owncloudnewsreader.Constants; import de.luhmer.owncloudnewsreader.reader.AsyncTask_Reader; import de.luhmer.owncloudnewsreader.reader.OnAsyncTaskCompletedListener; @@ -30,8 +31,8 @@ public class AsyncTask_GetFeeds extends AsyncTask_Reader { private API api; - public AsyncTask_GetFeeds(final int task_id, final Context context, final OnAsyncTaskCompletedListener[] listener, API api) { - super(task_id, context, listener); + public AsyncTask_GetFeeds(final Context context, final OnAsyncTaskCompletedListener[] listener, API api) { + super(Constants.TaskID_GetFeeds, context, listener); this.api = api; } diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetFolderTags.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetFolderTags.java index 4e92316e..42b7201f 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetFolderTags.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetFolderTags.java @@ -23,6 +23,7 @@ package de.luhmer.owncloudnewsreader.reader.owncloud; import android.content.Context; +import de.luhmer.owncloudnewsreader.Constants; import de.luhmer.owncloudnewsreader.reader.AsyncTask_Reader; import de.luhmer.owncloudnewsreader.reader.OnAsyncTaskCompletedListener; @@ -30,8 +31,8 @@ public class AsyncTask_GetFolderTags extends AsyncTask_Reader { private API api; - public AsyncTask_GetFolderTags(final int task_id, final Context context, final OnAsyncTaskCompletedListener[] listener, API api) { - super(task_id, context, listener); + public AsyncTask_GetFolderTags(final Context context, final OnAsyncTaskCompletedListener[] listener, API api) { + super(Constants.TaskID_GetFolder, context, listener); this.api = api; } diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetItems.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetItems.java index 8a1f41d0..4cbaf5ac 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetItems.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetItems.java @@ -49,8 +49,8 @@ public class AsyncTask_GetItems extends AsyncTask_Reader { private API api; int totalCount; - public AsyncTask_GetItems(final int task_id, final Context context, final OnAsyncTaskCompletedListener[] listener, API api) { - super(task_id, context, listener); + public AsyncTask_GetItems(final Context context, final OnAsyncTaskCompletedListener[] listener, API api) { + super(Constants.TaskID_GetItems, context, listener); this.api = api; totalCount = 0; diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetOldItems.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetOldItems.java index 7a812ebb..2cfa8b72 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetOldItems.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_GetOldItems.java @@ -24,6 +24,7 @@ package de.luhmer.owncloudnewsreader.reader.owncloud; import android.content.Context; import android.widget.Toast; +import de.luhmer.owncloudnewsreader.Constants; import de.luhmer.owncloudnewsreader.ListView.SubscriptionExpandableListAdapter; import de.luhmer.owncloudnewsreader.NewsReaderDetailFragment; import de.luhmer.owncloudnewsreader.NewsReaderListActivity; @@ -42,8 +43,8 @@ public class AsyncTask_GetOldItems extends AsyncTask_Reader { private int downloadedItemsCount = 0; private API api; - public AsyncTask_GetOldItems(final int task_id, final Context context, final OnAsyncTaskCompletedListener[] listener, Long feed_id, Long folder_id, API api) { - super(task_id, context, listener); + public AsyncTask_GetOldItems(final Context context, final OnAsyncTaskCompletedListener[] listener, Long feed_id, Long folder_id, API api) { + super(Constants.TaskID_GetItems, context, listener); this.feed_id = feed_id; this.folder_id = folder_id; diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_PerformItemStateChange.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_PerformItemStateChange.java index efb39753..c499aaef 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_PerformItemStateChange.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/AsyncTask_PerformItemStateChange.java @@ -26,6 +26,7 @@ import android.content.Context; import java.util.ArrayList; import java.util.List; +import de.luhmer.owncloudnewsreader.Constants; import de.luhmer.owncloudnewsreader.database.DatabaseConnectionOrm; import de.luhmer.owncloudnewsreader.reader.AsyncTask_Reader; import de.luhmer.owncloudnewsreader.reader.FeedItemTags; @@ -35,8 +36,8 @@ public class AsyncTask_PerformItemStateChange extends AsyncTask_Reader { private API api; - public AsyncTask_PerformItemStateChange(final int task_id, final Context context, final OnAsyncTaskCompletedListener[] listener, API api) { - super(task_id, context, listener); + public AsyncTask_PerformItemStateChange(final Context context, final OnAsyncTaskCompletedListener[] listener, API api) { + super(Constants.TaskID_PerformStateChange, context, listener); this.api = api; } diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/OwnCloud_Reader.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/OwnCloud_Reader.java index ce5937dc..747f859b 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/OwnCloud_Reader.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/owncloud/OwnCloud_Reader.java @@ -36,41 +36,35 @@ public class OwnCloud_Reader { public OwnCloud_Reader() { } - public void Start_AsyncTask_GetItems(int task_id, - Context context, OnAsyncTaskCompletedListener listener, FeedItemTags tag) { + public void Start_AsyncTask_GetItems(Context context, OnAsyncTaskCompletedListener listener, FeedItemTags tag) { setSyncRunning(true); - new AsyncTask_GetItems(task_id, context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, api).execute(tag); + new AsyncTask_GetItems(context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, api).execute(tag); } - public void Start_AsyncTask_GetOldItems(int task_id, - Context context, OnAsyncTaskCompletedListener listener, Long feed_id, Long folder_id) { + public void Start_AsyncTask_GetOldItems(Context context, OnAsyncTaskCompletedListener listener, Long feed_id, Long folder_id) { setSyncRunning(true); - new AsyncTask_GetOldItems(task_id, context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, feed_id, folder_id, api).execute(); + new AsyncTask_GetOldItems(context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, feed_id, folder_id, api).execute(); } - public void Start_AsyncTask_GetFolder(int task_id, - Context context, OnAsyncTaskCompletedListener listener) { + public void Start_AsyncTask_GetFolder(Context context, OnAsyncTaskCompletedListener listener) { setSyncRunning(true); - new AsyncTask_GetFolderTags(task_id, context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, api).execute(); + new AsyncTask_GetFolderTags(context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, api).execute(); } - public void Start_AsyncTask_GetFeeds(int task_id, - Context context, OnAsyncTaskCompletedListener listener) { + public void Start_AsyncTask_GetFeeds(Context context, OnAsyncTaskCompletedListener listener) { setSyncRunning(true); - new AsyncTask_GetFeeds(task_id, context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, api).execute(); + new AsyncTask_GetFeeds(context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, api).execute(); } - public void Start_AsyncTask_PerformItemStateChange(int task_id, - Context context, OnAsyncTaskCompletedListener listener) { + public void Start_AsyncTask_PerformItemStateChange(Context context, OnAsyncTaskCompletedListener listener) { setSyncRunning(true); - new AsyncTask_PerformItemStateChange(task_id, context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, api).execute(); + new AsyncTask_PerformItemStateChange(context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }, api).execute(); } - public void Start_AsyncTask_GetVersion(int task_id, - Context context, OnAsyncTaskCompletedListener listener) { + public void Start_AsyncTask_GetVersion(Context context, OnAsyncTaskCompletedListener listener) { setSyncRunning(true); - new AsyncTask_GetApiVersion(task_id, context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }).execute(); + new AsyncTask_GetApiVersion(context, new OnAsyncTaskCompletedListener[] { AsyncTask_finished, listener }).execute(); } public boolean isSyncRunning() { |