Fix vndk detection
This commit is contained in:
@@ -19,8 +19,9 @@ object AppProcess {
|
|||||||
}
|
}
|
||||||
val prop = Class.forName("android.os.SystemProperties")
|
val prop = Class.forName("android.os.SystemProperties")
|
||||||
if (prop.getDeclaredMethod("getBoolean", String::class.java, Boolean::class.java).invoke(null,
|
if (prop.getDeclaredMethod("getBoolean", String::class.java, Boolean::class.java).invoke(null,
|
||||||
"ro.vndk.lite", false) as Boolean) return "/system/etc/ld.config.vndk_lite.txt"
|
"ro.vndk.lite", false) as Boolean) "/system/etc/ld.config.vndk_lite.txt".let {
|
||||||
when (val version = prop.getDeclaredMethod("get", String::class.java, String::class.java).invoke(null,
|
if (File(it).isFile) return it
|
||||||
|
} else when (val version = prop.getDeclaredMethod("get", String::class.java, String::class.java).invoke(null,
|
||||||
"ro.vndk.version", "") as String) {
|
"ro.vndk.version", "") as String) {
|
||||||
"", "current" -> { }
|
"", "current" -> { }
|
||||||
else -> "/system/etc/ld.config.$version.txt".let { if (File(it).isFile) return it }
|
else -> "/system/etc/ld.config.$version.txt".let { if (File(it).isFile) return it }
|
||||||
|
|||||||
Reference in New Issue
Block a user