diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ea0185b6..baed65906 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,9 +25,11 @@ Group changes to describe their impact on the project, as follows: - Improved how contact avatars are generated - 3-dots menu even for basic chat rooms with more options - Phone numbers & email addresses are now clickable links in chat messages +- Go to call activity when there is at least one active call and you click on launcher icon ### Fixed - Multiple file download attempt from the same chat bubble at the same time needed app restart to properly download each file +- Call stopped when removing app from recent tasks - Generated avatars in dark mode - Call state in self-managed TelecomManager service if it takes longer to be created than the call to be answered - Show service notification sooner to prevent crash if Core creation takes too long diff --git a/app/src/main/java/org/linphone/activities/main/MainActivity.kt b/app/src/main/java/org/linphone/activities/main/MainActivity.kt index 8914a8832..1eaf52ee6 100644 --- a/app/src/main/java/org/linphone/activities/main/MainActivity.kt +++ b/app/src/main/java/org/linphone/activities/main/MainActivity.kt @@ -261,6 +261,16 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin private fun handleIntentParams(intent: Intent) { when (intent.action) { + Intent.ACTION_MAIN -> { + val core = coreContext.core + val call = core.currentCall ?: core.calls.firstOrNull() + if (call != null) { + Log.i("[Main Activity] Launcher clicked while there is at least one active call, go to CallActivity") + val callIntent = Intent(this, org.linphone.activities.voip.CallActivity::class.java) + callIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) + startActivity(callIntent) + } + } Intent.ACTION_SEND, Intent.ACTION_SENDTO -> { if (intent.type == "text/plain") { handleSendText(intent) diff --git a/app/src/main/java/org/linphone/core/CoreService.kt b/app/src/main/java/org/linphone/core/CoreService.kt index ab6215882..e86efab9e 100644 --- a/app/src/main/java/org/linphone/core/CoreService.kt +++ b/app/src/main/java/org/linphone/core/CoreService.kt @@ -66,7 +66,9 @@ class CoreService : CoreService() { } override fun onTaskRemoved(rootIntent: Intent?) { - if (!corePreferences.keepServiceAlive) { + if (coreContext.core.callsNb > 0) { + Log.w("[Service] Task removed but there is at least one active call, do not stop the Core!") + } else if (!corePreferences.keepServiceAlive) { if (coreContext.core.isInBackground) { Log.i("[Service] Task removed, stopping Core") coreContext.stop()