diff options
| author | mengsun <msun@codeaurora.org> | 2013-12-06 16:53:38 +0800 |
|---|---|---|
| committer | emancebo <emancebo@cyngn.com> | 2014-09-02 15:42:28 -0700 |
| commit | a24104ac2396efcbae08cae23bcae977b5574d16 (patch) | |
| tree | 47e872b3bb3f1a14af62a7d2ed19f152a23411ef /src | |
| parent | 94986400db2194bff91fed9104a91223eed08178 (diff) | |
| download | packages_apps_InCallUI-a24104ac2396efcbae08cae23bcae977b5574d16.tar.gz packages_apps_InCallUI-a24104ac2396efcbae08cae23bcae977b5574d16.tar.bz2 packages_apps_InCallUI-a24104ac2396efcbae08cae23bcae977b5574d16.zip | |
Telephony: Show emergency call number
Show emergency call number when calling.
CRs-Fixed: 515433
Change-Id: Iec2ec2c31be93b8dd113ba0ef51b6577eaf9d576
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/incallui/CallerInfo.java | 7 | ||||
| -rw-r--r-- | src/com/android/incallui/CallerInfoAsyncQuery.java | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/incallui/CallerInfo.java b/src/com/android/incallui/CallerInfo.java index ea6ebd9f..e3d2e632 100644 --- a/src/com/android/incallui/CallerInfo.java +++ b/src/com/android/incallui/CallerInfo.java @@ -275,7 +275,7 @@ public class CallerInfo { // or if it is the voicemail number. If it is either, take a // shortcut and skip the query. if (PhoneNumberUtils.isLocalEmergencyNumber(number, context)) { - return new CallerInfo().markAsEmergency(context); + return new CallerInfo().markAsEmergency(context, number); } else if (PhoneNumberUtils.isVoiceMailNumber(number)) { return new CallerInfo().markAsVoiceMail(); } @@ -379,8 +379,9 @@ public class CallerInfo { // should set the phone number to the dialed number and name to // 'Emergency Number' and let the UI make the decision about what // should be displayed. - /* package */ CallerInfo markAsEmergency(Context context) { - phoneNumber = context.getString(R.string.emergency_call_dialog_number_for_display); + /* package */ CallerInfo markAsEmergency(Context context, String number) { + phoneNumber = context.getString(R.string.emergency_call_dialog_number_for_display) + " " + + number; photoResource = R.drawable.picture_emergency; mIsEmergency = true; return this; diff --git a/src/com/android/incallui/CallerInfoAsyncQuery.java b/src/com/android/incallui/CallerInfoAsyncQuery.java index c09baf21..b642ed41 100644 --- a/src/com/android/incallui/CallerInfoAsyncQuery.java +++ b/src/com/android/incallui/CallerInfoAsyncQuery.java @@ -229,7 +229,7 @@ public class CallerInfoAsyncQuery { if (cw.event == EVENT_EMERGENCY_NUMBER) { // Note we're setting the phone number here (refer to javadoc // comments at the top of CallerInfo class). - mCallerInfo = new CallerInfo().markAsEmergency(mQueryContext); + mCallerInfo = new CallerInfo().markAsEmergency(mQueryContext, cw.number); } else if (cw.event == EVENT_VOICEMAIL_NUMBER) { mCallerInfo = new CallerInfo().markAsVoiceMail(); } else { |
