Save download speed in UpdateDownload
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user