Lines Matching refs:number
43 * Looks up caller information for the given phone number.
64 * connection. This is especially relevant for the phone number field,
69 * 2. Device recognizes that this is an emergency number
70 * 3. We use the "Emergency Number" string instead of "911" in the
75 * for a connection, but the number should be displayable.
89 /* Split up the phoneLabel into number type and label name */
151 * number. The returned CallerInfo is null if no number is supplied.
179 // Look for the number
180 columnIndex = cursor.getColumnIndex(PhoneLookup.NUMBER);
185 // Look for the normalized number
249 * number. The returned CallerInfo is null if no number is supplied.
258 * getCallerInfo given a phone number, look up in the call-log database
261 * @param number the phone number used to lookup caller id
263 * number. The returned CallerInfo is null if no number is supplied. If
264 * a matching number is not found, then a generic caller info is returned,
267 public static CallerInfo getCallerInfo(Context context, String number) {
268 Log.v(TAG, "getCallerInfo() based on number...");
270 if (TextUtils.isEmpty(number)) {
274 // Change the callerInfo number ONLY if it is an emergency number
275 // or if it is the voicemail number. If it is either, take a
277 if (PhoneNumberUtils.isLocalEmergencyNumber(number, context)) {
279 } else if (PhoneNumberUtils.isVoiceMailNumber(number)) {
283 Uri contactUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
286 info = doSecondaryLookupIfNecessary(context, number, info);
288 // if no query results were returned with a viable number,
289 // fill in the original number value we used to query with.
291 info.phoneNumber = number;
300 * could be a PSTN number in the contact database.
303 * @param number the original phone number, could be a SIP URI
308 String number, CallerInfo previousResult) {
310 && PhoneNumberUtils.isUriNumber(number)) {
311 String username = PhoneNumberUtils.getUsernameFromUriNumber(number);
323 * number.
326 * @param number a phone number.
327 * @return if the number belongs to a contact, the contact's name is
328 * returned; otherwise, the number itself is returned.
337 public static String getCallerId(Context context, String number) {
338 CallerInfo info = getCallerInfo(context, number);
347 callerID = number;
357 * @return true if the caller info is an emergency number.
364 * @return true if the caller info is a voicemail number.
372 * @param context To lookup the localized 'Emergency Number' string.
375 // TODO: Note we're setting the phone number here (refer to
377 // string 'Emergency Number'. This is pretty bad because we are
379 // should set the phone number to the dialed number and name to
380 // 'Emergency Number' and let the UI make the decision about what
397 // TODO: As in the emergency number handling, we end up writing a
398 // string in the phone number field.
409 // permission to retrieve VM number and would not call
507 * phone number in the phoneNumber field.
515 * this specifies a fallback number to use instead.
518 String number = TextUtils.isEmpty(phoneNumber) ? fallbackNumber : phoneNumber;
519 geoDescription = getGeoDescription(context, number);
523 * @return a geographical description string for the specified number.
526 private static String getGeoDescription(Context context, String number) {
527 Log.v(TAG, "getGeoDescription('" + number + "')...");
529 if (TextUtils.isEmpty(number)) {
540 Log.v(TAG, "parsing '" + number
542 pn = util.parse(number, countryIso);
543 Log.v(TAG, "- parsed number: " + pn);
545 Log.v(TAG, "getGeoDescription: NumberParseException for incoming number '" +
546 number + "'");