mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Hopefully mitigated some very odd multiplayer-checker-related crashes
This commit is contained in:
parent
1bb26c579d
commit
18b2c5868b
@ -64,11 +64,14 @@ class AndroidLauncher : AndroidApplication() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
try { // Sometimes this fails for no apparent reason - the multiplayer checker failing to cancel should not be enough of a reason for the game to crash!
|
||||||
WorkManager.getInstance(applicationContext).cancelAllWorkByTag(MultiplayerTurnCheckWorker.WORK_TAG)
|
WorkManager.getInstance(applicationContext).cancelAllWorkByTag(MultiplayerTurnCheckWorker.WORK_TAG)
|
||||||
with(NotificationManagerCompat.from(this)) {
|
with(NotificationManagerCompat.from(this)) {
|
||||||
cancel(MultiplayerTurnCheckWorker.NOTIFICATION_ID_INFO)
|
cancel(MultiplayerTurnCheckWorker.NOTIFICATION_ID_INFO)
|
||||||
cancel(MultiplayerTurnCheckWorker.NOTIFICATION_ID_SERVICE)
|
cancel(MultiplayerTurnCheckWorker.NOTIFICATION_ID_SERVICE)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (ex:Exception){}
|
||||||
super.onResume()
|
super.onResume()
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user