Target Android 13 on freedom as well

This commit is contained in:
Mygod
2022-12-04 12:15:58 -05:00
parent 4943c45808
commit bfc304a480
11 changed files with 20 additions and 54 deletions

View File

@@ -1,13 +0,0 @@
package be.mygod.vpnhotspot.util
import android.content.Context
import java.lang.reflect.Method
fun UnblockHelper(context: Context) {
val getDeclaredMethod = Class::class.java.getDeclaredMethod("getDeclaredMethod",
String::class.java, arrayOf<Class<*>>()::class.java)
val clazz = Class.forName("dalvik.system.VMRuntime")
val setHiddenApiExemptions = getDeclaredMethod(clazz, "setHiddenApiExemptions",
arrayOf(Array<String>::class.java)) as Method
setHiddenApiExemptions(clazz.getDeclaredMethod("getRuntime")(null), arrayOf(""))
}