mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-02-20 21:41:04 +01:00
Catch all exceptions
This commit is contained in:
parent
129d9e9f66
commit
811350a1be
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user