android: use linkedlist instead of the deque interface, Deque<> isn't supported until gingerbread
authorXeli
Mon, 28 Nov 2011 16:21:35 +0100
changeset 6461 c476061f0466
parent 6459 2ca787ac8fc3
child 6463 763045535ca4
android: use linkedlist instead of the deque interface, Deque<> isn't supported until gingerbread
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadService.java
--- 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());