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",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"versionCode": 83,
|
"versionCode": 84,
|
||||||
"versionName": "3.6.2a",
|
"versionName": "3.6.2b",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -393,10 +393,6 @@ public class SdServer extends Service implements SdDataReceiver {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Cancel the notification.
|
|
||||||
Log.v(TAG, "onDestroy(): cancelling notification");
|
|
||||||
mUtil.writeToSysLogFile("SdServer.onDestroy - cancelling notification");
|
|
||||||
mNM.cancel(NOTIFICATION_ID);
|
|
||||||
// Stop web server
|
// Stop web server
|
||||||
Log.v(TAG, "onDestroy(): stopping web server");
|
Log.v(TAG, "onDestroy(): stopping web server");
|
||||||
mUtil.writeToSysLogFile("SdServer.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.release();
|
||||||
mToneGenerator = null;
|
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.
|
// stop this service.
|
||||||
Log.v(TAG, "onDestroy(): calling stopSelf()");
|
Log.v(TAG, "onDestroy(): calling stopSelf()");
|
||||||
mUtil.writeToSysLogFile("SdServer.onDestroy() - stopping self");
|
mUtil.writeToSysLogFile("SdServer.onDestroy() - stopping self");
|
||||||
|
|||||||
Reference in New Issue
Block a user