Fire callback immediately if original connection already exists.
In the case of an incoming call, the callback will be registered
after original connection is already set. If this is the case, let's
just fire back the callback immediately so the connection
is added to the conference controller.
Bug: 18056632
Bug: 18240234
Change-Id: I3996ee3763535aff209f7486f78a0f4889482cbe
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 0ed1070..2fdc1dc 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -851,6 +851,11 @@
*/
public final TelephonyConnection addTelephonyConnectionListener(TelephonyConnectionListener l) {
mTelephonyListeners.add(l);
+ // If we already have an original connection, let's call back immediately.
+ // This would be the case for incoming calls.
+ if (mOriginalConnection != null) {
+ fireOnOriginalConnectionConfigured();
+ }
return this;
}