Tidied up settings screens and removed redundant settings to make it simpler.
This commit is contained in:
@@ -75,7 +75,8 @@ public class PrefActivity extends PreferenceActivity implements SharedPreference
|
|||||||
.getDefaultSharedPreferences(this.getApplicationContext());
|
.getDefaultSharedPreferences(this.getApplicationContext());
|
||||||
String dataSourceStr = SP.getString("DataSource", "Pebble");
|
String dataSourceStr = SP.getString("DataSource", "Pebble");
|
||||||
Log.i(TAG, "onBuildHeaders DataSource = " + dataSourceStr);
|
Log.i(TAG, "onBuildHeaders DataSource = " + dataSourceStr);
|
||||||
Boolean advancedMode = SP.getBoolean("advancedMode", false);
|
//Boolean advancedMode = SP.getBoolean("advancedMode", false);
|
||||||
|
Boolean advancedMode = true;
|
||||||
Log.i(TAG, "onBuildHeaders advancedMode = " + advancedMode);
|
Log.i(TAG, "onBuildHeaders advancedMode = " + advancedMode);
|
||||||
|
|
||||||
if (advancedMode) {
|
if (advancedMode) {
|
||||||
|
|||||||
@@ -1214,10 +1214,12 @@ public class SdServer extends Service implements SdDataReceiver {
|
|||||||
mLogAlarms = SP.getBoolean("LogAlarms", true);
|
mLogAlarms = SP.getBoolean("LogAlarms", true);
|
||||||
Log.v(TAG, "updatePrefs() - mLogAlarms = " + mLogAlarms);
|
Log.v(TAG, "updatePrefs() - mLogAlarms = " + mLogAlarms);
|
||||||
mUtil.writeToSysLogFile("updatePrefs() - mLogAlarms = " + mLogAlarms);
|
mUtil.writeToSysLogFile("updatePrefs() - mLogAlarms = " + mLogAlarms);
|
||||||
mLogData = SP.getBoolean("LogData", true);
|
//mLogData = SP.getBoolean("LogData", true);
|
||||||
|
mLogData = true;
|
||||||
Log.v(TAG, "SdServer.updatePrefs() - mLogData = " + mLogData);
|
Log.v(TAG, "SdServer.updatePrefs() - mLogData = " + mLogData);
|
||||||
mUtil.writeToSysLogFile("updatePrefs() - mLogData = " + mLogData);
|
mUtil.writeToSysLogFile("updatePrefs() - mLogData = " + mLogData);
|
||||||
mLogDataRemote = SP.getBoolean("LogDataRemote", false);
|
//mLogDataRemote = SP.getBoolean("LogDataRemote", false);
|
||||||
|
mLogDataRemote = true;
|
||||||
Log.v(TAG, "updatePrefs() - mLogDataRemote = " + mLogDataRemote);
|
Log.v(TAG, "updatePrefs() - mLogDataRemote = " + mLogDataRemote);
|
||||||
mUtil.writeToSysLogFile("updatePrefs() - mLogDataRemote = " + mLogDataRemote);
|
mUtil.writeToSysLogFile("updatePrefs() - mLogDataRemote = " + mLogDataRemote);
|
||||||
mLogDataRemoteMobile = SP.getBoolean("LogDataRemoteMobile", false);
|
mLogDataRemoteMobile = SP.getBoolean("LogDataRemoteMobile", false);
|
||||||
@@ -1232,15 +1234,16 @@ public class SdServer extends Service implements SdDataReceiver {
|
|||||||
mEventDuration = Integer.parseInt(prefVal);
|
mEventDuration = Integer.parseInt(prefVal);
|
||||||
Log.v(TAG, "mEventDuration=" + mEventDuration);
|
Log.v(TAG, "mEventDuration=" + mEventDuration);
|
||||||
|
|
||||||
mAutoPruneDb = SP.getBoolean("AutoPruneDb", false);
|
mAutoPruneDb = SP.getBoolean("AutoPruneDb", true);
|
||||||
Log.v(TAG, "mAutoPruneDb=" + mAutoPruneDb);
|
Log.v(TAG, "mAutoPruneDb=" + mAutoPruneDb);
|
||||||
|
|
||||||
prefVal = SP.getString("DataRetentionPeriod", "28");
|
prefVal = SP.getString("DataRetentionPeriod", "28");
|
||||||
mDataRetentionPeriod = Integer.parseInt(prefVal);
|
mDataRetentionPeriod = Integer.parseInt(prefVal);
|
||||||
Log.v(TAG, "mDataRetentionPeriod=" + mDataRetentionPeriod);
|
Log.v(TAG, "mDataRetentionPeriod=" + mDataRetentionPeriod);
|
||||||
|
|
||||||
prefVal = SP.getString("RemoteLogPeriod", "60");
|
//prefVal = SP.getString("RemoteLogPeriod", "60");
|
||||||
mRemoteLogPeriod = Integer.parseInt(prefVal);
|
//mRemoteLogPeriod = Integer.parseInt(prefVal);
|
||||||
|
mRemoteLogPeriod = 60;
|
||||||
Log.v(TAG, "mRemoteLogPeriod=" + mRemoteLogPeriod);
|
Log.v(TAG, "mRemoteLogPeriod=" + mRemoteLogPeriod);
|
||||||
|
|
||||||
//mOSDUname = SP.getString("OSDUname", "<username>");
|
//mOSDUname = SP.getString("OSDUname", "<username>");
|
||||||
|
|||||||
@@ -8,12 +8,6 @@
|
|||||||
android:entryValues="@array/datasource_list_values"
|
android:entryValues="@array/datasource_list_values"
|
||||||
android:defaultValue="Phone"
|
android:defaultValue="Phone"
|
||||||
android:dialogTitle="@string/select_datasource_title" />
|
android:dialogTitle="@string/select_datasource_title" />
|
||||||
<Preference
|
|
||||||
android:key="SelectBLEDevice"
|
|
||||||
android:title="@string/select_ble_device_title"
|
|
||||||
android:summary="@string/select_ble_device_desc"
|
|
||||||
android:widgetLayout="@layout/pref_select_ble_device_button"
|
|
||||||
/>
|
|
||||||
<!--
|
<!--
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
@@ -63,11 +57,11 @@
|
|||||||
android:key="PreventSleep"
|
android:key="PreventSleep"
|
||||||
android:summary="@string/prevent_sleep_summary"
|
android:summary="@string/prevent_sleep_summary"
|
||||||
android:title="@string/prevent_sleep_title" />
|
android:title="@string/prevent_sleep_title" />
|
||||||
<EditTextPreference
|
<!--<EditTextPreference
|
||||||
android:defaultValue="1000"
|
android:defaultValue="1000"
|
||||||
android:key="UpdatePeriod"
|
android:key="UpdatePeriod"
|
||||||
android:summary="@string/data_update_period_summary"
|
android:summary="@string/data_update_period_summary"
|
||||||
android:title="@string/data_update_period_title" />
|
android:title="@string/data_update_period_title" />-->
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="AutoStart"
|
android:key="AutoStart"
|
||||||
@@ -75,6 +69,12 @@
|
|||||||
android:title="@string/auto_start_title"
|
android:title="@string/auto_start_title"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
/>
|
/>
|
||||||
|
<Preference
|
||||||
|
android:key="SelectBLEDevice"
|
||||||
|
android:title="@string/select_ble_device_title"
|
||||||
|
android:summary="@string/select_ble_device_desc"
|
||||||
|
android:widgetLayout="@layout/pref_select_ble_device_button"
|
||||||
|
/>
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue=""
|
android:defaultValue=""
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<CheckBoxPreference
|
<!--<CheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="LogAlarms"
|
android:key="LogAlarms"
|
||||||
android:summary="@string/log_alarms_summary"
|
android:summary="@string/log_alarms_summary"
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="LogData"
|
android:key="LogData"
|
||||||
android:summary="@string/log_data_summary"
|
android:summary="@string/log_data_summary"
|
||||||
android:title="@string/log_data_title" />
|
android:title="@string/log_data_title" /> -->
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue="150"
|
android:defaultValue="150"
|
||||||
android:key="EventDurationSec"
|
android:key="EventDurationSec"
|
||||||
@@ -25,28 +25,27 @@
|
|||||||
android:key="DataRetentionPeriod"
|
android:key="DataRetentionPeriod"
|
||||||
android:summary="@string/dataRetentionPeriodSummary"
|
android:summary="@string/dataRetentionPeriodSummary"
|
||||||
android:title="@string/dataRetentionPeriodTitle" />
|
android:title="@string/dataRetentionPeriodTitle" />
|
||||||
|
<!--<CheckBoxPreference
|
||||||
<CheckBoxPreference
|
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="LogDataRemote"
|
android:key="LogDataRemote"
|
||||||
android:summary="@string/log_data_remote_summary"
|
android:summary="@string/log_data_remote_summary"
|
||||||
android:title="@string/log_data_remote_title" />
|
android:title="@string/log_data_remote_title" /> -->
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="LogDataRemoteMobile"
|
android:key="LogDataRemoteMobile"
|
||||||
android:summary="@string/log_data_remote_mobile_summary"
|
android:summary="@string/log_data_remote_mobile_summary"
|
||||||
android:title="@string/log_data_remote_mobile_title" />
|
android:title="@string/log_data_remote_mobile_title" />
|
||||||
<EditTextPreference
|
<!--<EditTextPreference
|
||||||
android:defaultValue="60"
|
android:defaultValue="60"
|
||||||
android:key="RemoteLogPeriod"
|
android:key="RemoteLogPeriod"
|
||||||
android:summary="@string/remoteLogPeriodSummary"
|
android:summary="@string/remoteLogPeriodSummary"
|
||||||
android:title="@string/remoteLogPeriodTitle" />
|
android:title="@string/remoteLogPeriodTitle" />-->
|
||||||
|
|
||||||
<EditTextPreference
|
<!--<EditTextPreference
|
||||||
android:defaultValue="https://osdapi.ddns.net/"
|
android:defaultValue="https://osdapi.ddns.net/"
|
||||||
android:key="OSDUrl"
|
android:key="OSDUrl"
|
||||||
android:summary="@string/remote_url_summary"
|
android:summary="@string/remote_url_summary"
|
||||||
android:title="@string/remote_url_title" />
|
android:title="@string/remote_url_title" /> -->
|
||||||
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<preference-headers
|
<preference-headers
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<header android:fragment="uk.org.openseizuredetector.PrefActivity$BasicPrefsFragment"
|
<!--<header android:fragment="uk.org.openseizuredetector.PrefActivity$BasicPrefsFragment"
|
||||||
android:icon="@drawable/icon_24x24"
|
android:icon="@drawable/icon_24x24"
|
||||||
android:title="@string/basic_settings_title"
|
android:title="@string/basic_settings_title"
|
||||||
android:summary="@string/basic_settings_summary" />
|
android:summary="@string/basic_settings_summary" />-->
|
||||||
|
|
||||||
<header android:fragment="uk.org.openseizuredetector.PrefActivity$GeneralPrefsFragment"
|
<header android:fragment="uk.org.openseizuredetector.PrefActivity$GeneralPrefsFragment"
|
||||||
android:icon="@drawable/icon_24x24"
|
android:icon="@drawable/icon_24x24"
|
||||||
|
|||||||
Reference in New Issue
Block a user