mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed quit app when keep alive service is enabled
This commit is contained in:
parent
fe2a074d0b
commit
cd8785855d
2 changed files with 8 additions and 2 deletions
|
|
@ -777,7 +777,11 @@ class CoreContext @UiThread constructor(val context: Context) : HandlerThread("C
|
|||
CoreKeepAliveThirdPartyAccountsService::class.java
|
||||
)
|
||||
Log.i("$TAG Starting Keep alive for third party accounts Service")
|
||||
context.startService(serviceIntent)
|
||||
try {
|
||||
context.startService(serviceIntent)
|
||||
} catch (e: Exception) {
|
||||
Log.e("$TAG Failed to start keep alive service: $e")
|
||||
}
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
|
|
|||
|
|
@ -75,13 +75,15 @@ class HelpFragment : GenericMainFragment() {
|
|||
}
|
||||
|
||||
binding.setQuitClickListener {
|
||||
coreContext.stopKeepAliveService()
|
||||
|
||||
coreContext.postOnCoreThread {
|
||||
Log.i("$TAG Stopping Core Context")
|
||||
coreContext.quitSafely()
|
||||
}
|
||||
|
||||
Log.i("$TAG Quitting app")
|
||||
requireActivity().finishAffinity()
|
||||
requireActivity().finishAndRemoveTask()
|
||||
}
|
||||
|
||||
binding.setPrivacyPolicyClickListener {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue