Some versioning fixes
This commit is contained in:
parent
2592cb6019
commit
df21539311
@ -15,8 +15,8 @@ import java.io.InputStream;
|
||||
|
||||
public class DownloadBusybox extends ParallelTask<Void, Void, Void> {
|
||||
|
||||
private static final String BUSYBOX_ARM = "https://github.com/topjohnwu/ndk-busybox/releases/download/1.27.1/busybox-arm";
|
||||
private static final String BUSYBOX_X86 = "https://github.com/topjohnwu/ndk-busybox/releases/download/1.27.1/busybox-x86";
|
||||
private static final String BUSYBOX_ARM = "https://github.com/topjohnwu/ndk-busybox/releases/download/1.27.2/busybox-arm";
|
||||
private static final String BUSYBOX_X86 = "https://github.com/topjohnwu/ndk-busybox/releases/download/1.27.2/busybox-x86";
|
||||
|
||||
private File busybox;
|
||||
|
||||
|
@ -5,8 +5,10 @@ import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import com.topjohnwu.magisk.MagiskManager;
|
||||
import com.topjohnwu.magisk.module.Repo;
|
||||
import com.topjohnwu.magisk.utils.Logger;
|
||||
import com.topjohnwu.magisk.utils.Utils;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@ -18,10 +20,12 @@ public class RepoDatabaseHelper extends SQLiteOpenHelper {
|
||||
private static final int MIN_TEMPLATE_VER = 3;
|
||||
|
||||
private SQLiteDatabase mDb;
|
||||
private MagiskManager mm;
|
||||
|
||||
public RepoDatabaseHelper(Context context) {
|
||||
super(context, "repo.db", null, DATABASE_VER);
|
||||
mDb = getWritableDatabase();
|
||||
mm = Utils.getMagiskManager(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -70,7 +74,7 @@ public class RepoDatabaseHelper extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
public Cursor getRepoCursor() {
|
||||
return mDb.query(TABLE_NAME, null, "template>=?", new String[] { String.valueOf(MIN_TEMPLATE_VER) }, null, null, "name COLLATE NOCASE");
|
||||
return mDb.query(TABLE_NAME, null, "template>=? AND template<=?", new String[] { String.valueOf(MIN_TEMPLATE_VER), String.valueOf(mm.magiskVersionCode) }, null, null, "name COLLATE NOCASE");
|
||||
}
|
||||
|
||||
public List<String> getRepoIDList() {
|
||||
|
@ -350,7 +350,7 @@ public class Utils {
|
||||
DownloadReceiver receiver = null;
|
||||
switch (idx) {
|
||||
case 1:
|
||||
if (mm.remoteMagiskVersionCode < 1370) {
|
||||
if (mm.remoteMagiskVersionCode < 1400) {
|
||||
mm.toast(R.string.no_boot_file_patch_support, Toast.LENGTH_LONG);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user