Use moveTaskToBack(true) instead of finishAndRemoveTask() when call is closed and screen is locked
This commit is contained in:
@@ -2468,7 +2468,7 @@ fun handleServiceEvent(ctx: Context, viewModel: ViewModel, event: String, params
|
|||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
val kgm = activity.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager
|
val kgm = activity.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager
|
||||||
if (kgm.isKeyguardLocked) {
|
if (kgm.isKeyguardLocked) {
|
||||||
activity.finishAndRemoveTask()
|
activity.moveTaskToBack(true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user