mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed crash in NotificationBroadcastReceiver if coreContext isn't created when intent is received
This commit is contained in:
parent
9c855ef923
commit
502c7f9fc1
1 changed files with 5 additions and 0 deletions
|
|
@ -38,6 +38,11 @@ class NotificationBroadcastReceiver : BroadcastReceiver() {
|
|||
"$TAG Got notification broadcast for ID [$notificationId]"
|
||||
)
|
||||
|
||||
// Wait for coreContext to be ready to handle intent
|
||||
while (!coreContext.isReady()) {
|
||||
Thread.sleep(50)
|
||||
}
|
||||
|
||||
if (intent.action == NotificationsManager.INTENT_ANSWER_CALL_NOTIF_ACTION || intent.action == NotificationsManager.INTENT_HANGUP_CALL_NOTIF_ACTION) {
|
||||
handleCallIntent(intent, notificationId)
|
||||
} else if (intent.action == NotificationsManager.INTENT_REPLY_MESSAGE_NOTIF_ACTION || intent.action == NotificationsManager.INTENT_MARK_MESSAGE_AS_READ_NOTIF_ACTION) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue