Handle handover to wifi failure.

Send a telephony-specific connection event so the InCallService can
display a message.

Bug: 30697460
Change-Id: I9df78ca49edfd41a5081a93d64301c4671f6ec09
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index cefd6c0..ec7a33c 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -34,6 +34,7 @@
 import android.telecom.VideoProfile;
 import android.telephony.CarrierConfigManager;
 import android.telephony.PhoneNumberUtils;
+import android.telephony.TelephonyManager;
 import android.util.Pair;
 
 import com.android.ims.ImsCall;
@@ -395,6 +396,14 @@
             // Set our state to active again since we're no longer pulling.
             setActiveInternal();
         }
+
+        /**
+         * Called from {@link ImsPhoneCallTracker} when a handover to WIFI has failed.
+         */
+        @Override
+        public void onHandoverToWifiFailed() {
+            sendConnectionEvent(TelephonyManager.EVENT_HANDOVER_TO_WIFI_FAILED, null);
+        }
     };
 
     protected com.android.internal.telephony.Connection mOriginalConnection;