diff options
author | Tyler Gunn <tgunn@google.com> | 2015-11-09 12:21:58 -0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2015-11-09 17:00:58 -0800 |
commit | de77e317e551f09e94a0caa82448a95ba23f4fa2 (patch) | |
tree | dcc9fafb46023feeaa1a3218d831b31a70b31432 | |
parent | 24ad92950a39af862c676f18e07b88ecde2f4e3b (diff) | |
download | InCallUI-marshmallow-mr2-release.tar.gz |
Show child number in incoming call notification.android-6.0.1_r9android-6.0.1_r81android-6.0.1_r80android-6.0.1_r8android-6.0.1_r79android-6.0.1_r78android-6.0.1_r77android-6.0.1_r74android-6.0.1_r73android-6.0.1_r72android-6.0.1_r70android-6.0.1_r7android-6.0.1_r69android-6.0.1_r66android-6.0.1_r65android-6.0.1_r61android-6.0.1_r60android-6.0.1_r59android-6.0.1_r58android-6.0.1_r57android-6.0.1_r56android-6.0.1_r52android-6.0.1_r51android-6.0.1_r50android-6.0.1_r49android-6.0.1_r48android-6.0.1_r47android-6.0.1_r46android-6.0.1_r43android-6.0.1_r42android-6.0.1_r41android-6.0.1_r40android-6.0.1_r30android-6.0.1_r3android-6.0.1_r28android-6.0.1_r27android-6.0.1_r26android-6.0.1_r20android-6.0.1_r17android-6.0.1_r13android-6.0.1_r12android-6.0.1_r11android-6.0.1_r10android-6.0.1_r1android-6.0.0_r41marshmallow-mr3-releasemarshmallow-mr2-releasemarshmallow-mr1-release
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
-rw-r--r-- | src/com/android/incallui/StatusBarNotifier.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/incallui/StatusBarNotifier.java b/src/com/android/incallui/StatusBarNotifier.java index 4d4e3493..89794cdc 100644 --- a/src/com/android/incallui/StatusBarNotifier.java +++ b/src/com/android/incallui/StatusBarNotifier.java @@ -430,10 +430,14 @@ 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()) { - return call.getCallSubject(); + 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; |