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

Commit 59ec2682 authored by Tyler Gunn's avatar Tyler Gunn Committed by Android Git Automerger
Browse files

am d8ee2bfa: am b424457b: Merge "DO NOT MERGE Don\'t show "Respond via SMS"...

am d8ee2bfa: am b424457b: Merge "DO NOT MERGE Don\'t show "Respond via SMS" for missed SIP calls." into mnc-dr-dev

* commit 'd8ee2bfa':
  DO NOT MERGE Don't show "Respond via SMS" for missed SIP calls.
parents 29b2deef d8ee2bfa
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -256,10 +256,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) {
@@ -424,6 +426,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.
     */