Prevent crash when sending SMS message if the mLocationFinder variable is null - don't know why it would ever be null, but a user reported a crash in this condition.
This commit is contained in:
BIN
app/release/app-release-4.0.2.apk
Normal file
BIN
app/release/app-release-4.0.2.apk
Normal file
Binary file not shown.
@@ -2,8 +2,8 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="uk.org.openseizuredetector"
|
package="uk.org.openseizuredetector"
|
||||||
android:versionCode="98"
|
android:versionCode="99"
|
||||||
android:versionName="4.0.1">
|
android:versionName="4.0.2">
|
||||||
<!-- android:allowBackup="false" -->
|
<!-- android:allowBackup="false" -->
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|||||||
@@ -1289,6 +1289,7 @@ public class SdServer extends Service implements SdDataReceiver {
|
|||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
Log.v(TAG, "SmsTimer.onFinish()");
|
Log.v(TAG, "SmsTimer.onFinish()");
|
||||||
mTimeLeft = 0;
|
mTimeLeft = 0;
|
||||||
|
if (mLocationFinder != null) {
|
||||||
mLocationFinder.getLocation(this);
|
mLocationFinder.getLocation(this);
|
||||||
Location loc = mLocationFinder.getLastLocation();
|
Location loc = mLocationFinder.getLastLocation();
|
||||||
if (loc != null) {
|
if (loc != null) {
|
||||||
@@ -1298,6 +1299,10 @@ public class SdServer extends Service implements SdDataReceiver {
|
|||||||
} else {
|
} else {
|
||||||
Log.i(TAG, "SmsTimer.onFinish() - Last Location is Null so sending first SMS without location.");
|
Log.i(TAG, "SmsTimer.onFinish() - Last Location is Null so sending first SMS without location.");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Log.e(TAG,"SmsTImer.onFinish() - mLocationFinder is NULL - this should not happen!");
|
||||||
|
mUtil.showToast("Error Finding Location - mLocationFinder is null - please report this issue!");
|
||||||
|
}
|
||||||
Log.i(TAG, "SmsTimer.onFinish() - Sending to " + mSMSNumbers.length + " Numbers");
|
Log.i(TAG, "SmsTimer.onFinish() - Sending to " + mSMSNumbers.length + " Numbers");
|
||||||
mUtil.writeToSysLogFile("SdServer.SmsTimer.onFinish()");
|
mUtil.writeToSysLogFile("SdServer.SmsTimer.onFinish()");
|
||||||
Time tnow = new Time(Time.getCurrentTimezone());
|
Time tnow = new Time(Time.getCurrentTimezone());
|
||||||
|
|||||||
Reference in New Issue
Block a user