Add an option to automatically lock the app

This adds an option to automatically lock the app when:
* The back button is pressed
* The device is locked

It's the first step towards implementing #7
This commit is contained in:
Alexander Bakker 2019-04-07 18:18:50 +02:00
parent 6d93b78f9a
commit 18fd88a441
5 changed files with 45 additions and 2 deletions

View file

@ -42,13 +42,18 @@
android:title="@string/pref_secure_screen_title"
android:summary="@string/pref_secure_screen_summary"
app:iconSpaceReserved="false"/>
<androidx.preference.SwitchPreferenceCompat
android:defaultValue="true"
android:key="pref_auto_lock"
android:title="@string/pref_auto_lock_title"
android:summary="@string/pref_auto_lock_summary"
app:iconSpaceReserved="false"/>
<androidx.preference.SwitchPreferenceCompat
android:defaultValue="false"
android:key="pref_tap_to_reveal"
android:title="@string/pref_tap_to_reveal_title"
android:summary="@string/pref_tap_to_reveal_summary"
app:iconSpaceReserved="false"/>
<Preference
android:key="pref_tap_to_reveal_time"
android:title="@string/pref_tap_to_reveal_time_title"