android: use linkedlist instead of the deque interface, Deque<> isn't supported until gingerbread
authorXeli
Mon, 28 Nov 2011 16:21:35 +0100
changeset 6458 eadb2db1ae83
parent 6456 fed715edc3ee
child 6460 e3cc8ec51cd3
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());