Add copy constructors to Update and UpdateDownload
This commit is contained in:
@@ -27,6 +27,15 @@ public class Update implements Comparable<Update> {
|
||||
public Update() {
|
||||
}
|
||||
|
||||
public Update(Update update) {
|
||||
mName = update.getName();
|
||||
mDownloadUrl = update.getDownloadUrl();
|
||||
mDownloadId = update.getDownloadId();
|
||||
mTimestamp = update.getTimestamp();
|
||||
mType = update.getType();
|
||||
mVersion = update.getVersion();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return mName;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,26 @@ public class UpdateDownload extends Update {
|
||||
private int mInstallProgress;
|
||||
private boolean mAvailableOnline;
|
||||
|
||||
public UpdateDownload() {
|
||||
}
|
||||
|
||||
public UpdateDownload(Update update) {
|
||||
super(update);
|
||||
}
|
||||
|
||||
public UpdateDownload(UpdateDownload update) {
|
||||
super(update);
|
||||
mStatus = update.getStatus();
|
||||
mPersistentStatus = update.getPersistentStatus();
|
||||
mFile = update.getFile();
|
||||
mFileSize = update.getFileSize();
|
||||
mProgress = update.getProgress();
|
||||
mEta = update.getEta();
|
||||
mSpeed = update.getSpeed();
|
||||
mInstallProgress = update.getInstallProgress();
|
||||
mAvailableOnline = update.getAvailableOnline();
|
||||
}
|
||||
|
||||
public UpdateStatus getStatus() {
|
||||
return mStatus;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user