Merge branch '202-unable-to-change-sms-count-down-timer' into beta
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:versionCode="147"
|
||||
android:versionName="4.3.0a">
|
||||
android:versionName="4.2.11b">
|
||||
<!-- android:allowBackup="false" -->
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
|
||||
@@ -128,7 +128,8 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
private String[] mSMSNumbers;
|
||||
private String mSMSMsgStr = "default SMS Message";
|
||||
public Time mSMSTime = null; // last time we sent an SMS Alarm (limited to one per minute)
|
||||
public SmsTimer mSmsTimer = null; // Timer to wait 10 seconds before sending an alert to give the user chance to cancel it.
|
||||
public SmsTimer mSmsTimer = null; // Timer to wait for specified time before sending an alert to give the user chance to cancel it.
|
||||
public int mSmsTimerSecs = 10; // Time delay in seconds before sending SMS alert.
|
||||
private AlertDialog.Builder mSMSAlertDialog; // Dialog shown during countdown to sending SMS.
|
||||
|
||||
// Data Logging Parameters
|
||||
@@ -993,7 +994,7 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
mSmsTimer =
|
||||
new SmsTimer(10 * 1000, 1000);
|
||||
new SmsTimer(mSmsTimerSecs * 1000, 1000);
|
||||
mSmsTimer.start();
|
||||
}
|
||||
});
|
||||
@@ -1265,6 +1266,11 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
mUtil.writeToSysLogFile("updatePrefs() - SMSNumberStr = " + SMSNumberStr);
|
||||
Log.v(TAG, "updatePrefs() - mSMSNumbers = " + mSMSNumbers);
|
||||
mUtil.writeToSysLogFile("updatePrefs() - mSMSNumbers = " + mSMSNumbers);
|
||||
|
||||
String smsDelayPeriodStr = SP.getString("SMSDelayPeriod","10");
|
||||
mSmsTimerSecs = Integer.parseInt(smsDelayPeriodStr);
|
||||
Log.v(TAG,"updatePrefs() - mSmsTimerSecs = "+mSmsTimerSecs);
|
||||
|
||||
mLogAlarms = SP.getBoolean("LogAlarms", true);
|
||||
Log.v(TAG, "updatePrefs() - mLogAlarms = " + mLogAlarms);
|
||||
mUtil.writeToSysLogFile("updatePrefs() - mLogAlarms = " + mLogAlarms);
|
||||
@@ -1314,7 +1320,7 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
|
||||
mUseNewUi = SP.getBoolean("UseNewUi", false);
|
||||
} catch (Exception ex) {
|
||||
Log.v(TAG, "updatePrefs() - Problem parsing preferences!");
|
||||
Log.v(TAG, "updatePrefs() - Problem parsing preferences!" + ex.toString());
|
||||
mUtil.writeToSysLogFile("SdServer.updatePrefs() - Error " + ex.toString());
|
||||
mUtil.showToast(getString(R.string.problem_parsing_preferences));
|
||||
}
|
||||
|
||||
@@ -581,4 +581,6 @@
|
||||
<string name="ActivityPermissionWarning">Problem with Activity Detection Permissions</string>
|
||||
<string name="activity_permissions_required">Activity Detection Permission Required.</string>
|
||||
<string name="activity_permissions_rationale">Permission required to analyse your movements to detect seizure activity.</string>
|
||||
<string name="sms_delay_sec">SMS Delay (sec)</string>
|
||||
<string name="sms_delay_sec_desc">The number of seconds to delay between an alarm initiating and an SMS message being sent (default=10)</string>
|
||||
</resources>
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
android:key="SMSAlarm"
|
||||
android:summary="@string/enable_sms_alarm_summary"
|
||||
android:title="@string/enable_sms_alarm_title" />
|
||||
<EditTextPreference
|
||||
android:key="SMSDelayPeriod"
|
||||
android:title="@string/sms_delay_sec"
|
||||
android:summary="@string/sms_delay_sec_desc"
|
||||
android:inputType="number"
|
||||
android:defaultValue="10" />
|
||||
<EditTextPreference
|
||||
android:defaultValue=""
|
||||
android:key="SMSNumbers"
|
||||
|
||||
Reference in New Issue
Block a user