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

Commit 1b303b14 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Show child number in incoming call notification.

Where a child number is present in the call extras, show it using the
text "via 650-555-1212" in the second line of the incoming call
notification.

Bug: 24585039
Change-Id: Ic9827f8518778bf5e9c36235e2e1b6525aba4928
parent aee0b354
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -430,11 +430,15 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
        boolean isIncomingOrWaiting = call.getState() == Call.State.INCOMING ||
                call.getState() == Call.State.CALL_WAITING;

        if (isIncomingOrWaiting && !TextUtils.isEmpty(call.getCallSubject()) &&
                call.getNumberPresentation() == TelecomManager.PRESENTATION_ALLOWED &&
                call.isCallSubjectSupported()) {
        if (isIncomingOrWaiting &&
                call.getNumberPresentation() == TelecomManager.PRESENTATION_ALLOWED) {

            if (!TextUtils.isEmpty(call.getChildNumber())) {
                return mContext.getString(R.string.child_number, call.getChildNumber());
            } else if (!TextUtils.isEmpty(call.getCallSubject()) && call.isCallSubjectSupported()) {
                return call.getCallSubject();
            }
        }

        int resId = R.string.notification_ongoing_call;
        if (call.hasProperty(Details.PROPERTY_WIFI)) {