diff options
author | Jay Shrauner <shrauner@google.com> | 2013-05-30 15:41:13 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2013-06-13 10:56:06 -0700 |
commit | 719a7adde25e0a717816b00668c16c3a1e3c5518 (patch) | |
tree | 14037f2530a9c987950cc64485408578197d7a93 /src/com/android/dialer/calllog/DefaultVoicemailNotifier.java | |
parent | 72635ed4edfd76baf78a81afa047b612a2f4d58f (diff) | |
download | android_packages_apps_Dialer-719a7adde25e0a717816b00668c16c3a1e3c5518.tar.gz android_packages_apps_Dialer-719a7adde25e0a717816b00668c16c3a1e3c5518.tar.bz2 android_packages_apps_Dialer-719a7adde25e0a717816b00668c16c3a1e3c5518.zip |
Use new CallLog number presentation column
Switch to using new number presentation column in the CallLog table and
discontinue using special phone number strings in CallerInfo. Needed for
unbundling.
Bug:6948882
Change-Id: Ibf27ea55cee783c4530101e4e228198e245e6684
Diffstat (limited to 'src/com/android/dialer/calllog/DefaultVoicemailNotifier.java')
-rw-r--r-- | src/com/android/dialer/calllog/DefaultVoicemailNotifier.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java index e551e6044..8bac657a2 100644 --- a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java +++ b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java @@ -122,7 +122,8 @@ public class DefaultVoicemailNotifier implements VoicemailNotifier { name = mNameLookupQuery.query(newCall.number); // If we cannot lookup the contact, use the number instead. if (name == null) { - name = mPhoneNumberHelper.getDisplayNumber(newCall.number, "").toString(); + name = mPhoneNumberHelper.getDisplayNumber(newCall.number, + newCall.numberPresentation, "").toString(); if (TextUtils.isEmpty(name)) { name = newCall.number; } @@ -210,11 +211,14 @@ public class DefaultVoicemailNotifier implements VoicemailNotifier { public final Uri callsUri; public final Uri voicemailUri; public final String number; + public final int numberPresentation; - public NewCall(Uri callsUri, Uri voicemailUri, String number) { + public NewCall(Uri callsUri, Uri voicemailUri, String number, + int numberPresentation) { this.callsUri = callsUri; this.voicemailUri = voicemailUri; this.number = number; + this.numberPresentation = numberPresentation; } } @@ -237,11 +241,13 @@ public class DefaultVoicemailNotifier implements VoicemailNotifier { */ private static final class DefaultNewCallsQuery implements NewCallsQuery { private static final String[] PROJECTION = { - Calls._ID, Calls.NUMBER, Calls.VOICEMAIL_URI + Calls._ID, Calls.NUMBER, Calls.NUMBER_PRESENTATION, + Calls.VOICEMAIL_URI }; private static final int ID_COLUMN_INDEX = 0; private static final int NUMBER_COLUMN_INDEX = 1; private static final int VOICEMAIL_URI_COLUMN_INDEX = 2; + private static final int NUMBER_PRESENTATION_COLUMN_INDEX = 3; private final ContentResolver mContentResolver; @@ -276,7 +282,8 @@ public class DefaultVoicemailNotifier implements VoicemailNotifier { Uri callsUri = ContentUris.withAppendedId( Calls.CONTENT_URI_WITH_VOICEMAIL, cursor.getLong(ID_COLUMN_INDEX)); Uri voicemailUri = voicemailUriString == null ? null : Uri.parse(voicemailUriString); - return new NewCall(callsUri, voicemailUri, cursor.getString(NUMBER_COLUMN_INDEX)); + return new NewCall(callsUri, voicemailUri, cursor.getString(NUMBER_COLUMN_INDEX), + cursor.getInt(NUMBER_PRESENTATION_COLUMN_INDEX)); } } |