Save download speed in UpdateDownload

This commit is contained in:
Gabriele M
2017-07-02 22:21:28 +02:00
parent c30940649c
commit a26c03a19a
2 changed files with 10 additions and 0 deletions

View File

@@ -178,6 +178,7 @@ public class DownloadController implements DownloadControllerInt {
mLastUpdate = now;
getUpdate(downloadId).setProgress(progress);
getUpdate(downloadId).setEta(eta);
getUpdate(downloadId).setSpeed(speed);
notifyDownloadProgress(downloadId);
}
}

View File

@@ -25,6 +25,7 @@ public class UpdateDownload extends Update {
private long mFileSize;
private int mProgress;
private long mEta;
private long mSpeed;
public UpdateStatus getStatus() {
return mStatus;
@@ -73,4 +74,12 @@ public class UpdateDownload extends Update {
public void setEta(long eta) {
mEta = eta;
}
public long getSpeed() {
return mSpeed;
}
public void setSpeed(long speed) {
mSpeed = speed;
}
}