Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50950a4d authored by Tyler Gunn's avatar Tyler Gunn
Browse files

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

Bug: 12878584
Change-Id: I77bb311424799dce38897baff8f82714c28c6494
parent 643c0277
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -204,10 +204,12 @@ public class MissedCallNotifierImpl extends CallsManagerListenerBase implements
                        mContext.getString(R.string.notification_missedCall_call_back),
                        createCallBackPendingIntent(handleUri));

                if (canRespondViaSms(call)) {
                    builder.addAction(R.drawable.ic_message_24dp,
                            mContext.getString(R.string.notification_missedCall_message),
                            createSendSmsFromNotificationPendingIntent(handleUri));
                }
            }

            Bitmap photoIcon = call.getPhotoIcon();
            if (photoIcon != null) {
@@ -366,6 +368,12 @@ public class MissedCallNotifierImpl extends CallsManagerListenerBase implements
        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.
     */