summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMengjun Leng <mengju@codeaurora.org>2015-11-24 10:32:21 +0800
committerSteve Kondik <steve@cyngn.com>2016-07-01 01:13:46 -0700
commit5a7ea944b9ac0ca169d360403b9b516f0e211e11 (patch)
tree42babbbaaeb57d6a340483d36286d3b371e12aec
parent5227cbd5278bf614197b6b0cf85517f82ad0eab8 (diff)
downloadandroid_packages_apps_InCallUI-5a7ea944b9ac0ca169d360403b9b516f0e211e11.tar.gz
android_packages_apps_InCallUI-5a7ea944b9ac0ca169d360403b9b516f0e211e11.tar.bz2
android_packages_apps_InCallUI-5a7ea944b9ac0ca169d360403b9b516f0e211e11.zip
Fix display 'null' for geocoder location
If ContactsProvider is unable to get geocoder location for call number, the 'null' will be used to populate DB. When InCallUI cannot get its geocodder loaction, it should ignore displaying geocoder location info. Change-Id: Ibdfcf607ba3044de39a886c171f144f804410b36 CRs-Fixed: 942213
-rw-r--r--src/com/android/incallui/StatusBarNotifier.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/incallui/StatusBarNotifier.java b/src/com/android/incallui/StatusBarNotifier.java
index 3b5ad7e1..05ec1e7f 100644
--- a/src/com/android/incallui/StatusBarNotifier.java
+++ b/src/com/android/incallui/StatusBarNotifier.java
@@ -454,14 +454,15 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
}
if (TextUtils.isEmpty(contactInfo.name)) {
String contactNumberDisplayed = TextUtils.isEmpty(contactInfo.number) ?
- "" : contactInfo.number.toString();
+ "" : contactInfo.number.toString();
if (mContext.getResources().
- getBoolean(R.bool.display_home_location_on_statusbar)) {
- contactNumberDisplayed = contactNumberDisplayed + " " + contactInfo.location;
+ getBoolean(R.bool.display_home_location_on_statusbar) &&
+ !TextUtils.isEmpty(contactInfo.location)) {
+ contactNumberDisplayed = contactNumberDisplayed + " " + contactInfo.location;
}
return TextUtils.isEmpty(contactNumberDisplayed) ? null
: BidiFormatter.getInstance().unicodeWrap(
- contactNumberDisplayed, TextDirectionHeuristics.LTR);
+ contactNumberDisplayed, TextDirectionHeuristics.LTR);
}
return contactInfo.name;