Fix crash on LOHService failure

This commit is contained in:
Mygod
2018-06-11 11:00:22 +08:00
parent 9a1a3f7732
commit b5edc77a93

View File

@@ -91,6 +91,8 @@ class LocalOnlyHotspotService : IpNeighbourMonitoringService() {
}) })
Toast.makeText(this@LocalOnlyHotspotService, message, Toast.LENGTH_SHORT).show() Toast.makeText(this@LocalOnlyHotspotService, message, Toast.LENGTH_SHORT).show()
Crashlytics.logException(StartFailure(message)) Crashlytics.logException(StartFailure(message))
updateNotification()
ServiceNotification.stopForeground(this@LocalOnlyHotspotService)
} }
}, app.handler) }, app.handler)
} catch (e: IllegalStateException) { } catch (e: IllegalStateException) {