Lines Matching refs:number
87 static final int CALL_STATUS_DIALED = 0; // The number was successfully dialed
88 static final int CALL_STATUS_DIALED_MMI = 1; // The specified number was an MMI code
637 public static int placeCall(Context context, Phone phone, String number, Uri contactRef,
639 return placeCall(context, phone, number, contactRef, isEmergencyCall,
644 * Dial the number using the phone passed in.
652 * @param number to be dialed as requested by the user. This is
653 * NOT the phone number to connect to. It is used only to build the
665 public static int placeCall(Context context, Phone phone, String number, Uri contactRef,
670 log("placeCall()... number: '" + number + "'"
675 log("placeCall()... number: " + toLogSafePhoneNumber(number)
684 PhoneUtils.isRoutableViaGateway(number)) { // Filter out MMI, OTA and other codes.
706 numberToDial = number;
732 if (DBG) log("dialed MMI code: " + number);
774 // Always set mute to off when we are dialing an emergency number
799 /* package */ static String toLogSafePhoneNumber(String number) {
800 // For unknown number, log empty string.
801 if (number == null) {
807 return number;
813 for (int i = 0; i < number.length(); i++) {
814 char c = number.charAt(i);
1306 * initiated this outgoing call), figure out the actual phone number we
1309 * Note that the returned "number" may actually be a SIP address,
1316 * phone number with separators and keypad letters stripped out, or a raw
1319 * @return the phone number corresponding to the specified Intent, or null
1325 * number configured on the device.
1337 // number from there. (That extra takes precedence over the actual data
1353 * Gets the phone number to be called from an intent. Requires a Context
1355 * number.
1363 * "number" is actually the SIP address.
1370 * have a voicemail number set.
1372 * @return the phone number (or SIP address) that would be called by the intent,
1373 * or <code>null</code> if the number cannot be found.
1389 final String number = PhoneNumberUtils.getNumberFromIntent(intent, context);
1391 // Check for a voicemail-dialing request. If the voicemail number is
1394 (number == null || TextUtils.isEmpty(number)))
1397 return number;
1403 * extract a phone number from the specified Connection, and feed that
1404 * number into CallerInfo.getCallerInfo().)
1408 * phone number from the Connection.
1439 // querying a new CallerInfo using the connection's phone number.
1440 String number = c.getAddress();
1442 if (DBG) log("getCallerInfo: number = " + toLogSafePhoneNumber(number));
1444 if (!TextUtils.isEmpty(number)) {
1445 info = CallerInfo.getCallerInfo(context, number);
1530 // will not be attached, like when the number is empty (caller id
1537 // Note: For the case where a number is NOT retrievable, we leave
1562 // querying a new CallerInfo using the connection's phone number.
1563 String number = c.getAddress();
1566 // Gateway number, the connection number is actually the gateway number.
1567 // need to lookup via dialed number.
1568 number = info.trueNumber;
1572 log("PhoneUtils.startGetCallerInfo: new query for phone number...");
1573 log("- number (address): " + toLogSafePhoneNumber(number));
1591 // here regardless of whether the number is empty or not).
1599 log("startGetCallerInfo: number = " + number);
1602 + ", Name/Number Pres=" + cit.currentInfo.numberPresentation);
1605 // handling case where number is null (caller id hidden) as well.
1606 if (!TextUtils.isEmpty(number)) {
1609 number = modifyForSpecialCnapCases(context, cit.currentInfo, number,
1612 cit.currentInfo.phoneNumber = number;
1613 // For scenarios where we may receive a valid number from the network but a
1621 number, sCallerInfoQueryListener, c);
1626 // This is the case where we are querying on a number that
1638 log("startGetCallerInfo: query based on number: " + toLogSafePhoneNumber(number));
1647 // handling case where number is null (caller id hidden) as well.
1654 // handling case where number/name gets updated later on by the network
1658 // Gateway number, the connection number is actually the gateway number.
1659 // need to lookup via dialed number.
1686 + ", Name/Number Pres=" + cit.currentInfo.numberPresentation);
1690 // For scenarios where we may receive a valid number from the network but a
1716 + ", Name/Number Pres=" + cit.currentInfo.numberPresentation);
1761 // If the number presentation has not been set by
1781 // No matching contact was found for this number.
1790 newCi.phoneNumber = ci.phoneNumber; // To get formatted phone number
1814 // the phone number being displayed, if applicable.
1846 * Watch out: This method simply checks the number of Connections,
1880 // the number of ACTIVE connections, not the total number of
2428 * Based on the input CNAP number string,
2445 if (DBG) log("checkCnapSpecialCases, normal str. number: " + n);
2452 * from the network to indicate different number presentations, convert them to
2453 * expected number and presentation values within the CallerInfo object.
2454 * @param number number we use to verify if we are in a corner case
2456 * @return the new String that should be used for the phone number
2459 String number, int presentation) {
2460 // Obviously we return number if ci == null, but still return number if
2461 // number == null, because in these cases the correct string will still be
2463 if (ci == null || number == null) return number;
2466 log("modifyForSpecialCnapCases: initially, number="
2467 + toLogSafePhoneNumber(number)
2471 // "ABSENT NUMBER" is a possible value we could get from the network as the
2472 // phone number, so if this happens, change it to "Unknown" in the CallerInfo
2476 if (Arrays.asList(absentNumberValues).contains(number)
2478 number = context.getString(R.string.unknown);
2490 int cnapSpecialCase = checkCnapSpecialCases(number);
2492 // For all special strings, change number & numberPresentation.
2494 number = context.getString(R.string.private_num);
2496 number = context.getString(R.string.unknown);
2499 log("SpecialCnap: number=" + toLogSafePhoneNumber(number)
2506 log("modifyForSpecialCnapCases: returning number string="
2507 + toLogSafePhoneNumber(number));
2509 return number;
2517 * Check if a phone number can be route through a 3rd party
2518 * gateway. The number must be a global phone number in numerical
2521 * MMI codes and the like cannot be used as a dial number for the
2524 * @param number To be dialed via a 3rd party gateway.
2525 * @return true If the number can be routed through the 3rd party network.
2527 private static boolean isRoutableViaGateway(String number) {
2528 if (TextUtils.isEmpty(number)) {
2531 number = PhoneNumberUtils.stripSeparators(number);
2532 if (!number.equals(PhoneNumberUtils.convertKeypadLettersToDigits(number))) {
2535 number = PhoneNumberUtils.extractNetworkPortion(number);
2536 return PhoneNumberUtils.isGlobalPhoneNumber(number);
2589 * to the specified number.
2592 * @param scheme the scheme from the data URI that the number originally came from.
2593 * @param number the phone number, or SIP address.
2596 String scheme, String number, String primarySipUri) {
2599 + ", number " + toLogSafePhoneNumber(number)