Catch all exceptions

This commit is contained in:
Naveen 2022-09-14 03:11:01 +05:30
parent 129d9e9f66
commit 811350a1be

View File

@ -1,7 +1,6 @@
package com.simplemobiletools.dialer.services package com.simplemobiletools.dialer.services
import android.app.KeyguardManager import android.app.KeyguardManager
import android.content.ActivityNotFoundException
import android.content.Context import android.content.Context
import android.telecom.Call import android.telecom.Call
import android.telecom.InCallService import android.telecom.InCallService
@ -36,8 +35,8 @@ class CallService : InCallService() {
try { try {
callNotificationManager.setupNotification(true) callNotificationManager.setupNotification(true)
startActivity(CallActivity.getStartIntent(this)) startActivity(CallActivity.getStartIntent(this))
} catch (e: ActivityNotFoundException) { } catch (e: Exception) {
// seems like startActivity can thrown AndroidRuntimeException and ActivityNotFoundException, not yet sure when and why, lets show a notification // seems like startActivity can throw AndroidRuntimeException and ActivityNotFoundException, not yet sure when and why, lets show a notification
callNotificationManager.setupNotification() callNotificationManager.setupNotification()
} }
} else { } else {