Fix potential ClassCastException.

It is possible for some of the Connections returned by getAllConnections()
in the CS to NOT be TelephonyConnections.  This is the case when an
ImsConferenceCall has received Conference Event Package data, and there are
ConferenceParticipantConnections present.

Bug: 26350817
Change-Id: I45c2c97e2462719cf3b858db70a20c9f9056f449
diff --git a/src/com/android/services/telephony/PstnIncomingCallNotifier.java b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
index 5f64f6d..9e035b5 100644
--- a/src/com/android/services/telephony/PstnIncomingCallNotifier.java
+++ b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
@@ -269,10 +269,12 @@
                 if (service != null) {
                     for (android.telecom.Connection telephonyConnection : service
                             .getAllConnections()) {
-                        if (maybeSwapWithUnknownConnection(
-                                (TelephonyConnection) telephonyConnection,
-                                unknown)) {
-                            return true;
+                        if (telephonyConnection instanceof TelephonyConnection) {
+                            if (maybeSwapWithUnknownConnection(
+                                    (TelephonyConnection) telephonyConnection,
+                                    unknown)) {
+                                return true;
+                            }
                         }
                     }
                 }