mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
Catch all exceptions
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user