[Android] SafeMode: remove relock button when disabled
Duncan McNamara
git at videolan.org
Mon Aug 5 12:21:23 UTC 2024
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Fri Jul 19 15:24:14 2024 +0200| [4c9e2e274873cb5ebba096ce0d06f4ab42a38520] | committer: Nicolas Pomepuy
SafeMode: remove relock button when disabled
If the safe mode is unlocked, and then in the settings, disabled, the
"re-lock" button would still stay visible. This removes it, if the
setting is changed.
> https://code.videolan.org/videolan/vlc-android/commit/4c9e2e274873cb5ebba096ce0d06f4ab42a38520
---
application/vlc-android/src/org/videolan/vlc/gui/BaseActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/BaseActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/BaseActivity.kt
index 601bc407ab..c15ad4fddf 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/BaseActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/BaseActivity.kt
@@ -98,7 +98,7 @@ abstract class BaseActivity : AppCompatActivity() {
override fun onPrepareOptionsMenu(menu: Menu?): Boolean {
val relockItem = menu?.findItem(R.id.pin_relocked)
if (relockItem != null) {
- relockItem.isVisible = PinCodeDelegate.pinUnlocked.value == true
+ relockItem.isVisible = Settings.safeMode && PinCodeDelegate.pinUnlocked.value == true
}
val unlockItem = menu?.findItem(R.id.pin_unlock)
if (unlockItem != null) {
More information about the Android
mailing list