|
@@ -400,22 +400,41 @@ public class SysAppUtil {
|
|
|
action1.call(0);
|
|
action1.call(0);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if(ignoreMd5 != null && TextUtils.equals(ignoreMd5, version.getMd5_address()) && !version.isForceUpdate()){
|
|
|
|
|
- LogUtil.println("showVersionInfo", "忽略", ignoreMd5, version.getVersion_name());
|
|
|
|
|
- if(action1 != null)
|
|
|
|
|
- action1.call(0);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- String fileMD5 = SysAppUtil.getConnectAdrressFileMD5();
|
|
|
|
|
- int versionCode = SysAppUtil.getAppVersionCode();
|
|
|
|
|
- if(versionCode == 0){
|
|
|
|
|
- if(ignoreMd5 == null)
|
|
|
|
|
- G.showToast(baseMessage);
|
|
|
|
|
- if(action1 != null)
|
|
|
|
|
- action1.call(0);
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ boolean isNewApp;
|
|
|
|
|
+ if(TestUtil.isSheep()) {
|
|
|
|
|
+ if(ignoreMd5 != null && TextUtils.equals(ignoreMd5, version.getVersion_number()+"") && !version.isForceUpdate()){
|
|
|
|
|
+ LogUtil.println("showVersionInfo", "忽略", ignoreMd5, version.getVersion_name());
|
|
|
|
|
+ if(action1 != null)
|
|
|
|
|
+ action1.call(0);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ int versionCode = SysAppUtil.getAppVersionCode();
|
|
|
|
|
+ if (versionCode == 0) {
|
|
|
|
|
+ if (ignoreMd5 == null)
|
|
|
|
|
+ G.showToast(baseMessage);
|
|
|
|
|
+ if (action1 != null)
|
|
|
|
|
+ action1.call(0);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ isNewApp = versionCode >= version.getVersion_number();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if(ignoreMd5 != null && TextUtils.equals(ignoreMd5, version.getMd5_address()) && !version.isForceUpdate()){
|
|
|
|
|
+ LogUtil.println("showVersionInfo", "忽略", ignoreMd5, version.getVersion_name());
|
|
|
|
|
+ if(action1 != null)
|
|
|
|
|
+ action1.call(0);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ String fileMD5 = SysAppUtil.getConnectAdrressFileMD5();
|
|
|
|
|
+ if (TextUtils.isEmpty(fileMD5)) {
|
|
|
|
|
+ if (ignoreMd5 == null)
|
|
|
|
|
+ G.showToast(baseMessage);
|
|
|
|
|
+ if (action1 != null)
|
|
|
|
|
+ action1.call(0);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ isNewApp = fileMD5.equalsIgnoreCase(version.getMd5_address());
|
|
|
}
|
|
}
|
|
|
- if(versionCode >= version.getVersion_number()){//已经是最新版本
|
|
|
|
|
|
|
+ if(isNewApp){//已经是最新版本
|
|
|
if(ignoreMd5 == null)
|
|
if(ignoreMd5 == null)
|
|
|
G.showToast("当前版本为最新版本,无需更新");
|
|
G.showToast("当前版本为最新版本,无需更新");
|
|
|
if(action1 != null)
|
|
if(action1 != null)
|
|
@@ -476,7 +495,7 @@ public class SysAppUtil {
|
|
|
dialogConfig.setBtnRightText("下次更新").setBtnRightOnClickListener(new View.OnClickListener() {
|
|
dialogConfig.setBtnRightText("下次更新").setBtnRightOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
public void onClick(View view) {
|
|
|
- SpUtils.saveIgnoreMd5(version.getMd5_address());
|
|
|
|
|
|
|
+ SpUtils.saveIgnoreMd5(TestUtil.isSheep() ? version.getVersion_number()+"" : version.getMd5_address());
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|