You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Removed security note
Note, and the backdrop, has been removed, since users which have chosen device that doesn't receive security updates in, at least 2 months, are getting triggered by their own choices (:
This commit is contained in:
@@ -42,7 +42,6 @@ import com.topjohnwu.superuser.ShellUtils
|
||||
import java.io.File
|
||||
import java.io.FileNotFoundException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import java.lang.reflect.Array as JArray
|
||||
|
||||
val packageName: String get() = get<Context>().packageName
|
||||
@@ -325,23 +324,6 @@ private val securityLevelFormatter get() = SimpleDateFormat("yyyy-MM-dd",
|
||||
currentLocale
|
||||
)
|
||||
|
||||
/** Friendly reminder to seek newer roms or install oem updates. */
|
||||
val isDeviceSecure: Boolean
|
||||
get() {
|
||||
val latestPermittedTime = Calendar.getInstance().apply {
|
||||
time = securityLevelDate
|
||||
add(Calendar.MONTH, 2)
|
||||
}.time.time
|
||||
return now in 0..latestPermittedTime
|
||||
}
|
||||
val securityLevelDate get() = securityLevelFormatter.parseOrNull(securityLevel) ?: Date(0)
|
||||
val securityLevel
|
||||
get() = if (SDK_INT >= Build.VERSION_CODES.M) {
|
||||
Build.VERSION.SECURITY_PATCH
|
||||
} else {
|
||||
null
|
||||
} ?: "1970-01-01" //never
|
||||
|
||||
val isSAR
|
||||
get() = ShellUtils
|
||||
.fastCmd("grep_prop ro.build.system_root_image")
|
||||
|
||||
Reference in New Issue
Block a user