Fixed problem with default logging preference settings being incorrect
This commit is contained in:
@@ -137,8 +137,8 @@ public class OsdUtil implements ActivityCompat.OnRequestPermissionsResultCallbac
|
||||
try {
|
||||
mLogAlarms = SP.getBoolean("LogAlarms", true);
|
||||
Log.v(TAG, "updatePrefs() - mLogAlarms = " + mLogAlarms);
|
||||
mLogData = SP.getBoolean("LogData", false);
|
||||
Log.v(TAG, "updatePrefs() - mLogData = " + mLogData);
|
||||
mLogData = SP.getBoolean("LogData", true);
|
||||
Log.v(TAG, "OsdUtil.updatePrefs() - mLogData = " + mLogData);
|
||||
mLogSystem = SP.getBoolean("LogSystem", true);
|
||||
Log.v(TAG, "updatePrefs() - mLogSystem = " + mLogSystem);
|
||||
|
||||
|
||||
@@ -1211,7 +1211,7 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
Log.v(TAG, "updatePrefs() - mLogAlarms = " + mLogAlarms);
|
||||
mUtil.writeToSysLogFile("updatePrefs() - mLogAlarms = " + mLogAlarms);
|
||||
mLogData = SP.getBoolean("LogData", true);
|
||||
Log.v(TAG, "updatePrefs() - mLogData = " + mLogData);
|
||||
Log.v(TAG, "SdServer.updatePrefs() - mLogData = " + mLogData);
|
||||
mUtil.writeToSysLogFile( "updatePrefs() - mLogData = " + mLogData);
|
||||
mLogDataRemote = SP.getBoolean("LogDataRemote", false);
|
||||
Log.v(TAG, "updatePrefs() - mLogDataRemote = " + mLogDataRemote);
|
||||
@@ -1589,9 +1589,9 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
if (mEventsTimer != null) {
|
||||
Log.v(TAG, "stopEventsTimer(): timer already running - cancelling it.");
|
||||
mUtil.writeToSysLogFile("stopEventsTimer() - stopping timer");
|
||||
mEventsTimer.mIsRunning = false;
|
||||
mEventsTimer.cancel();
|
||||
mEventsTimer = null;
|
||||
mEventsTimer.mIsRunning = false;
|
||||
} else {
|
||||
Log.v(TAG, "stopEventsTimer(): timer not running - not doing anything.");
|
||||
}
|
||||
|
||||
@@ -86,6 +86,15 @@ public class StartupActivity extends Activity {
|
||||
.addCommaSeparatedEmailAddresses("crashreports@openseizuredetector.org.uk,")
|
||||
.build();
|
||||
|
||||
// Read the default settings from the xml preferences files, so we do
|
||||
// not have to use the hard coded ones in the java files.
|
||||
PreferenceManager.setDefaultValues(this, R.xml.alarm_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.general_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.network_datasource_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.pebble_datasource_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.seizure_detector_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.network_passive_datasource_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.logging_prefs, true);
|
||||
|
||||
mHandler = new Handler();
|
||||
mUtil = new OsdUtil(getApplicationContext(), mHandler);
|
||||
@@ -100,15 +109,6 @@ public class StartupActivity extends Activity {
|
||||
|
||||
setContentView(R.layout.startup_activity);
|
||||
|
||||
// Read the default settings from the xml preferences files, so we do
|
||||
// not have to use the hard coded ones in the java files.
|
||||
PreferenceManager.setDefaultValues(this, R.xml.alarm_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.general_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.network_datasource_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.pebble_datasource_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.seizure_detector_prefs, true);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.network_passive_datasource_prefs, true);
|
||||
|
||||
|
||||
Button b;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user