V3.1.3 - Moved SMS timer creation to avoid an (intermittent?) fault about handlers and looper.prepare()

This commit is contained in:
Graham Jones
2019-04-22 23:17:10 +01:00
parent 111812300e
commit fc24f4d000
5 changed files with 14 additions and 6 deletions

View File

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

View File

@@ -787,11 +787,16 @@ public class SdServer extends Service implements SdDataReceiver {
mSmsTimer = null;
}
Log.v(TAG, "startSmsTimer() - starting SmsTimer");
mSmsTimer =
new SmsTimer(10 * 1000, 1000);
mSmsTimer.start();
runOnUiThread(new Runnable() {
public void run() {
mSmsTimer =
new SmsTimer(10 * 1000, 1000);
mSmsTimer.start();
}
});
}
/*
* Cancel the SMS timer to prevent the SMS message being sent..
*/