mirror of https://github.com/NekoX-Dev/NekoX.git
fix
This commit is contained in:
parent
ddf8e8b7ae
commit
dd007a01e7
|
@ -85,6 +85,11 @@ public class InternalUpdater {
|
||||||
public static void checkUpdate(Context ctx, boolean isAutoCheck) {
|
public static void checkUpdate(Context ctx, boolean isAutoCheck) {
|
||||||
if (BuildVars.isFdroid)
|
if (BuildVars.isFdroid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//cleanup
|
||||||
|
File f = new File(ApplicationLoader.getDataDirFixed(), "cache/new.apk");
|
||||||
|
if (f.exists()) f.delete();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
NekoXConfig.setNextUpdateCheck(System.currentTimeMillis() / 1000 + 24 * 3600);
|
NekoXConfig.setNextUpdateCheck(System.currentTimeMillis() / 1000 + 24 * 3600);
|
||||||
|
|
||||||
|
@ -129,7 +134,7 @@ public class InternalUpdater {
|
||||||
String urlChannel = "";
|
String urlChannel = "";
|
||||||
String urlCDNDrive = "";
|
String urlCDNDrive = "";
|
||||||
String sha1 = "";
|
String sha1 = "";
|
||||||
if (apk != null) {
|
try {
|
||||||
final String newBody = HttpUtil.get("https://api.github.com/repos/NekoX-Dev/updates/contents/" + release.name + ".txt?ref=main");
|
final String newBody = HttpUtil.get("https://api.github.com/repos/NekoX-Dev/updates/contents/" + release.name + ".txt?ref=main");
|
||||||
final GithubApiContents releaseNoteApi = new Gson().fromJson(newBody, GithubApiContents.class);
|
final GithubApiContents releaseNoteApi = new Gson().fromJson(newBody, GithubApiContents.class);
|
||||||
final String releaseNoteString = new String(Base64.decode(releaseNoteApi.content, Base64.DEFAULT));
|
final String releaseNoteString = new String(Base64.decode(releaseNoteApi.content, Base64.DEFAULT));
|
||||||
|
@ -148,6 +153,7 @@ public class InternalUpdater {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
|
|
||||||
String finalsha1 = sha1;
|
String finalsha1 = sha1;
|
||||||
|
|
Loading…
Reference in New Issue