version:6.4.1

fix:
update:去掉腾讯推送,增加保存电子书包激活码
This commit is contained in:
2023-08-14 10:31:06 +08:00
parent 8c948e62be
commit 03901123da
47 changed files with 565 additions and 1061 deletions

View File

@@ -50,9 +50,7 @@ import androidx.annotation.VisibleForTesting;
import com.aoleyun.sn.BuildConfig;
import com.aoleyun.sn.R;
import com.aoleyun.sn.base.BaseApplication;
import com.aoleyun.sn.comm.CommonConfig;
import com.aoleyun.sn.network.NetInterfaceManager;
import com.arialyy.aria.core.Aria;
import com.blankj.utilcode.util.FileUtils;
import com.google.gson.JsonObject;
@@ -62,8 +60,6 @@ import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.QRCodeWriter;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.squareup.moshi.Json;
import com.tencent.mmkv.MMKV;
import java.io.BufferedReader;
import java.io.DataOutputStream;
@@ -75,7 +71,6 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.io.Reader;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.Inet4Address;
import java.net.InetAddress;
@@ -1189,14 +1184,21 @@ public class Utils {
* @param jsonObject
*/
public static void ariaDownload(Context context, String url, JsonObject jsonObject) {
Log.e(TAG, "ariaDownload: " + jsonObject);
String fileName = getFileNamefromURL(url);
String urlMD5 = jsonObject.get("MD5").getAsString();
String urlMD5 = "";
if (jsonObject.get("MD5") == null) {
if (jsonObject.get("app_md5") != null)
urlMD5 = jsonObject.get("app_md5").getAsString();
} else {
if (jsonObject.get("MD5") != null)
urlMD5 = jsonObject.get("MD5").getAsString();
}
Log.e("ariaDownload", "urlMD5=" + urlMD5);
String p = JGYUtils.getInstance().getDownLoadPath();
File file = new File(JGYUtils.getInstance().getDownLoadPath() + fileName);
if (file.exists() && !file.isDirectory()) {
String filenameMD5 = getMD5fromFileName(url);
String fileMD5 = FileUtils.getFileMD5ToString(file);
Log.e("ariaDownload", "filenameMD5=" + filenameMD5);
Log.e("ariaDownload", "fileMD5=" + fileMD5);
@@ -1210,7 +1212,6 @@ public class Utils {
.ignoreFilePathOccupy()
.setExtendField(jsonObject.toString())
.create(); //启动下载}
// }
}
} else {
Aria.download(context)
@@ -1755,6 +1756,8 @@ public class Utils {
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MTKPlatform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MTK11Platform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AH6016Platform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZR6016Platform
) {
return Utils.getProperty("ro.build.display.id", "获取失败");
} else {