Refine code style

This commit is contained in:
Mygod
2020-08-18 05:25:32 +08:00
parent 35055bc074
commit 1029728f22
11 changed files with 14 additions and 20 deletions

View File

@@ -12,7 +12,7 @@ import kotlinx.android.parcel.Parcelize
class NoShellException(cause: Throwable) : Exception("Root missing", cause)
val currentInstructionSet by lazy {
internal val currentInstructionSet by lazy {
val classVMRuntime = Class.forName("dalvik.system.VMRuntime")
val runtime = classVMRuntime.getDeclaredMethod("getRuntime").invoke(null)
classVMRuntime.getDeclaredMethod("getCurrentInstructionSet").invoke(runtime) as String
@@ -20,12 +20,12 @@ val currentInstructionSet by lazy {
private val classSystemProperties by lazy { Class.forName("android.os.SystemProperties") }
@get:RequiresApi(26)
val isVndkLite by lazy {
internal val isVndkLite by lazy {
classSystemProperties.getDeclaredMethod("getBoolean", String::class.java, Boolean::class.java).invoke(null,
"ro.vndk.lite", false) as Boolean
}
@get:RequiresApi(26)
val vndkVersion by lazy {
internal val vndkVersion by lazy {
classSystemProperties.getDeclaredMethod("get", String::class.java, String::class.java).invoke(null,
"ro.vndk.version", "") as String
}