Adjusted sdserver shutdown to try to stop odd crashes on some phones.
This commit is contained in:
BIN
app/release/app-release-3.6.2b.apk
Normal file
BIN
app/release/app-release-3.6.2b.apk
Normal file
Binary file not shown.
Binary file not shown.
@@ -10,8 +10,8 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 83,
|
||||
"versionName": "3.6.2a",
|
||||
"versionCode": 84,
|
||||
"versionName": "3.6.2b",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -393,10 +393,6 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
|
||||
|
||||
try {
|
||||
// Cancel the notification.
|
||||
Log.v(TAG, "onDestroy(): cancelling notification");
|
||||
mUtil.writeToSysLogFile("SdServer.onDestroy - cancelling notification");
|
||||
mNM.cancel(NOTIFICATION_ID);
|
||||
// Stop web server
|
||||
Log.v(TAG, "onDestroy(): stopping web server");
|
||||
mUtil.writeToSysLogFile("SdServer.onDestroy() - stopping Web Server");
|
||||
@@ -406,6 +402,12 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
mToneGenerator.release();
|
||||
mToneGenerator = null;
|
||||
|
||||
this.stopForeground(true);
|
||||
// Cancel the notification.
|
||||
Log.v(TAG, "onDestroy(): cancelling notification");
|
||||
mUtil.writeToSysLogFile("SdServer.onDestroy - cancelling notification");
|
||||
mNM.cancel(NOTIFICATION_ID);
|
||||
|
||||
// stop this service.
|
||||
Log.v(TAG, "onDestroy(): calling stopSelf()");
|
||||
mUtil.writeToSysLogFile("SdServer.onDestroy() - stopping self");
|
||||
|
||||
Reference in New Issue
Block a user