Remove support for Magisk lower than 1500

This commit is contained in:
topjohnwu
2018-10-20 15:04:15 -04:00
parent dd9ddd2019
commit e7e580e177
8 changed files with 32 additions and 54 deletions

View File

@@ -95,8 +95,7 @@ public class Data {
try {
magiskVersionString = ShellUtils.fastCmd("magisk -v").split(":")[0];
magiskVersionCode = Integer.parseInt(ShellUtils.fastCmd("magisk -V"));
String s = ShellUtils.fastCmd((magiskVersionCode >= Const.MAGISK_VER.RESETPROP_PERSIST ?
"resetprop -p " : "getprop ") + Const.MAGISKHIDE_PROP);
String s = ShellUtils.fastCmd(("resetprop -p ") + Const.MAGISKHIDE_PROP);
magiskHide = s.isEmpty() || Integer.parseInt(s) != 0;
} catch (NumberFormatException ignored) {}
}