diff options
author | Tyler Gunn <tgunn@google.com> | 2015-11-09 12:21:58 -0800 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2016-01-11 18:43:19 +0000 |
commit | 45e7d5c95e656953508b567555db464aede3bdb1 (patch) | |
tree | 16cc17412c62d43a54cfc4ce28e3c77b8edac411 /InCallUI/src/com | |
parent | 699fc20598c9dd933ba1c8be0e3cb7992ef71aad (diff) |
DO NOT MERGE 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
(cherry picked from commit 2e5cfc1a71942e2ca2c8e469042e82c1b4640476)
Diffstat (limited to 'InCallUI/src/com')
-rw-r--r-- | InCallUI/src/com/android/incallui/StatusBarNotifier.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java index fde2dc9dc..1f2729ea3 100644 --- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java +++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java @@ -439,10 +439,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; |