From 811350a1be8d9a129933f8f8c5b93dd142cfc3dc Mon Sep 17 00:00:00 2001 From: Naveen Date: Wed, 14 Sep 2022 03:11:01 +0530 Subject: [PATCH] Catch all exceptions --- .../com/simplemobiletools/dialer/services/CallService.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/dialer/services/CallService.kt b/app/src/main/kotlin/com/simplemobiletools/dialer/services/CallService.kt index 58b0d517..ed456b76 100644 --- a/app/src/main/kotlin/com/simplemobiletools/dialer/services/CallService.kt +++ b/app/src/main/kotlin/com/simplemobiletools/dialer/services/CallService.kt @@ -1,7 +1,6 @@ package com.simplemobiletools.dialer.services import android.app.KeyguardManager -import android.content.ActivityNotFoundException import android.content.Context import android.telecom.Call import android.telecom.InCallService @@ -36,8 +35,8 @@ class CallService : InCallService() { try { callNotificationManager.setupNotification(true) startActivity(CallActivity.getStartIntent(this)) - } catch (e: ActivityNotFoundException) { - // seems like startActivity can thrown AndroidRuntimeException and ActivityNotFoundException, not yet sure when and why, lets show a notification + } catch (e: Exception) { + // seems like startActivity can throw AndroidRuntimeException and ActivityNotFoundException, not yet sure when and why, lets show a notification callNotificationManager.setupNotification() } } else {