Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Julian Dehm
briar
Commits
bffd78d4
Verified
Commit
bffd78d4
authored
Aug 14, 2018
by
Torsten Grote
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a dedicated summary for 'never lock Briar' for proper English
parent
04ffff09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
briar-android/src/main/java/org/briarproject/briar/android/settings/SettingsFragment.java
...briarproject/briar/android/settings/SettingsFragment.java
+17
-3
briar-android/src/main/res/values/strings.xml
briar-android/src/main/res/values/strings.xml
+3
-1
No files found.
briar-android/src/main/java/org/briarproject/briar/android/settings/SettingsFragment.java
View file @
bffd78d4
...
...
@@ -460,7 +460,20 @@ public class SettingsFragment extends PreferenceFragmentCompat
int
timeout
=
settings
.
getInt
(
PREF_SCREEN_LOCK_TIMEOUT
,
Integer
.
valueOf
(
getString
(
R
.
string
.
pref_lock_timeout_value_default
)));
screenLockTimeout
.
setValue
(
String
.
valueOf
(
timeout
));
String
newValue
=
String
.
valueOf
(
timeout
);
screenLockTimeout
.
setValue
(
newValue
);
setScreenLockTimeoutSummary
(
newValue
);
}
}
private
void
setScreenLockTimeoutSummary
(
String
timeout
)
{
String
never
=
getString
(
R
.
string
.
pref_lock_timeout_value_never
);
if
(
timeout
.
equals
(
never
))
{
screenLockTimeout
.
setSummary
(
R
.
string
.
pref_lock_timeout_never_summary
);
}
else
{
screenLockTimeout
.
setSummary
(
R
.
string
.
pref_lock_timeout_summary
);
}
}
...
...
@@ -525,9 +538,10 @@ public class SettingsFragment extends PreferenceFragmentCompat
storeSettings
(
s
);
}
else
if
(
preference
==
screenLockTimeout
)
{
Settings
s
=
new
Settings
();
s
.
putInt
(
PREF_SCREEN_LOCK_TIMEOUT
,
Integer
.
valueOf
(
(
String
)
newV
alue
));
String
value
=
(
String
)
newValue
;
s
.
putInt
(
PREF_SCREEN_LOCK_TIMEOUT
,
Integer
.
valueOf
(
v
alue
));
storeSettings
(
s
);
setScreenLockTimeoutSummary
(
value
);
}
else
if
(
preference
==
notifyPrivateMessages
)
{
Settings
s
=
new
Settings
();
s
.
putBoolean
(
PREF_NOTIFY_PRIVATE
,
(
Boolean
)
newValue
);
...
...
briar-android/src/main/res/values/strings.xml
View file @
bffd78d4
...
...
@@ -361,13 +361,15 @@
<string
name=
"pref_lock_summary"
>
Use the device\'s screen lock to protect Briar while signed in
</string>
<string
name=
"pref_lock_disabled_summary"
>
Set up a screen lock for your device to protect Briar while signed in
</string>
<string
name=
"pref_lock_timeout_title"
>
Screen Lock Inactivity Timeout
</string>
<!-- The %s placeholder is replaces with the following time spans, e.g. after 5 Minutes -->
<string
name=
"pref_lock_timeout_summary"
>
When not using Briar, automatically lock it %s
</string>
<string
name=
"pref_lock_timeout_never"
>
never
</string>
<string
name=
"pref_lock_timeout_1"
>
after 1 Minute
</string>
<string
name=
"pref_lock_timeout_5"
>
after 5 Minutes
</string>
<string
name=
"pref_lock_timeout_15"
>
after 15 Minutes
</string>
<string
name=
"pref_lock_timeout_30"
>
after 30 Minutes
</string>
<string
name=
"pref_lock_timeout_60"
>
after 1 Hour
</string>
<string
name=
"pref_lock_timeout_never"
>
never
</string>
<string
name=
"pref_lock_timeout_never_summary"
>
Never lock Briar automatically
</string>
<string
name=
"change_password"
>
Change password
</string>
<string
name=
"current_password"
>
Current password
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment