mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 02:25:28 +00:00
Prevent weird Magisk version number crashing app
This commit is contained in:
parent
906ae730e9
commit
e5be8b7f67
@ -167,10 +167,10 @@ public class MagiskFragment extends Fragment {
|
||||
|
||||
private void updateMagiskVersion() {
|
||||
List<String> ret = Shell.sh("getprop magisk.version");
|
||||
if (ret.get(0).isEmpty()) {
|
||||
magiskVersion = -1;
|
||||
} else {
|
||||
try {
|
||||
magiskVersion = Integer.parseInt(ret.get(0));
|
||||
} catch (NumberFormatException e) {
|
||||
magiskVersion = -1;
|
||||
}
|
||||
|
||||
if (magiskVersion == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user