mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Move security settings into own screen
This commit is contained in:
10
briar-android/src/main/res/drawable/ic_settings_security.xml
Normal file
10
briar-android/src/main/res/drawable/ic_settings_security.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?android:attr/textColorPrimary"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z" />
|
||||
</vector>
|
||||
@@ -12,58 +12,10 @@
|
||||
app:fragment="org.briarproject.briar.android.settings.ConnectionsFragment"
|
||||
app:icon="@drawable/ic_connect_without_contact" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<SwitchPreference
|
||||
android:enabled="false"
|
||||
android:key="pref_key_lock"
|
||||
android:persistent="false"
|
||||
android:summary="@string/pref_lock_summary"
|
||||
android:title="@string/pref_lock_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/pref_lock_timeout_value_default"
|
||||
android:dependency="pref_key_lock"
|
||||
android:entries="@array/pref_key_lock_timeout_entries"
|
||||
android:entryValues="@array/pref_key_lock_timeout_values"
|
||||
android:key="pref_key_lock_timeout"
|
||||
android:persistent="false"
|
||||
android:summary="@string/pref_lock_timeout_summary"
|
||||
android:title="@string/pref_lock_timeout_title"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_change_password"
|
||||
android:title="@string/change_password"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.login.ChangePasswordActivity"
|
||||
android:targetPackage="@string/app_package" />
|
||||
</Preference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
android:title="@string/panic_setting_title">
|
||||
|
||||
<Preference
|
||||
android:summary="@string/panic_setting_hint"
|
||||
android:title="@string/panic_setting"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.panic.PanicPreferencesActivity"
|
||||
android:targetPackage="@string/app_package" />
|
||||
|
||||
</Preference>
|
||||
|
||||
</PreferenceCategory>
|
||||
<Preference
|
||||
android:title="@string/security_settings_title"
|
||||
app:fragment="org.briarproject.briar.android.settings.SecurityFragment"
|
||||
app:icon="@drawable/ic_settings_security" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
|
||||
54
briar-android/src/main/res/xml/settings_security.xml
Normal file
54
briar-android/src/main/res/xml/settings_security.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<SwitchPreference
|
||||
android:enabled="false"
|
||||
android:key="pref_key_lock"
|
||||
android:persistent="false"
|
||||
android:summary="@string/pref_lock_summary"
|
||||
android:title="@string/pref_lock_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/pref_lock_timeout_value_default"
|
||||
android:dependency="pref_key_lock"
|
||||
android:enabled="false"
|
||||
android:entries="@array/pref_key_lock_timeout_entries"
|
||||
android:entryValues="@array/pref_key_lock_timeout_values"
|
||||
android:key="pref_key_lock_timeout"
|
||||
android:persistent="false"
|
||||
android:title="@string/pref_lock_timeout_title"
|
||||
app:iconSpaceReserved="false"
|
||||
tools:summary="@string/pref_lock_timeout_summary" />
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_change_password"
|
||||
android:title="@string/change_password"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.login.ChangePasswordActivity"
|
||||
android:targetPackage="@string/app_package" />
|
||||
</Preference>
|
||||
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
android:title="@string/panic_setting_title">
|
||||
|
||||
<Preference
|
||||
android:summary="@string/panic_setting_hint"
|
||||
android:title="@string/panic_setting"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.panic.PanicPreferencesActivity"
|
||||
android:targetPackage="@string/app_package" />
|
||||
|
||||
</Preference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user