android: use linkedlist instead of the deque interface, Deque<> isn't supported until gingerbread
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadService.java Mon Nov 28 16:20:48 2011 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadService.java Mon Nov 28 16:21:35 2011 +0100
@@ -19,7 +19,6 @@
package org.hedgewars.hedgeroid.Downloader;
-import java.util.Deque;
import java.util.LinkedList;
import java.util.List;
@@ -57,7 +56,7 @@
private NotificationManager nM;
private RemoteViews contentView;
- private Deque<DownloadTask> downloadTasks = new LinkedList<DownloadTask>();
+ private LinkedList<DownloadTask> downloadTasks = new LinkedList<DownloadTask>();
private DownloadTask currentTask = null;
public class DownloadHandler extends Handler{
@@ -112,7 +111,7 @@
private void runNextTask(){
if(asyncExecutor == null){//if (task isnt running right now) ...
- currentTask = downloadTasks.pollFirst();
+ currentTask = downloadTasks.poll();
if(currentTask != null){
asyncExecutor = new DownloadAsyncTask(currentTask);
asyncExecutor.execute(currentTask.getPackage());