[dev_opt_2.15.0] patch升级代码提交

This commit is contained in:
renwj
2023-03-06 19:50:41 +08:00
parent 91547ae873
commit 3c58608ca6
55 changed files with 2100 additions and 156 deletions

View File

@@ -212,4 +212,12 @@ object FunctionBuildConfig {
@Volatile
@JvmField
var unableLaunchAutopilotGear: Set<Chassis.GearPosition>? = null
/**
* 当前应用是否支持patch升级
*/
@Volatile
@JvmField
var isSupportPatchUpgrade = true
}

View File

@@ -98,4 +98,10 @@ public class MogoServicePaths {
@Keep
public static final String PATH_VISUAL_ANGLE = "/map/angle_change";
@Keep
public static final String PATH_PATCH_UPGRADE = "/patch/api";
public static final String PATH_UPGRADE_TYPE_API = "/upgrade/type/api";
}

View File

@@ -1,6 +1,9 @@
package com.mogo.eagle.core.data.deva.bindingcar;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import java.util.Objects;
/**
* @author lixiaopeng
@@ -19,6 +22,9 @@ public class AppInfo implements Serializable {
private String endTime;
private String appFileName;
@SerializedName("patchInfoView")
public PatchInfo patchInfo;
public String getAppUrl() {
return appUrl;
}
@@ -111,7 +117,155 @@ public class AppInfo implements Serializable {
", installType='" + installType + '\'' +
", beginTime='" + beginTime + '\'' +
", endTime='" + endTime + '\'' +
", patchInfo=" + patchInfo +
", appFileName='" + appFileName + '\'' +
'}';
}
public static class PatchInfo implements Serializable {
private Integer sourceId;
private String sourceMd5;
private String sourceVersion;
private Integer targetId;
private String targetMd5;
private String targetVersion;
private String patchName;
private String patchLocalPath;
private String patchMd5;
private String patchDownloadUrl;
private Integer patchSize;
private Integer patchStatus;
public Integer getSourceId() {
return sourceId;
}
public void setSourceId(Integer sourceId) {
this.sourceId = sourceId;
}
public String getSourceMd5() {
return sourceMd5;
}
public void setSourceMd5(String sourceMd5) {
this.sourceMd5 = sourceMd5;
}
public String getSourceVersion() {
return sourceVersion;
}
public void setSourceVersion(String sourceVersion) {
this.sourceVersion = sourceVersion;
}
public Integer getTargetId() {
return targetId;
}
public void setTargetId(Integer targetId) {
this.targetId = targetId;
}
public String getTargetMd5() {
return targetMd5;
}
public void setTargetMd5(String targetMd5) {
this.targetMd5 = targetMd5;
}
public String getTargetVersion() {
return targetVersion;
}
public void setTargetVersion(String targetVersion) {
this.targetVersion = targetVersion;
}
public String getPatchName() {
return patchName;
}
public void setPatchName(String patchName) {
this.patchName = patchName;
}
public String getPatchLocalPath() {
return patchLocalPath;
}
public void setPatchLocalPath(String patchLocalPath) {
this.patchLocalPath = patchLocalPath;
}
public String getPatchMd5() {
return patchMd5;
}
public void setPatchMd5(String patchMd5) {
this.patchMd5 = patchMd5;
}
public String getPatchDownloadUrl() {
return patchDownloadUrl;
}
public void setPatchDownloadUrl(String patchDownloadUrl) {
this.patchDownloadUrl = patchDownloadUrl;
}
public Integer getPatchSize() {
return patchSize;
}
public Integer getPatchStatus() {
return patchStatus;
}
@Override
public String toString() {
return "PatchInfo{" +
"sourceId=" + sourceId +
", sourceMd5='" + sourceMd5 + '\'' +
", sourceVersion='" + sourceVersion + '\'' +
", targetId=" + targetId +
", targetMd5='" + targetMd5 + '\'' +
", targetVersion='" + targetVersion + '\'' +
", patchName='" + patchName + '\'' +
", patchLocalPath='" + patchLocalPath + '\'' +
", patchMd5='" + patchMd5 + '\'' +
", patchDownloadUrl='" + patchDownloadUrl + '\'' +
", patchSize=" + patchSize +
", patchStatus=" + patchStatus +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PatchInfo patchInfo = (PatchInfo) o;
return patchMd5.equals(patchInfo.patchMd5);
}
@Override
public int hashCode() {
return Objects.hash(patchMd5);
}
}
}