Add fix for picking correct Handover connection

A single handover call cannot track both the foreground and
background call state after handover.

Added support to go through all the handover connections and
pick the first match based on the number and if there is no
match check the state.

Added support for tracking the state of call associated with
the connection before handover. This is used to retrieve the
correct connection based on state.

Change-Id: Iec87c09523d459998d0880252a71f98eb8e296a2
CRs-Fixed: 760336

Conflicts:
	src/java/com/android/internal/telephony/Connection.java
IMS:Re-Initiate Conference Call from Leaf Node Causes Conference Call Crash.

During conference call, if there is an incoming call and user accepts it,
the ims FW triggers two accept commands since ims FW triggers the onCallHeld
multiple times for conference call.
The multiple accept commands causes the ims ril to respond failure. As the result,
the call drops and also crash occurs.
The fix is to block the multiple accepts in ims FW layer.

Bug: 17606426
Change-Id: I89904d4c64dad0d19398f74408ddc177f59c40ce

Propagating isMultiParty indicator from RIL up into Telephony layer.

- Changing ImsPhoneCall to return the multiparty bit from the ImsCall
instead of depending on the number of connections present.

Bug: 18058253
Change-Id: I0f81f16e38d3a907c8e81143b0f36d2d17e7f971

Implement test IMS conference event package harness.

Implement test conference event package intent receiver and parser which
allows the user to issue an intent to cause a test conference event
package file to be injected into the current ImsCall:

adb shell am broadcast
-a com.android.internal.telephony.TestConferenceEventPackage
-e filename test_filename.xml

Bug: 18119796
Change-Id: Ic51be9442ae5b991054ccfd7655c6efd76ffd8e0

Communicating participant changes to conference controller.

- Add event handlers to pass participant info to conference controller.

Bug: 18057361
Change-Id: Ifdd2d871994fc6e347f54d1e69686f7c68a7d6b0

Changed the prototype for onCallMerged.

The removed parameter is never used and it actually doesn't make
much sense as the layer that calls this callback doesn't have
any sensible second call to return to the handlers.

Bug: 18056632
Change-Id: I4abe92c020f64692370d9ab309e0d12877bdbb06

Support disconnecting conference participants from conference.

- Added implementation for onDisconnectConferenceParticipant method in
ImsPhoneConnction.  Calls the "removeParticipants" method provided by the
ImsCall to inform the conference server that a conference participant
should be disconnected.

Bug: 18176606
Change-Id: Icab779a49382765c198494c18d8adc276189e9c3

Conference event package performance improvement.

- Instead of sending each participant to the telephony conference
controller, all participants are sent at once.  This way the conference
only needs to be recalculated once.

Bug: 18057361
Change-Id: I2e81a14ac6ad2858cf70d98ba0b7e14f0bd55cb5

Clear disconnected connections when detaching.

This bug was happening because there was a disconnected connection
lingering on the background call after it is resumed. Because of
this lingering connection, its state remained on HOLD and did not
return to IDLE.

This caused the phone to get in a bad state, such that when trying
to unhold the conference later on, there foreground call is ACTIVE
and the background call is HOLD, which precludes unhold from working
properly.

This fix for the bug would clear disconnected connections from the
ImsPhoneCall after detaching a connection.

Note: clearDisconnected also updates the state to IDLE, which is why
I deleted that code.

Bug: 18291230
Change-Id: I09b5e274408235a9b6630d40bf3a3161676ffc79

Return MERGED_SUCCESSFULLY as a disconnect cause.

If a call was merged, change the disconnect cause to
IMS_MERGED_SUCCESSFULLY instead of NORMAL (because it was not
actually terminated as the result of a remote disconnect).

Bug: 18291234
Change-Id: I4cff83ace2aaa6062f4e182e9ac0f441bf77a23a

Add null-check to isMultiparty method, additional debug strings.

Bug: 18200934
Change-Id: I4b146046dc0d9f5ebb7c37151d95d81629a3dd25

Change-Id: I4b146046dc0d9f5ebb7c37151d95d81629a3dd25

Conflicts:
	src/java/com/android/internal/telephony/Connection.java