Add background call checks.

Bug: 110173835
Test: unit
PiperOrigin-RevId: 202029563
Change-Id: I62021e0f68beb6eff52b475626c40876daf53fbf
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index 82139e2..9db42d7 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -1293,6 +1293,16 @@
             : CallList.getInstance().getActiveCall();
 
     if (call == null) {
+      // This is a special case where the first call is not automatically resumed
+      // after the second active call is remotely disconnected.
+      DialerCall backgroundCall = CallList.getInstance().getBackgroundCall();
+      if (backgroundCall != null && backgroundCall.isSpeakEasyCall()) {
+        LogUtil.i("InCallActivity.getShouldShowSpeakEasyUi", "taking call off hold");
+
+        backgroundCall.unhold();
+        return new ShouldShowUiResult(true, backgroundCall);
+      }
+
       return new ShouldShowUiResult(false, call);
     }