mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 23:27:39 +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:
parent
cf918e7df8
commit
0783d385d5
@ -42,7 +42,6 @@ import com.topjohnwu.superuser.ShellUtils
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileNotFoundException
|
import java.io.FileNotFoundException
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
|
||||||
import java.lang.reflect.Array as JArray
|
import java.lang.reflect.Array as JArray
|
||||||
|
|
||||||
val packageName: String get() = get<Context>().packageName
|
val packageName: String get() = get<Context>().packageName
|
||||||
@ -325,23 +324,6 @@ private val securityLevelFormatter get() = SimpleDateFormat("yyyy-MM-dd",
|
|||||||
currentLocale
|
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
|
val isSAR
|
||||||
get() = ShellUtils
|
get() = ShellUtils
|
||||||
.fastCmd("grep_prop ro.build.system_root_image")
|
.fastCmd("grep_prop ro.build.system_root_image")
|
||||||
|
@ -107,18 +107,6 @@
|
|||||||
android:background="@drawable/bg_card"
|
android:background="@drawable/bg_card"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<View
|
|
||||||
gone="@{XAndroidKt.isDeviceSecure()}"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:alpha=".15"
|
|
||||||
android:background="?colorError"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/home_device_overview"
|
android:id="@+id/home_device_overview"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -196,29 +184,12 @@
|
|||||||
app:layout_constraintStart_toEndOf="@+id/home_device_overview"
|
app:layout_constraintStart_toEndOf="@+id/home_device_overview"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/home_device_extra_security_title"
|
|
||||||
style="@style/W.Home.Extra.Title"
|
|
||||||
android:text="@string/home_device_security"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/home_device_extra_security_value"
|
|
||||||
style="@style/W.Home.Extra.Value"
|
|
||||||
android:text="@{XAndroidKt.isDeviceSecure() ? @string/home_device_security_secure : @string/home_device_security_outdated}"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/home_device_extra_security_title"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/home_device_extra_security_title"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/home_device_extra_security_title"
|
|
||||||
tools:text="@string/home_device_security_secure" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/home_device_extra_version_title"
|
android:id="@+id/home_device_extra_version_title"
|
||||||
style="@style/W.Home.Extra.Title"
|
style="@style/W.Home.Extra.Title"
|
||||||
android:text="@string/home_device_system"
|
android:text="@string/home_device_system"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/home_device_extra_security_title" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/home_device_extra_version_value"
|
android:id="@+id/home_device_extra_version_value"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user