Abandon audioFocus only when all the calls are disconnected.

Due to the change in ag/757925 to abandonAudioFocus when the foreground
call is in disconnected state, we end up prematurely abandoning audio
focus for IMS conference scenarios. When IMS conference is created
first, we disconnect the foreground call before creating the new IMS
conference call. This results in us abandoning audio focus and
reinitializing it when the conference call is created. In this scenario,
there should be a background call which is not in DISCONNECTED state.
So, redo the if check to see if there is any non-DISCONNECTED call in
CallsManager before we abandon audio focus.

BUG: 23759265
Change-Id: I97dc614c6b805a0dff19b063806d8d036f3d894f
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index fd38a71..195bd7c 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -439,6 +439,15 @@
         return false;
     }
 
+    boolean hasOnlyDisconnectedCalls() {
+        for (Call call : mCalls) {
+            if (!call.isDisconnected()) {
+                return false;
+            }
+        }
+        return true;
+    }
+
     boolean hasVideoCall() {
         for (Call call : mCalls) {
             if (VideoProfile.isVideo(call.getVideoState())) {