[app] Allow updates only when binder is alive (#1275)

This commit is contained in:
南宫雪珊 2021-10-14 23:01:57 +08:00 committed by GitHub
parent 49e70c2f20
commit 6693631485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import com.google.gson.JsonParser;
import org.lsposed.manager.App;
import org.lsposed.manager.BuildConfig;
import org.lsposed.manager.ConfigManager;
import java.io.File;
import java.io.IOException;
@ -108,6 +109,7 @@ public class UpdateUtil {
}
public static boolean canUpdate() {
if (!ConfigManager.isBinderAlive()) return false;
var pref = App.getPreferences();
var zipTime = pref.getLong("zip_time", BuildConfig.BUILD_TIME);
return zipTime > BuildConfig.BUILD_TIME;