Send BTPhoneService update when active/background calls switch.

This sends an update if the call-on-hold changes (when active and
background calls swap) as well as using a proper held-call count instead
of hardcoded 1 when there are multiple calls on hold.

This is needed to pass BT PTS test TC_AG_TWC_BV_03_I.

Bug: 17962996
Change-Id: Ia6d5f649020837a1ca37d0895f8844fcdec04446
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index d422db6..2f871f6 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -872,6 +872,16 @@
         return getFirstCallWithState(CallState.ON_HOLD);
     }
 
+    int getNumHeldCalls() {
+        int count = 0;
+        for (Call call : mCalls) {
+            if (call.getParentCall() == null && call.getState() == CallState.ON_HOLD) {
+                count++;
+            }
+        }
+        return count;
+    }
+
     Call getFirstCallWithState(int... states) {
         return getFirstCallWithState(null, states);
     }