mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Trying to prevent issue with IncomingCallActivity not displayed sometimes
This commit is contained in:
parent
6c6a23b74f
commit
355abb9fa2
2 changed files with 5 additions and 5 deletions
|
|
@ -61,14 +61,14 @@ class IncomingCallActivity : GenericActivity() {
|
|||
if (incomingCall == null) {
|
||||
Log.e("[Incoming Call Activity] Couldn't find call in state Incoming")
|
||||
if (isTaskRoot) {
|
||||
Log.i("[Incoming Call Activity] Task is root, starting MainActivity")
|
||||
// When resuming app from recent tasks make sure MainActivity will be launched if there is no call
|
||||
val intent = Intent()
|
||||
intent.setClass(this, MainActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -118,14 +118,14 @@ class IncomingCallActivity : GenericActivity() {
|
|||
if (incomingCall == null) {
|
||||
Log.e("[Incoming Call Activity] Couldn't find call in state Incoming")
|
||||
if (isTaskRoot) {
|
||||
Log.i("[Incoming Call Activity] Task is root, starting MainActivity")
|
||||
// When resuming app from recent tasks make sure MainActivity will be launched if there is no call
|
||||
val intent = Intent()
|
||||
intent.setClass(this, MainActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ class NotificationsManager(private val context: Context) {
|
|||
context,
|
||||
0,
|
||||
incomingCallNotificationIntent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
||||
)
|
||||
|
||||
val notification = Compatibility.createIncomingCallNotification(context, call, notifiable, pendingIntent, this)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue