V3.1.5 - fixed bug that crashed main activity screen when server was shutdown (introduced in 3.1.3)

This commit is contained in:
Graham Jones
2019-04-27 20:16:30 +01:00
parent 85d6d94f73
commit b33b0015bf
6 changed files with 30 additions and 23 deletions

View File

@@ -4,6 +4,9 @@
V3.2.0 - (NEXT VERSION!) V3.2.0 - (NEXT VERSION!)
- Added neural network based data analysis. - Added neural network based data analysis.
V3.1.5 - 27apr2919
- Fixed crash of MainActivity when server shutdown.
V3.1.4 - 25apr2019 V3.1.4 - 25apr2019
- Added a periodic 'Beep' during the SMS timer to alert the user that an SMS is about to be sent. - Added a periodic 'Beep' during the SMS timer to alert the user that an SMS is about to be sent.

Binary file not shown.

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":58,"versionName":"3.1.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] [{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":59,"versionName":"3.1.5","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.org.openseizuredetector" package="uk.org.openseizuredetector"
android:versionCode="58" android:versionCode="59"
android:versionName="3.1.4" android:versionName="3.1.5"
> >
<!--android:allowBackup="false"--> <!--android:allowBackup="false"-->

View File

@@ -366,7 +366,7 @@ public class MainActivity extends AppCompatActivity {
*/ */
final Runnable serverStatusRunnable = new Runnable() { final Runnable serverStatusRunnable = new Runnable() {
public void run() { public void run() {
Log.v(TAG,"serverStatusRunnable()"); Log.v(TAG, "serverStatusRunnable()");
TextView tv; TextView tv;
if (mUtil.isServerRunning()) { if (mUtil.isServerRunning()) {
@@ -434,7 +434,7 @@ public class MainActivity extends AppCompatActivity {
// Pebble Connected Phrase - use for HR if active instead. // Pebble Connected Phrase - use for HR if active instead.
tv = (TextView) findViewById(R.id.pebbleTv); tv = (TextView) findViewById(R.id.pebbleTv);
if (mConnection.mSdServer.mSdData.mHRAlarmActive) { if (mConnection.mSdServer.mSdData.mHRAlarmActive) {
tv.setText("HR = "+mConnection.mSdServer.mSdData.mHR); tv.setText("HR = " + mConnection.mSdServer.mSdData.mHR);
if (!mConnection.mSdServer.mSdData.mHRAlarmStanding) { if (!mConnection.mSdServer.mSdData.mHRAlarmStanding) {
tv.setBackgroundColor(okColour); tv.setBackgroundColor(okColour);
tv.setTextColor(okTextColour); tv.setTextColor(okTextColour);
@@ -534,7 +534,6 @@ public class MainActivity extends AppCompatActivity {
pb.setProgressDrawable(pbDrawable); pb.setProgressDrawable(pbDrawable);
// Fault Conditions - We override the values in the UI because we do not know // Fault Conditions - We override the values in the UI because we do not know
// if the stored ones are correct or not with a fault present. // if the stored ones are correct or not with a fault present.
if ((mConnection.mSdServer.mSdData.alarmState == 4) || if ((mConnection.mSdServer.mSdData.alarmState == 4) ||
@@ -614,24 +613,29 @@ public class MainActivity extends AppCompatActivity {
// deal with latch alarms button // deal with latch alarms button
Button acceptAlarmButton = (Button) findViewById(R.id.acceptAlarmButton); Button acceptAlarmButton = (Button) findViewById(R.id.acceptAlarmButton);
if ((mConnection.mSdServer.mSmsTimer != null) if (mConnection.mBound) {
&& (mConnection.mSdServer.mSmsTimer.mTimeLeft > 0 )){ if ((mConnection.mSdServer.mSmsTimer != null)
acceptAlarmButton.setText("SMS Will Be Sent in "+ && (mConnection.mSdServer.mSmsTimer.mTimeLeft > 0)) {
mConnection.mSdServer.mSmsTimer.mTimeLeft/1000 + acceptAlarmButton.setText("SMS Will Be Sent in " +
" s - CANCEL?"); mConnection.mSdServer.mSmsTimer.mTimeLeft / 1000 +
acceptAlarmButton.setBackgroundColor(alarmColour); " s - CANCEL?");
acceptAlarmButton.setEnabled(true); acceptAlarmButton.setBackgroundColor(alarmColour);
acceptAlarmButton.setEnabled(true);
} else {
acceptAlarmButton.setText("Accept Alarm");
acceptAlarmButton.setBackgroundColor(Color.DKGRAY);
if (mConnection.mBound)
if ((mConnection.mSdServer.isLatchAlarms())
|| mConnection.mSdServer.mSdData.mFallActive) {
acceptAlarmButton.setEnabled(true);
} else {
acceptAlarmButton.setEnabled(false);
}
}
} else { } else {
acceptAlarmButton.setText("Accept Alarm"); acceptAlarmButton.setText("Accept Alarm");
acceptAlarmButton.setBackgroundColor(Color.DKGRAY); acceptAlarmButton.setBackgroundColor(Color.DKGRAY);
if (mConnection.mBound) acceptAlarmButton.setEnabled(false);
if ((mConnection.mSdServer.isLatchAlarms())
|| mConnection.mSdServer.mSdData.mFallActive) {
acceptAlarmButton.setEnabled(true);
} else {
acceptAlarmButton.setEnabled(false);
}
} }
// Deal with Cancel Audible button // Deal with Cancel Audible button

View File

@@ -503,7 +503,7 @@ public class StartupActivity extends Activity {
+ "\n\nChanges in this version:" + "\n\nChanges in this version:"
+ "\n- V3.1.0 - Added fall detection algorithm into Garmin/Fitbit Data Source " + "\n- V3.1.0 - Added fall detection algorithm into Garmin/Fitbit Data Source "
+ "\n V3.1.3 - Added delay to SMS sending to give the user chance to cancel a false alarm." + "\n V3.1.3 - Added delay to SMS sending to give the user chance to cancel a false alarm."
+ "\n V3.1.4 - Added repeat alarm beeps during SMS delay to alert user.." + "\n V3.1.5 - Added repeat alarm beeps during SMS delay to alert user.."
); );
// This makes the links display as links, but they do not respond to clicks for some reason... // This makes the links display as links, but they do not respond to clicks for some reason...
Linkify.addLinks(s, Linkify.ALL); Linkify.addLinks(s, Linkify.ALL);
@@ -535,7 +535,7 @@ public class StartupActivity extends Activity {
+ "\n\nChanges in this version:" + "\n\nChanges in this version:"
+ "\n- V3.1.0 - Added fall detection algorithm into Garmin/Fitbit Data Source " + "\n- V3.1.0 - Added fall detection algorithm into Garmin/Fitbit Data Source "
+ "\n V3.1.3 - Added delay to SMS sending to give the user chance to cancel a false alarm." + "\n V3.1.3 - Added delay to SMS sending to give the user chance to cancel a false alarm."
+ "\n V3.1.4 - Added repeat alarm beeps during SMS delay to alert user.." + "\n V3.1.5 - Added repeat alarm beeps during SMS delay to alert user.."
+ "\n " + "\n "
); );
// This makes the links display as links, but they do not respond to clicks for some reason... // This makes the links display as links, but they do not respond to clicks for some reason...