Home
last modified time | relevance | path

Searched refs:number (Results 1 – 25 of 224) sorted by relevance

123456789

/packages/apps/Dialer/src/com/android/dialer/calllog/
DContactInfoHelper.java78 public ContactInfo lookupNumber(String number, String countryIso) { in lookupNumber() argument
79 if (TextUtils.isEmpty(number)) { in lookupNumber()
85 if (PhoneNumberHelper.isUriNumber(number)) { in lookupNumber()
87 info = lookupContactFromUri(getContactInfoLookupUri(number), true); in lookupNumber()
90 String username = PhoneNumberHelper.getUsernameFromUriNumber(number); in lookupNumber()
97 info = queryContactInfoForPhoneNumber(number, countryIso, false); in lookupNumber()
109 updatedInfo.number = number; in lookupNumber()
110 updatedInfo.formattedNumber = formatPhoneNumber(number, null, countryIso); in lookupNumber()
112 number, countryIso); in lookupNumber()
128 private static Uri createTemporaryContactUri(String number) { in createTemporaryContactUri() argument
[all …]
DCallLogNotificationsHelper.java106 public String getName(@Nullable String number, int numberPresentation, in getName() argument
108 return getContactInfo(number, numberPresentation, countryIso).name; in getName()
117 public ContactInfo getContactInfo(@Nullable String number, int numberPresentation, in getContactInfo() argument
123 number = Strings.nullToEmpty(number); in getContactInfo()
125 contactInfo.number = number; in getContactInfo()
126 contactInfo.formattedNumber = PhoneNumberUtils.formatNumber(number, countryIso); in getContactInfo()
128 contactInfo.normalizedNumber = PhoneNumberUtils.formatNumberToE164(number, countryIso); in getContactInfo()
133 number, in getContactInfo()
141 ContactInfo cachedContactInfo = mContactInfoHelper.lookupNumber(number, countryIso); in getContactInfo()
150 } else if (!TextUtils.isEmpty(number)) { in getContactInfo()
[all …]
DCallLogListItemViewHolder.java124 public String number; field in CallLogListItemViewHolder
313 if (TextUtils.isEmpty(number)) { in onCreateContextMenu()
321 BidiFormatter.getInstance().unicodeWrap(number, TextDirectionHeuristics.LTR))); in onCreateContextMenu()
333 if (PhoneNumberUtil.canPlaceCallsTo(number, numberPresentation) in onCreateContextMenu()
334 && !mCallLogCache.isVoicemailNumber(accountHandle, number) in onCreateContextMenu()
335 && !PhoneNumberUtil.isSipNumber(number)) { in onCreateContextMenu()
349 && FilteredNumbersUtil.canBlockNumber(mContext, number, countryIso)) { in onCreateContextMenu()
365 }, number, countryIso); in onCreateContextMenu()
376 .showBlockNumberDialogFlow(mContext.getContentResolver(), blockId, number, in onMenuItemClick() local
382 ClipboardUtils.copyText(mContext, null, number, true); in onMenuItemClick()
[all …]
DMissedCallNotifier.java73 public void updateMissedCallNotification(int count, String number) { in updateMissedCallNotification() argument
107 .getContactInfo(useCallLog ? newestCall.number : number, in updateMissedCallNotification()
159 if (!TextUtils.isEmpty(number) in updateMissedCallNotification()
161 number, mContext.getString(R.string.handle_restricted))) { in updateMissedCallNotification()
164 createCallBackPendingIntent(number)); in updateMissedCallNotification()
166 if (!PhoneNumberHelper.isUriNumber(number)) { in updateMissedCallNotification()
169 createSendSmsFromNotificationPendingIntent(number)); in updateMissedCallNotification()
212 public void callBackFromMissedCall(String number) { in callBackFromMissedCall() argument
217 new CallIntentBuilder(number) in callBackFromMissedCall()
225 public void sendSmsFromMissedCall(String number) { in sendSmsFromMissedCall() argument
[all …]
DIntentProvider.java49 public static IntentProvider getReturnCallIntentProvider(final String number) { in getReturnCallIntentProvider() argument
50 return getReturnCallIntentProvider(number, null); in getReturnCallIntentProvider()
53 public static IntentProvider getReturnCallIntentProvider(final String number, in getReturnCallIntentProvider() argument
58 return new CallIntentBuilder(number) in getReturnCallIntentProvider()
66 public static IntentProvider getReturnVideoCallIntentProvider(final String number) {
67 return getReturnVideoCallIntentProvider(number, null);
70 public static IntentProvider getReturnVideoCallIntentProvider(final String number,
75 return new CallIntentBuilder(number)
95 public static IntentProvider getSendSmsIntentProvider(final String number) {
99 return IntentUtil.getSendSmsIntent(number);
[all …]
/packages/services/Telephony/src/com/android/phone/
DOutgoingCallBroadcaster.java173 String number; in doReceive() local
187 number = getResultData(); in doReceive()
188 if (VDBG) Log.v(TAG, "- got number from resultData: '" + number + "'"); in doReceive()
234 if (number == null) { in doReceive()
239 && (phone.isOtaSpNumber(number))) { in doReceive()
242 } else if (PhoneNumberUtils.isPotentialLocalEmergencyNumber(context, number)) { in doReceive()
247 Log.w(TAG, "Cannot modify outgoing call to emergency number " + number + "."); in doReceive()
265 number = PhoneNumberUtils.convertKeypadLettersToDigits(number); in doReceive()
266 number = PhoneNumberUtils.stripSeparators(number); in doReceive()
270 if (VDBG) Log.v(TAG, "- actual number to dial: '" + number + "'"); in doReceive()
[all …]
DPhoneUtils.java524 public static int placeCall(Context context, Phone phone, String number, Uri contactRef, in placeCall() argument
526 return placeCall(context, phone, number, contactRef, isEmergencyCall, in placeCall()
552 public static int placeCall(Context context, Phone phone, String number, Uri contactRef, in placeCall() argument
557 log("placeCall()... number: '" + number + "'" in placeCall()
562 log("placeCall()... number: " + toLogSafePhoneNumber(number) in placeCall()
571 PhoneUtils.isRoutableViaGateway(number)) { // Filter out MMI, OTA and other codes. in placeCall()
593 numberToDial = number; in placeCall()
662 /* package */ static String toLogSafePhoneNumber(String number) { in toLogSafePhoneNumber() argument
664 if (number == null) { in toLogSafePhoneNumber()
670 return number; in toLogSafePhoneNumber()
[all …]
DCallController.java211 String number = PhoneNumberUtils.getNumberFromIntent(intent, mApp); in placeCall() local
216 log("- number: " + number); in placeCall()
288 String number; in placeCallInternal() local
304 number = PhoneUtils.getInitialNumber(intent); in placeCallInternal()
305 if (VDBG) log("- actual number to dial: '" + number + "'"); in placeCallInternal()
317 phone = PhoneUtils.pickPhoneBasedOnNumber(mCM, scheme, number, sipPhoneUri, in placeCallInternal()
338 if (number == null) { in placeCallInternal()
349 boolean isEmergencyNumber = PhoneNumberUtils.isLocalEmergencyNumber(mApp, number); in placeCallInternal()
351 PhoneNumberUtils.isPotentialLocalEmergencyNumber(mApp, number); in placeCallInternal()
356 + " attempted to call potential emergency number " + number in placeCallInternal()
[all …]
DCallLogger.java58 final String number = c.getAddress(); in logCall() local
68 ", number set to: " + PhoneUtils.toLogSafePhoneNumber(number)); in logCall()
79 && phone.isOtaSpNumber(number); in logCall()
110 public void logCall(CallerInfo ci, String number, int presentation, int callType, long start, in logCall() argument
150 String number = null; in getLogNumber() local
153 number = conn.getAddress(); in getLogNumber()
164 number = conn.getOrigDialString(); in getLogNumber()
166 number = conn.getAddress(); in getLogNumber()
169 number = callerInfo.phoneNumber; in getLogNumber()
173 if (null == number) { in getLogNumber()
[all …]
/packages/apps/Dialer/InCallUI/src/com/android/incallui/
DCallerInfoUtils.java68 String number = call.getNumber(); in buildCallerInfo() local
69 if (!TextUtils.isEmpty(number)) { in buildCallerInfo()
70 final String[] numbers = number.split("&"); in buildCallerInfo()
71 number = numbers[0]; in buildCallerInfo()
76 number = modifyForSpecialCnapCases(context, info, number, info.numberPresentation); in buildCallerInfo()
77 info.phoneNumber = number; in buildCallerInfo()
110 info.number = ci.phoneNumber; in buildCachedContactInfo()
135 String number, int presentation) { in modifyForSpecialCnapCases() argument
139 if (ci == null || number == null) return number; in modifyForSpecialCnapCases()
142 + toLogSafePhoneNumber(number) in modifyForSpecialCnapCases()
[all …]
DContactInfoCache.java130 contactInfo.number = call.getNumber(); in maybeInsertCnapInformationIntoCache()
135 .put(Phone.NUMBER, contactInfo.number) in maybeInsertCnapInformationIntoCache()
241 mPhoneNumberService.getPhoneNumberInfo(cacheEntry.number, listener, listener, in findInfoQueryComplete()
283 entry.number = info.getNumber(); in onPhoneNumberInfoComplete()
487 String number = info.phoneNumber; in populateCacheEntry() local
489 if (!TextUtils.isEmpty(number)) { in populateCacheEntry()
490 isSipCall = PhoneNumberHelper.isUriNumber(number); in populateCacheEntry()
491 if (number.startsWith("sip:")) { in populateCacheEntry()
492 number = number.substring(4); in populateCacheEntry()
502 if (TextUtils.isEmpty(number)) { in populateCacheEntry()
[all …]
/packages/apps/Dialer/src/com/android/dialer/util/
DPhoneNumberUtil.java43 public static boolean canPlaceCallsTo(CharSequence number, int presentation) { in canPlaceCallsTo() argument
45 && !TextUtils.isEmpty(number) && !isLegacyUnknownNumbers(number); in canPlaceCallsTo()
53 Context context, PhoneAccountHandle accountHandle, CharSequence number) { in isVoicemailNumber() argument
54 if (TextUtils.isEmpty(number)) { in isVoicemailNumber()
57 return TelecomUtil.isVoicemailNumber(context, accountHandle, number.toString()); in isVoicemailNumber()
64 public static boolean isSipNumber(CharSequence number) { in isSipNumber() argument
65 return number != null && PhoneNumberHelper.isUriNumber(number.toString()); in isSipNumber()
71 CharSequence number, in isUnknownNumberThatCanBeLookedUp() argument
82 if (TextUtils.isEmpty(number)) { in isUnknownNumberThatCanBeLookedUp()
85 if (isVoicemailNumber(context, accountHandle, number)) { in isUnknownNumberThatCanBeLookedUp()
[all …]
/packages/apps/Dialer/tests/src/com/android/dialer/calllog/
DCallLogAdapterTest.java103 public ContactInfo lookupNumber(String number, String countryIso) { in setUp()
105 info.number = number; in setUp()
106 info.formattedNumber = number; in setUp()
348 assertEquals(holders[i].number, EMPTY_STRING); in testPresentationAfterRebindingViewHolders()
371 assertEquals(holders[i].number, EMPTY_STRING); in testPresentationAfterRebindingViewHolders()
389 assertEquals(TEST_NUMBER, request.number); in testBindView_NoCallLogCacheNorMemoryCache_EnqueueRequest()
573 assertEquals(TEST_NUMBER_1, mViewHolder.number); in testBindVoicemailPromoCard()
577 assertEquals(TEST_NUMBER_2, mViewHolder.number); in testBindVoicemailPromoCard()
581 assertEquals(TEST_NUMBER_3, mViewHolder.number); in testBindVoicemailPromoCard()
629 private void createCallLogEntry(String number, String postDialDigits, int presentation, in createCallLogEntry() argument
[all …]
DCallLogNotificationsHelperTest.java52 assertEquals(TEST_VALID_NUMBER, contactInfo.number); in testGetContactInfo_ValidNumberValidPresentationValidIso()
59 assertEquals(TEST_VALID_NUMBER, contactInfo.number); in testGetContactInfo_ValidNumberInvalidPresentationValidIso()
67 assertEquals(TEST_VALID_NUMBER, contactInfo.number); in testGetContactInfo_ValidNumberValidPresentationNullIso()
75 assertEquals(TEST_VALID_NUMBER, contactInfo.number); in testGetContactInfo_ValidNumberInvalidPresentationNullIso()
83 assertEquals("", contactInfo.number); in testGetContactInfo_NullNumberValidPresentationValidIso()
90 assertEquals("", contactInfo.number); in testGetContactInfo_NullNumberInvalidPresentationValidIso()
97 assertEquals("", contactInfo.number); in testGetContactInfo_NullNumberValidPresentationNullIso()
104 assertEquals("", contactInfo.number); in testGetContactInfo_NullNumberInValidPresentationNullIso()
119 assertEquals(TEST_VALID_NUMBER, contactInfo.number); in testGetContactInfo_NonNullCachedLookup()
125 cachedContactInfo.number = TEST_VALID_NUMBER; in testGetContactInfo_NullCachedLookup()
[all …]
/packages/services/Car/car-cluster-demo-renderer/src/android/car/cluster/demorenderer/
DPhoneBook.java87 public static String getFormattedNumber(String number) { in getFormattedNumber() argument
88 if (TextUtils.isEmpty(number)) { in getFormattedNumber()
96 String e164 = PhoneNumberUtils.formatNumberToE164(number, countryIso); in getFormattedNumber()
97 String formattedNumber = PhoneNumberUtils.formatNumber(number, e164, countryIso); in getFormattedNumber()
98 formattedNumber = TextUtils.isEmpty(formattedNumber) ? number : formattedNumber; in getFormattedNumber()
106 public void getContactDetailsAsync(String number, ContactLoadedListener listener) { in getContactDetailsAsync() argument
107 if (number == null || number.isEmpty()) { in getContactDetailsAsync()
108 listener.onContactLoaded(number, null); in getContactDetailsAsync()
115 } else if (mContactByNumber.containsKey(number)) { in getContactDetailsAsync()
116 listener.onContactLoaded(number, mContactByNumber.get(number)); in getContactDetailsAsync()
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/tests/
DPhoneNumberTestService.java59 final String number = intent.getStringExtra(EXTRA_PHONE_NUMBER); in onHandleIntent() local
63 Log.i(TAG, "Input phone number: " + number); in onHandleIntent()
76 dump(number, c); in onHandleIntent()
80 private void dump(String number, String country) { in dump() argument
81 Log.i(TAG, "Result for: " + number + " / " +country); in dump()
82 dump_PhoneNumberUtils_formatNumberToE164(number, country); in dump()
83 dump_PhoneNumberUtil_format(number, country, PhoneNumberFormat.E164); in dump()
84 dump_PhoneNumberUtil_format(number, country, PhoneNumberFormat.INTERNATIONAL); in dump()
85 dump_PhoneNumberUtil_format(number, country, PhoneNumberFormat.NATIONAL); in dump()
86 dump_PhoneNumberUtil_format(number, country, PhoneNumberFormat.RFC3966); in dump()
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DNewOutgoingCallIntentBroadcaster.java222 String number = mPhoneNumberUtilsAdapter.getNumberFromIntent(intent, mContext); in processIntent() local
223 if (TextUtils.isEmpty(number)) { in processIntent()
228 boolean isUriNumber = mPhoneNumberUtilsAdapter.isUriNumber(number); in processIntent()
230 number = mPhoneNumberUtilsAdapter.convertKeypadLettersToDigits(number); in processIntent()
231 number = mPhoneNumberUtilsAdapter.stripSeparators(number); in processIntent()
234 final boolean isPotentialEmergencyNumber = isPotentialEmergencyNumber(number); in processIntent()
247 + "unless caller is system or default dialer.", number, intent); in processIntent()
257 + "Intent %s.", number, intent); in processIntent()
275 mCallsManager.placeOutgoingCall(mCall, Uri.fromParts(scheme, number, null), null, in processIntent()
286 broadcastIntent(intent, number, !callImmediately, targetUser); in processIntent()
[all …]
/packages/services/Telephony/tests/src/com/android/phone/tests/
DCallDialTest.java60 mNumber = (EditText) findViewById(R.id.number); in onCreate()
114 String number = mNumber.getText().toString(); in fireIntent() local
115 log("==> number: '" + number + "'"); in fireIntent()
124 if (!TextUtils.isEmpty(number)) { in fireIntent()
125 if (number.contains(":")) { in fireIntent()
126 uri = Uri.parse(number); in fireIntent()
127 } else if (PhoneNumberUtils.isUriNumber(number)) { in fireIntent()
128 uri = Uri.fromParts(PhoneAccount.SCHEME_SIP, number, null); in fireIntent()
130 uri = Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null); in fireIntent()
154 String number = mNumber.getText().toString(); in doITelephonyCall() local
[all …]
/packages/apps/Dialer/src/com/android/dialer/contactinfo/
DContactInfoCache.java79 needRedraw |= queryContactInfo(req.number, req.countryIso, req.callLogInfo); in run()
147 public ContactInfo getValue(String number, String countryIso, ContactInfo cachedContactInfo) { in getValue() argument
148 NumberWithCountryIso numberCountryIso = new NumberWithCountryIso(number, countryIso); in getValue()
158 enqueueRequest(number, countryIso, cachedContactInfo, true); in getValue()
164 enqueueRequest(number, countryIso, cachedContactInfo, false); in getValue()
170 enqueueRequest(number, countryIso, cachedContactInfo, false); in getValue()
192 private boolean queryContactInfo(String number, String countryIso, ContactInfo callLogInfo) { in queryContactInfo() argument
193 final ContactInfo info = mContactInfoHelper.lookupNumber(number, countryIso); in queryContactInfo()
202 NumberWithCountryIso numberCountryIso = new NumberWithCountryIso(number, countryIso); in queryContactInfo()
222 mContactInfoHelper.updateCallLogContactInfo(number, countryIso, info, callLogInfo); in queryContactInfo()
[all …]
/packages/apps/Dialer/src/com/android/dialer/list/
DBlockedListSearchFragment.java147 final String number; in onItemClick() local
151 number = adapter.getPhoneNumber(adapterPosition); in onItemClick()
152 blockContactNumber(number, blockId); in onItemClick()
156 number = adapter.getQueryString(); in onItemClick()
157 blockNumber(number); in onItemClick()
170 private void blockNumber(final String number) { in blockNumber() argument
178 number, in blockNumber()
180 PhoneNumberUtils.formatNumber(number, countryIso), in blockNumber()
187 R.string.alreadyBlocked, number), in blockNumber()
193 onCheckListener, number, countryIso); in blockNumber()
[all …]
DSearchFragment.java206 public boolean checkForProhibitedPhoneNumber(String number) { in checkForProhibitedPhoneNumber() argument
213 if (number != null in checkForProhibitedPhoneNumber()
215 && number.matches(prohibitedPhoneNumberRegexp)) { in checkForProhibitedPhoneNumber()
243 final String number; in onItemClick() local
252 number = adapter.getQueryString(); in onItemClick()
254 if (listener != null && !checkForProhibitedPhoneNumber(number)) { in onItemClick()
255 listener.onPickPhoneNumber(number, false /* isVideoCall */, in onItemClick()
260 number = TextUtils.isEmpty(mAddToContactNumber) ? in onItemClick()
262 intent = IntentUtil.getNewContactIntent(number); in onItemClick()
266 number = TextUtils.isEmpty(mAddToContactNumber) ? in onItemClick()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
DAtPhonebook.java135 String number = cursor.getString(column); in getLastDialledNumber() local
137 return number; in getLastDialledNumber()
514 String number = pbr.cursor.getString(pbr.numberColumn); in processCpbrCommand() local
517 if (pbr.nameColumn == -1 && number != null && number.length() > 0) { in processCpbrCommand()
522 Uri.withAppendedPath(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI, number), in processCpbrCommand()
533 if (DBG && name == null) log("Caller ID lookup failed for " + number); in processCpbrCommand()
549 if (number == null) number = ""; in processCpbrCommand()
550 int regionType = PhoneNumberUtils.toaFromString(number); in processCpbrCommand()
552 number = number.trim(); in processCpbrCommand()
553 number = PhoneNumberUtils.stripSeparators(number); in processCpbrCommand()
[all …]
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DTelecomSystemTest.java413 protected String startOutgoingPhoneCallWithNoPhoneAccount(String number, in startOutgoingPhoneCallWithNoPhoneAccount() argument
417 return startOutgoingPhoneCallPendingCreateConnection(number, null, in startOutgoingPhoneCallWithNoPhoneAccount()
441 protected IdPair startOutgoingPhoneCall(String number, PhoneAccountHandle phoneAccountHandle, in startOutgoingPhoneCall() argument
445 return startOutgoingPhoneCall(number, phoneAccountHandle, connectionServiceFixture, in startOutgoingPhoneCall()
449 protected IdPair startOutgoingPhoneCall(String number, PhoneAccountHandle phoneAccountHandle, in startOutgoingPhoneCall() argument
455 startOutgoingPhoneCallPendingCreateConnection(number, phoneAccountHandle, in startOutgoingPhoneCall()
462 protected String startOutgoingPhoneCallPendingCreateConnection(String number, in startOutgoingPhoneCallPendingCreateConnection() argument
479 actionCallIntent.setData(Uri.parse("tel:" + number)); in startOutgoingPhoneCallPendingCreateConnection()
480 actionCallIntent.putExtra(Intent.EXTRA_PHONE_NUMBER, number); in startOutgoingPhoneCallPendingCreateConnection()
562 String number, in startIncomingPhoneCall() argument
[all …]
/packages/apps/ContactsCommon/src/com/android/contacts/common/util/
DPhoneNumberHelper.java49 public static boolean isUriNumber(String number) { in isUriNumber() argument
53 return number != null && (number.contains("@") || number.contains("%40")); in isUriNumber()
93 public static String getUsernameFromUriNumber(String number) { in getUsernameFromUriNumber() argument
96 int delimiterIndex = number.indexOf('@'); in getUsernameFromUriNumber()
98 delimiterIndex = number.indexOf("%40"); in getUsernameFromUriNumber()
102 "getUsernameFromUriNumber: no delimiter found in SIP addr '" + number + "'"); in getUsernameFromUriNumber()
103 return number; in getUsernameFromUriNumber()
105 return number.substring(0, delimiterIndex); in getUsernameFromUriNumber()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DDataRowHandlerForPhoneNumber.java48 final String number = values.getAsString(Phone.NUMBER); in insert() local
50 updatePhoneLookup(db, rawContactId, dataId, number, normalizedNumber); in insert()
91 final String number = values.getAsString(Phone.NUMBER); in fillNormalizedNumber() local
93 if (number != null && numberE164 == null) { in fillNormalizedNumber()
94 final String newNumberE164 = PhoneNumberUtils.formatNumberToE164(number, in fillNormalizedNumber()
115 String number, String numberE164) { in updatePhoneLookup() argument
118 if (number != null) { in updatePhoneLookup()
119 String normalizedNumber = PhoneNumberUtils.normalizeNumber(number); in updatePhoneLookup()
161 String number = builder.getString(Phone.NUMBER); in appendSearchableData() local
162 if (TextUtils.isEmpty(number)) { in appendSearchableData()
[all …]

123456789