summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/providers/downloads/DownloadInfo.java')
-rw-r--r--src/com/android/providers/downloads/DownloadInfo.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java
index e6ed059b..7a912d5a 100644
--- a/src/com/android/providers/downloads/DownloadInfo.java
+++ b/src/com/android/providers/downloads/DownloadInfo.java
@@ -247,7 +247,10 @@ public class DownloadInfo {
* {@link #startDownloadIfReady(ExecutorService)}.
*/
@GuardedBy("this")
- private Future<?> mActiveDownload;
+ private Future<?> mSubmittedTask;
+
+ @GuardedBy("this")
+ private DownloadThread mTask;
private final Context mContext;
private final SystemFacade mSystemFacade;
@@ -455,7 +458,7 @@ public class DownloadInfo {
public boolean startDownloadIfReady(ExecutorService executor) {
synchronized (this) {
final boolean isReady = isReadyToDownload();
- final boolean isActive = mActiveDownload != null && !mActiveDownload.isDone();
+ final boolean isActive = mSubmittedTask != null && !mSubmittedTask.isDone();
if (isReady && !isActive) {
if (mStatus != Impl.STATUS_RUNNING) {
mStatus = Impl.STATUS_RUNNING;
@@ -464,9 +467,9 @@ public class DownloadInfo {
mContext.getContentResolver().update(getAllDownloadsUri(), values, null, null);
}
- final DownloadThread task = new DownloadThread(
+ mTask = new DownloadThread(
mContext, mSystemFacade, this, mStorageManager, mNotifier);
- mActiveDownload = executor.submit(task);
+ mSubmittedTask = executor.submit(mTask);
}
return isReady;
}