DO NOT MERGE Don't show "Respond via SMS" for missed SIP calls.

Bug: 12878584
Change-Id: I77bb311424799dce38897baff8f82714c28c6494
diff --git a/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java b/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
index ba97304..b4392ae 100644
--- a/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
+++ b/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
@@ -204,9 +204,11 @@
                         mContext.getString(R.string.notification_missedCall_call_back),
                         createCallBackPendingIntent(handleUri));
 
-                builder.addAction(R.drawable.ic_message_24dp,
-                        mContext.getString(R.string.notification_missedCall_message),
-                        createSendSmsFromNotificationPendingIntent(handleUri));
+                if (canRespondViaSms(call)) {
+                    builder.addAction(R.drawable.ic_message_24dp,
+                            mContext.getString(R.string.notification_missedCall_message),
+                            createSendSmsFromNotificationPendingIntent(handleUri));
+                }
             }
 
             Bitmap photoIcon = call.getPhotoIcon();
@@ -366,6 +368,12 @@
         notification.defaults |= Notification.DEFAULT_LIGHTS;
     }
 
+    private boolean canRespondViaSms(Call call) {
+        // Only allow respond-via-sms for "tel:" calls.
+        return call.getHandle() != null &&
+                PhoneAccount.SCHEME_TEL.equals(call.getHandle().getScheme());
+    }
+
     /**
      * Adds the missed call notification on startup if there are unread missed calls.
      */