mirror of https://github.com/x13a/Wasted.git
hide options when does not have lock screen system feature
This commit is contained in:
parent
1b78c42ce9
commit
92999a5ef0
|
@ -57,7 +57,18 @@ open class MainActivity : AppCompatActivity() {
|
||||||
if (prefs.code == "") prefs.code = makeCode()
|
if (prefs.code == "") prefs.code = makeCode()
|
||||||
updateCodeColorState()
|
updateCodeColorState()
|
||||||
binding.apply {
|
binding.apply {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) wipeESIM.visibility = View.GONE
|
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
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
|
android:id="@+id/wipeESIMSpace"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="2dp" />
|
android:layout_marginVertical="2dp" />
|
||||||
|
@ -87,12 +88,13 @@
|
||||||
android:stepSize="1.0" />
|
android:stepSize="1.0" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/description2"
|
android:id="@+id/maxFailedPasswordAttemptsDescription"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/max_failed_password_attempts_description" />
|
android:text="@string/max_failed_password_attempts_description" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
|
android:id="@+id/wipeOnInactivitySpace"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="8dp" />
|
android:layout_marginVertical="8dp" />
|
||||||
|
@ -105,7 +107,7 @@
|
||||||
android:text="@string/wipe_on_inactivity_switch" />
|
android:text="@string/wipe_on_inactivity_switch" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/description3"
|
android:id="@+id/wipeOnInactivityDescription"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/wipe_on_inactivity_description" />
|
android:text="@string/wipe_on_inactivity_description" />
|
||||||
|
|
Loading…
Reference in New Issue