mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-04 14:07:32 +01:00
Really, I see no reason to look up a string for a preference key in an xml file
If we have to use a key to lookup the string for the key, we can just use that key as the preference key.
This commit is contained in:
parent
cfedf4acde
commit
d2f7169de4
@ -41,7 +41,7 @@ public class GBApplication extends Application {
|
|||||||
|
|
||||||
public static boolean isFileLoggingEnabled() {
|
public static boolean isFileLoggingEnabled() {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
|
||||||
return prefs.getBoolean(GBApplication.getContext().getString(R.string.pref_log_to_file), false);
|
return prefs.getBoolean("log_to_file", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupLogging() {
|
private void setupLogging() {
|
||||||
|
@ -102,7 +102,6 @@
|
|||||||
<string name="pref_header_vibration_count">Vibration Count</string>
|
<string name="pref_header_vibration_count">Vibration Count</string>
|
||||||
|
|
||||||
<string name="title_activity_sleepmonitor">Sleep Monitor</string>
|
<string name="title_activity_sleepmonitor">Sleep Monitor</string>
|
||||||
<string name="pref_log_to_file">LogToFile</string>
|
|
||||||
<string name="pref_write_logfiles">Write Log Files (needs restart)</string>
|
<string name="pref_write_logfiles">Write Log Files (needs restart)</string>
|
||||||
<string name="initializing">initializing</string>
|
<string name="initializing">initializing</string>
|
||||||
<string name="busy_task_fetch_activity_data">Fetching Activity Data</string>
|
<string name="busy_task_fetch_activity_data">Fetching Activity Data</string>
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
android:title="@string/pref_header_development">
|
android:title="@string/pref_header_development">
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="@string/pref_log_to_file"
|
android:key="log_to_file"
|
||||||
android:title="@string/pref_write_logfiles" />
|
android:title="@string/pref_write_logfiles" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user