fix: launch CallActivity when call is picked from notification

- add CallActivity.getStartIntent method to get the start intent for CallActivity and update in CallNotificationManager and CallService where the CallActivity is started
- in CallActionReceiver, start the CallActivity before answering the call
This commit is contained in:
darthpaul
2021-09-20 00:02:53 +01:00
parent dd6316ae81
commit bdab26838e
4 changed files with 16 additions and 7 deletions

View File

@ -39,8 +39,7 @@ class CallNotificationManager(private val context: Context) {
}
}
val openAppIntent = Intent(context, CallActivity::class.java)
openAppIntent.flags = Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT
val openAppIntent = CallActivity.getStartIntent(context)
val openAppPendingIntent = PendingIntent.getActivity(context, 0, openAppIntent, 0)
val acceptCallIntent = Intent(context, CallActionReceiver::class.java)