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
|
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 {
|
||||||
|
Reference in New Issue
Block a user