diff --git a/src/main/java/com/topjohnwu/magisk/asyncs/CheckSafetyNet.java b/src/main/java/com/topjohnwu/magisk/asyncs/CheckSafetyNet.java index 603c7aefb..7f64eaa0c 100644 --- a/src/main/java/com/topjohnwu/magisk/asyncs/CheckSafetyNet.java +++ b/src/main/java/com/topjohnwu/magisk/asyncs/CheckSafetyNet.java @@ -43,14 +43,14 @@ public class CheckSafetyNet extends ParallelTask { conn.disconnect(); } - private void dyload() throws ReflectiveOperationException { + private void dyload() throws Exception { loader = new DexClassLoader(dexPath.getPath(), dexPath.getParent(), null, ClassLoader.getSystemClassLoader()); helperClazz = loader.loadClass(Const.SNET_PKG + ".SafetyNetHelper"); callbackClazz = loader.loadClass(Const.SNET_PKG + ".SafetyNetCallback"); int snet_ver = (int) helperClazz.getMethod("getVersion").invoke(null); if (snet_ver != Const.SNET_VER) { - throw new ReflectiveOperationException(); + throw new Exception(); } } @@ -59,7 +59,7 @@ public class CheckSafetyNet extends ParallelTask { try { try { dyload(); - } catch (ReflectiveOperationException e) { + } catch (Exception e) { // If dynamic load failed, try re-downloading and reload dlSnet(); dyload();