Dialer: Bring back merge calls
* Commit acd6649 removed speakeasy references
* Showing the merge button should ofc not depend on all calls being
null, so the logic is now "always show merge button if the capability
is there", as it should be
Test:
- Call someone
- Press "Add call"
- Call someone else
- Merge button is there and makes it a conference
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/6332
Change-Id: Ifd8f8bc0f82b0b66fa28272e1c18a2467eed8e72
diff --git a/java/com/android/incallui/CallButtonPresenter.java b/java/com/android/incallui/CallButtonPresenter.java
index d93a8d7..8fba90b 100644
--- a/java/com/android/incallui/CallButtonPresenter.java
+++ b/java/com/android/incallui/CallButtonPresenter.java
@@ -480,15 +480,7 @@
final boolean showAddCall =
TelecomAdapter.getInstance().canAddCall() && UserManagerCompat.isUserUnlocked(context);
- // There can only be two calls so don't show the ability to merge when one of them
- // is a speak easy call.
- final boolean showMerge =
- InCallPresenter.getInstance()
- .getCallList()
- .getAllCalls()
- .stream()
- .noneMatch(c -> c != null)
- && call.can(android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE);
+ final boolean showMerge = call.can(android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE);
final boolean showUpgradeToVideo = !isVideo && (hasVideoCallCapabilities(call));
final boolean showDowngradeToAudio = isVideo && isDowngradeToAudioSupported(call);
final boolean showMute = call.can(android.telecom.Call.Details.CAPABILITY_MUTE);