Commit e6973226 by olly Committed by Oliver Woodman

Tidy up naming

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195351640
parent fdbea33a
...@@ -339,17 +339,17 @@ public final class DownloadManager { ...@@ -339,17 +339,17 @@ public final class DownloadManager {
continue; continue;
} }
DownloadAction downloadAction = task.action; DownloadAction action = task.action;
boolean removeAction = downloadAction.isRemoveAction; boolean isRemoveAction = action.isRemoveAction;
if (!removeAction && skipDownloadActions) { if (!isRemoveAction && skipDownloadActions) {
continue; continue;
} }
boolean canStartTask = true; boolean canStartTask = true;
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
Task otherTask = tasks.get(j); Task otherTask = tasks.get(j);
if (otherTask.action.isSameMedia(downloadAction)) { if (otherTask.action.isSameMedia(action)) {
if (removeAction) { if (isRemoveAction) {
canStartTask = false; canStartTask = false;
logd(task + " clashes with " + otherTask); logd(task + " clashes with " + otherTask);
otherTask.cancel(); otherTask.cancel();
...@@ -364,7 +364,7 @@ public final class DownloadManager { ...@@ -364,7 +364,7 @@ public final class DownloadManager {
if (canStartTask) { if (canStartTask) {
task.start(); task.start();
if (!removeAction) { if (!isRemoveAction) {
activeDownloadTasks.add(task); activeDownloadTasks.add(task);
skipDownloadActions = activeDownloadTasks.size() == maxActiveDownloadTasks; skipDownloadActions = activeDownloadTasks.size() == maxActiveDownloadTasks;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment