Loading README.md +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ a JSON with the following structure: "filename": "ota-package.zip", "id": "5eb63bbbe01eeed093cb22bb8f5acdc3", "romtype": "nightly", "size": 314572800, "url": "https://example.com/ota-package.zip", "version": "15.1" } Loading @@ -27,6 +28,7 @@ The `datetime` attribute is the build date expressed as UNIX timestamp. The `filename` attribute is the name of the file to be downloaded. The `id` attribute is a string that uniquely identifies the update. The `romtype` attribute is the string to be compared with the `ro.lineage.releasetype` property. The `size` attribute is the size of the update expressed in bytes. The `url` attribute is the URL of the file to be downloaded. The `version` attribute is the string to be compared with the `ro.lineage.build.version` property. Loading src/org/lineageos/updater/misc/Utils.java +1 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class Utils { update.setName(object.getString("filename")); update.setDownloadId(object.getString("id")); update.setType(object.getString("romtype")); update.setFileSize(object.getLong("size")); update.setDownloadUrl(object.getString("url")); update.setVersion(object.getString("version")); return update; Loading src/org/lineageos/updater/model/Update.java +0 −11 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ public class Update extends UpdateBase implements UpdateInfo { private UpdateStatus mStatus = UpdateStatus.UNKNOWN; private int mPersistentStatus = UpdateStatus.Persistent.UNKNOWN; private File mFile; private long mFileSize; private int mProgress; private long mEta; private long mSpeed; Loading @@ -42,7 +41,6 @@ public class Update extends UpdateBase implements UpdateInfo { mStatus = update.getStatus(); mPersistentStatus = update.getPersistentStatus(); mFile = update.getFile(); mFileSize = update.getFileSize(); mProgress = update.getProgress(); mEta = update.getEta(); mSpeed = update.getSpeed(); Loading Loading @@ -78,15 +76,6 @@ public class Update extends UpdateBase implements UpdateInfo { mFile = file; } @Override public long getFileSize() { return mFileSize; } public void setFileSize(long fileSize) { mFileSize = fileSize; } @Override public int getProgress() { return mProgress; Loading src/org/lineageos/updater/model/UpdateBase.java +11 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ public class UpdateBase implements UpdateBaseInfo { private long mTimestamp; private String mType; private String mVersion; private long mFileSize; public UpdateBase() { } Loading @@ -34,6 +35,7 @@ public class UpdateBase implements UpdateBaseInfo { mTimestamp = update.getTimestamp(); mType = update.getType(); mVersion = update.getVersion(); mFileSize = update.getFileSize(); } @Override Loading Loading @@ -89,4 +91,13 @@ public class UpdateBase implements UpdateBaseInfo { public void setDownloadUrl(String downloadUrl) { mDownloadUrl = downloadUrl; } @Override public long getFileSize() { return mFileSize; } public void setFileSize(long fileSize) { mFileSize = fileSize; } } src/org/lineageos/updater/model/UpdateBaseInfo.java +2 −0 Original line number Diff line number Diff line Loading @@ -27,4 +27,6 @@ public interface UpdateBaseInfo { String getVersion(); String getDownloadUrl(); long getFileSize(); } Loading
README.md +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ a JSON with the following structure: "filename": "ota-package.zip", "id": "5eb63bbbe01eeed093cb22bb8f5acdc3", "romtype": "nightly", "size": 314572800, "url": "https://example.com/ota-package.zip", "version": "15.1" } Loading @@ -27,6 +28,7 @@ The `datetime` attribute is the build date expressed as UNIX timestamp. The `filename` attribute is the name of the file to be downloaded. The `id` attribute is a string that uniquely identifies the update. The `romtype` attribute is the string to be compared with the `ro.lineage.releasetype` property. The `size` attribute is the size of the update expressed in bytes. The `url` attribute is the URL of the file to be downloaded. The `version` attribute is the string to be compared with the `ro.lineage.build.version` property. Loading
src/org/lineageos/updater/misc/Utils.java +1 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class Utils { update.setName(object.getString("filename")); update.setDownloadId(object.getString("id")); update.setType(object.getString("romtype")); update.setFileSize(object.getLong("size")); update.setDownloadUrl(object.getString("url")); update.setVersion(object.getString("version")); return update; Loading
src/org/lineageos/updater/model/Update.java +0 −11 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ public class Update extends UpdateBase implements UpdateInfo { private UpdateStatus mStatus = UpdateStatus.UNKNOWN; private int mPersistentStatus = UpdateStatus.Persistent.UNKNOWN; private File mFile; private long mFileSize; private int mProgress; private long mEta; private long mSpeed; Loading @@ -42,7 +41,6 @@ public class Update extends UpdateBase implements UpdateInfo { mStatus = update.getStatus(); mPersistentStatus = update.getPersistentStatus(); mFile = update.getFile(); mFileSize = update.getFileSize(); mProgress = update.getProgress(); mEta = update.getEta(); mSpeed = update.getSpeed(); Loading Loading @@ -78,15 +76,6 @@ public class Update extends UpdateBase implements UpdateInfo { mFile = file; } @Override public long getFileSize() { return mFileSize; } public void setFileSize(long fileSize) { mFileSize = fileSize; } @Override public int getProgress() { return mProgress; Loading
src/org/lineageos/updater/model/UpdateBase.java +11 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ public class UpdateBase implements UpdateBaseInfo { private long mTimestamp; private String mType; private String mVersion; private long mFileSize; public UpdateBase() { } Loading @@ -34,6 +35,7 @@ public class UpdateBase implements UpdateBaseInfo { mTimestamp = update.getTimestamp(); mType = update.getType(); mVersion = update.getVersion(); mFileSize = update.getFileSize(); } @Override Loading Loading @@ -89,4 +91,13 @@ public class UpdateBase implements UpdateBaseInfo { public void setDownloadUrl(String downloadUrl) { mDownloadUrl = downloadUrl; } @Override public long getFileSize() { return mFileSize; } public void setFileSize(long fileSize) { mFileSize = fileSize; } }
src/org/lineageos/updater/model/UpdateBaseInfo.java +2 −0 Original line number Diff line number Diff line Loading @@ -27,4 +27,6 @@ public interface UpdateBaseInfo { String getVersion(); String getDownloadUrl(); long getFileSize(); }