mirror of https://github.com/x13a/Wasted.git
ref
This commit is contained in:
parent
c7e504eed6
commit
0f1a47ff79
|
@ -56,19 +56,10 @@ open class MainActivity : AppCompatActivity() {
|
||||||
AppNotificationManager(this).createNotificationChannels()
|
AppNotificationManager(this).createNotificationChannels()
|
||||||
if (prefs.code == "") prefs.code = makeCode()
|
if (prefs.code == "") prefs.code = makeCode()
|
||||||
updateCodeColorState()
|
updateCodeColorState()
|
||||||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) hideESIM()
|
||||||
|
if (!packageManager.hasSystemFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN))
|
||||||
|
hideSecureLockScreenRequired()
|
||||||
binding.apply {
|
binding.apply {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
|
||||||
wipeESIMSpace.visibility = View.GONE
|
|
||||||
wipeESIM.visibility = View.GONE
|
|
||||||
}
|
|
||||||
if (!packageManager.hasSystemFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)) {
|
|
||||||
divider.visibility = View.GONE
|
|
||||||
maxFailedPasswordAttempts.visibility = View.GONE
|
|
||||||
maxFailedPasswordAttemptsDescription.visibility = View.GONE
|
|
||||||
wipeOnInactivitySpace.visibility = View.GONE
|
|
||||||
wipeOnInactivitySwitch.visibility = View.GONE
|
|
||||||
wipeOnInactivityDescription.visibility = View.GONE
|
|
||||||
}
|
|
||||||
code.text = prefs.code
|
code.text = prefs.code
|
||||||
wipeData.isChecked = prefs.isWipeData
|
wipeData.isChecked = prefs.isWipeData
|
||||||
wipeESIM.isChecked = prefs.isWipeESIM
|
wipeESIM.isChecked = prefs.isWipeESIM
|
||||||
|
@ -79,6 +70,22 @@ open class MainActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun hideESIM() {
|
||||||
|
binding.wipeESIMSpace.visibility = View.GONE
|
||||||
|
binding.wipeESIM.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun hideSecureLockScreenRequired() {
|
||||||
|
binding.apply {
|
||||||
|
divider.visibility = View.GONE
|
||||||
|
maxFailedPasswordAttempts.visibility = View.GONE
|
||||||
|
maxFailedPasswordAttemptsDescription.visibility = View.GONE
|
||||||
|
wipeOnInactivitySpace.visibility = View.GONE
|
||||||
|
wipeOnInactivitySwitch.visibility = View.GONE
|
||||||
|
wipeOnInactivityDescription.visibility = View.GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setup() {
|
private fun setup() {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
description.setOnLongClickListener {
|
description.setOnLongClickListener {
|
||||||
|
|
Loading…
Reference in New Issue