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

Commit cbcec5bf authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Show child number in incoming call notification. am: 2e5cfc1a71

am: 8af424c54d

* commit '8af424c54dba1388abb4db929560f19f6e71653d':
  Show child number in incoming call notification.
parents 27c5fd51 b49dd309
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)) {