Home
last modified time | relevance | path

Searched refs:phoneNumber (Results 1 – 25 of 138) sorted by relevance

123456

/packages/apps/Contacts/src/com/android/contacts/compat/
DPhoneNumberUtilsCompat.java41 public static String normalizeNumber(String phoneNumber) { in normalizeNumber() argument
43 return PhoneNumberUtils.normalizeNumber(phoneNumber); in normalizeNumber()
45 return normalizeNumberInternal(phoneNumber); in normalizeNumber()
52 private static String normalizeNumberInternal(String phoneNumber) { in normalizeNumberInternal() argument
53 if (TextUtils.isEmpty(phoneNumber)) { in normalizeNumberInternal()
57 int len = phoneNumber.length(); in normalizeNumberInternal()
59 char c = phoneNumber.charAt(i); in normalizeNumberInternal()
67 return normalizeNumber(PhoneNumberUtils.convertKeypadLettersToDigits(phoneNumber)); in normalizeNumberInternal()
74 String phoneNumber, String phoneNumberE164, String defaultCountryIso) { in formatNumber() argument
76 return PhoneNumberUtils.formatNumber(phoneNumber, phoneNumberE164, defaultCountryIso); in formatNumber()
[all …]
/packages/providers/BlockedNumberProvider/tests/src/com/android/providers/blockednumber/
DBlockedNumberProviderTest.java267 String phoneNumber = "5004541111"; in testBlockSuppressionAfterEmergencyContact() local
268 insert(cv(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, phoneNumber)); in testBlockSuppressionAfterEmergencyContact()
271 assertIsBlocked(true, phoneNumber); in testBlockSuppressionAfterEmergencyContact()
272 assertShouldSystemBlock(true, phoneNumber, null); in testBlockSuppressionAfterEmergencyContact()
278 assertIsBlocked(true, phoneNumber); in testBlockSuppressionAfterEmergencyContact()
279 assertShouldSystemBlock(true, phoneNumber, null); in testBlockSuppressionAfterEmergencyContact()
286 assertIsBlocked(true, phoneNumber); in testBlockSuppressionAfterEmergencyContact()
287 assertShouldSystemBlock(false, phoneNumber, null); in testBlockSuppressionAfterEmergencyContact()
300 assertIsBlocked(true, phoneNumber); in testBlockSuppressionAfterEmergencyContact()
301 assertShouldSystemBlock(true, phoneNumber, null); in testBlockSuppressionAfterEmergencyContact()
[all …]
/packages/apps/Dialer/java/com/android/dialer/util/
DIntentUtil.java29 public static Intent getSendSmsIntent(CharSequence phoneNumber) { in getSendSmsIntent() argument
30 return new Intent(Intent.ACTION_SENDTO, Uri.parse(SMS_URI_PREFIX + phoneNumber)); in getSendSmsIntent()
38 public static Intent getNewContactIntent(CharSequence phoneNumber) { in getNewContactIntent() argument
39 return getNewContactIntent(null /* name */, phoneNumber /* phoneNumber */, NO_PHONE_TYPE); in getNewContactIntent()
43 CharSequence name, CharSequence phoneNumber, int phoneNumberType) { in getNewContactIntent() argument
45 populateContactIntent(intent, name, phoneNumber, phoneNumberType); in getNewContactIntent()
55 public static Intent getAddToExistingContactIntent(CharSequence phoneNumber) { in getAddToExistingContactIntent() argument
57 null /* name */, phoneNumber /* phoneNumber */, NO_PHONE_TYPE); in getAddToExistingContactIntent()
61 CharSequence name, CharSequence phoneNumber, int phoneNumberType) { in getAddToExistingContactIntent() argument
63 populateContactIntent(intent, name, phoneNumber, phoneNumberType); in getAddToExistingContactIntent()
[all …]
/packages/apps/Car/Dialer/src/com/android/car/dialer/storage/
DFavoriteNumberRepository.java108 public void addToFavorite(Contact contact, PhoneNumber phoneNumber) { in addToFavorite() argument
113 phoneNumber.getRawNumber())); in addToFavorite()
114 favoriteNumber.setAccountName(phoneNumber.getAccountName()); in addToFavorite()
115 favoriteNumber.setAccountType(phoneNumber.getAccountType()); in addToFavorite()
122 public void removeFromFavorite(Contact contact, PhoneNumber phoneNumber) { in removeFromFavorite() argument
128 if (matches(favoriteNumberEntity, contact, phoneNumber)) { in removeFromFavorite()
228 PhoneNumber phoneNumber) { in matches() argument
230 return numberMatches(favoriteNumber, phoneNumber); in matches()
236 private boolean numberMatches(FavoriteNumberEntity favoriteNumber, PhoneNumber phoneNumber) { in numberMatches() argument
241 if (!TextUtils.equals(favoriteNumber.getAccountName(), phoneNumber.getAccountName()) in numberMatches()
[all …]
/packages/apps/Dialer/java/com/android/dialer/smartdial/util/
DSmartDialNameMatcher.java113 public SmartDialMatchPosition matchesNumber(Context context, String phoneNumber, String query) { in matchesNumber() argument
114 if (TextUtils.isEmpty(phoneNumber)) { in matchesNumber()
118 constructEmptyMask(builder, phoneNumber.length()); in matchesNumber()
122 matchesNumberWithOffset(context, phoneNumber, query, /* offset = */ 0); in matchesNumber()
124 PhoneNumberTokens phoneNumberTokens = SmartDialPrefix.parsePhoneNumber(context, phoneNumber); in matchesNumber()
129 context, phoneNumber, query, phoneNumberTokens.countryCodeOffset); in matchesNumber()
133 matchesNumberWithOffset(context, phoneNumber, query, phoneNumberTokens.nanpCodeOffset); in matchesNumber()
150 public SmartDialMatchPosition matchesNumber(Context context, String phoneNumber) { in matchesNumber() argument
151 return matchesNumber(context, phoneNumber, query); in matchesNumber()
165 Context context, String phoneNumber, String query, int offset) { in matchesNumberWithOffset() argument
[all …]
/packages/providers/BlockedNumberProvider/src/com/android/providers/blockednumber/
DBlockedNumberProvider.java152 final String phoneNumber = cv.getAsString( in insertBlockedNumber() local
155 if (TextUtils.isEmpty(phoneNumber)) { in insertBlockedNumber()
161 final String e164Number = Utils.getE164Number(getContext(), phoneNumber, in insertBlockedNumber()
384 private int unblock(String phoneNumber) { in unblock() argument
385 if (TextUtils.isEmpty(phoneNumber)) { in unblock()
390 String[] selectionArgs = new String[]{phoneNumber}; in unblock()
391 final String e164Number = Utils.getE164Number(getContext(), phoneNumber, null); in unblock()
394 selectionArgs = new String[]{phoneNumber, e164Number}; in unblock()
404 private boolean isEmergencyNumber(String phoneNumber) { in isEmergencyNumber() argument
405 if (TextUtils.isEmpty(phoneNumber)) { in isEmergencyNumber()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DPhoneLookupWithStarPrefix.java104 static String normalizeNumberWithStar(String phoneNumber) { in normalizeNumberWithStar() argument
105 if (TextUtils.isEmpty(phoneNumber)) { in normalizeNumberWithStar()
106 return phoneNumber; in normalizeNumberWithStar()
108 if (phoneNumber.startsWith("*")) { in normalizeNumberWithStar()
114 phoneNumber.substring(1).replace("+", "")); in normalizeNumberWithStar()
116 return PhoneNumberUtils.normalizeNumber(phoneNumber); in normalizeNumberWithStar()
126 final String phoneNumber = normalizeNumberWithStar(cursor.getString(numberIndex)); in matchingNumberStartsWithStar() local
127 if (phoneNumber != null && phoneNumber.startsWith("*")) { in matchingNumberStartsWithStar()
/packages/apps/Car/libs/car-telephony-common/src/com/android/car/telephony/common/
DPhoneNumber.java206 public PhoneNumber merge(PhoneNumber phoneNumber) { in merge() argument
207 if (equals(phoneNumber)) { in merge()
208 if (mDataVersion < phoneNumber.mDataVersion) { in merge()
209 mDataVersion = phoneNumber.mDataVersion; in merge()
210 mId = phoneNumber.mId; in merge()
211 mIsPrimary |= phoneNumber.mIsPrimary; in merge()
212 mType = phoneNumber.mType; in merge()
213 mLabel = phoneNumber.mLabel; in merge()
262 PhoneNumber phoneNumber = new PhoneNumber(i18nPhoneNumberWrapper, type, label,
264 phoneNumber.setIsFavorite(source.readBoolean());
[all …]
DContact.java539 for (PhoneNumber phoneNumber : mPhoneNumbers) { in getPhoneNumber()
540 if (phoneNumber.getI18nPhoneNumberWrapper().equals(i18nPhoneNumber)) { in getPhoneNumber()
541 return phoneNumber; in getPhoneNumber()
572 for (PhoneNumber phoneNumber : mPhoneNumbers) { in writeToParcel()
573 dest.writeParcelable(phoneNumber, flags); in writeToParcel()
618 PhoneNumber phoneNumber = source.readParcelable(PhoneNumber.class.getClassLoader()); in fromParcel() local
619 contact.mPhoneNumbers.add(phoneNumber); in fromParcel()
620 if (phoneNumber.isPrimary()) { in fromParcel()
621 contact.mPrimaryPhoneNumber = phoneNumber; in fromParcel()
DInMemoryPhoneBook.java148 public Contact lookupContactEntry(String phoneNumber) { in lookupContactEntry() argument
149 Log.v(TAG, String.format("lookupContactEntry: %s", phoneNumber)); in lookupContactEntry()
154 if (TextUtils.isEmpty(phoneNumber)) { in lookupContactEntry()
160 mContext, phoneNumber); in lookupContactEntry()
238 for (PhoneNumber phoneNumber : contact.getNumbers()) { in onCursorLoaded()
239 mPhoneNumberContactMap.put(phoneNumber.getI18nPhoneNumberWrapper(), contact); in onCursorLoaded()
/packages/apps/Messaging/src/com/android/messaging/ui/appsettings/
DPhoneNumberPreference.java49 public void setDefaultPhoneNumber(final String phoneNumber, final int subscriptionId) { in setDefaultPhoneNumber() argument
50 mDefaultPhoneNumber = phoneNumber; in setDefaultPhoneNumber()
66 final String phoneNumber = bidiFormatter.unicodeWrap in onBindView() local
69 setSummary(phoneNumber); in onBindView()
82 final String phoneNumber = bidiFormatter.unicodeWrap in onBindDialogView() local
85 getEditText().setText(phoneNumber); in onBindDialogView()
95 final String phoneNumber = phoneUtils.getCanonicalBySystemLocale(value); in onDialogClosed() local
100 if (phoneNumber.equals(defaultPhoneNumber)) { in onDialogClosed()
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/
DPhoneNumberPreferenceControllerTest.java113 final String phoneNumber = "1111111111"; in updateState_singleSim_shouldUpdateTitleAndPhoneNumber() local
114 doReturn(phoneNumber).when(mController).getFormattedPhoneNumber(mSubscriptionInfo); in updateState_singleSim_shouldUpdateTitleAndPhoneNumber()
121 verify(mPreference).setSummary(phoneNumber); in updateState_singleSim_shouldUpdateTitleAndPhoneNumber()
126 final String phoneNumber = "1111111111"; in updateState_multiSim_shouldUpdateTitleAndPhoneNumberOfMultiplePreferences() local
127 doReturn(phoneNumber).when(mController).getFormattedPhoneNumber(mSubscriptionInfo); in updateState_multiSim_shouldUpdateTitleAndPhoneNumberOfMultiplePreferences()
135 verify(mPreference).setSummary(phoneNumber); in updateState_multiSim_shouldUpdateTitleAndPhoneNumberOfMultiplePreferences()
138 verify(mSecondPreference).setSummary(phoneNumber); in updateState_multiSim_shouldUpdateTitleAndPhoneNumberOfMultiplePreferences()
171 final String phoneNumber = "1111111111"; in copy_shouldCopyPhoneNumberToClipboard() local
172 doReturn(phoneNumber).when(mController).getFormattedPhoneNumber(mSubscriptionInfo); in copy_shouldCopyPhoneNumberToClipboard()
179 assertThat(phoneNumber.contentEquals(data)).isTrue(); in copy_shouldCopyPhoneNumberToClipboard()
/packages/apps/Dialer/java/com/android/dialer/interactions/
DPhoneNumberInteraction.java176 String phoneNumber, in performAction() argument
183 intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("sms", phoneNumber, null)); in performAction()
189 new CallIntentBuilder(phoneNumber, callSpecificAppData) in performAction()
214 private void performAction(String phoneNumber) { in performAction() argument
216 context, phoneNumber, interactionType, isVideoCall, callSpecificAppData); in performAction()
309 item.phoneNumber = cursor.getString(phoneNumberColumn); in onLoadComplete()
333 performAction(item.phoneNumber); in onLoadComplete()
403 String phoneNumber; field in PhoneNumberInteraction.PhoneItem
415 this.phoneNumber = in.readString(); in PhoneItem()
426 dest.writeString(phoneNumber); in writeToParcel()
[all …]
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/contact/
DContactDetailsViewHolder.java154 public void bind(Context context, Contact contact, PhoneNumber phoneNumber) { in bind() argument
155 mTitle.setText(phoneNumber.getRawNumber()); in bind()
158 CharSequence readableLabel = phoneNumber.getReadableLabel(context.getResources()); in bind()
159 CharSequence favoriteLabel = phoneNumber.isFavorite() ? context.getString( in bind()
161 if (phoneNumber.isPrimary()) { in bind()
170 v -> UiCallManager.get().placeCall(phoneNumber.getRawNumber())); in bind()
172 if (phoneNumber.isFavorite() || !contact.isStarred()) { in bind()
177 ViewUtils.setActivated(mFavoriteActionView, phoneNumber.isFavorite()); in bind()
180 mPhoneNumberPresenter.onClick(contact, phoneNumber); in bind()
/packages/apps/Messaging/src/com/android/messaging/datamodel/data/
DParticipantData.java206 private static ParticipantData getFromRawPhone(final String phoneNumber) { in getFromRawPhone() argument
207 Assert.isTrue(phoneNumber != null); in getFromRawPhone()
212 pd.mSendDestination = TextUtil.replaceUnicodeDigits(phoneNumber); in getFromRawPhone()
235 public static ParticipantData getFromRawPhoneBySystemLocale(final String phoneNumber) { in getFromRawPhoneBySystemLocale() argument
236 final ParticipantData pd = getFromRawPhone(phoneNumber); in getFromRawPhoneBySystemLocale()
258 final String phoneNumber, final int subId) { in getFromRawPhoneBySimLocale() argument
259 final ParticipantData pd = getFromRawPhone(phoneNumber); in getFromRawPhoneBySimLocale()
394 final String phoneNumber = in updatePhoneNumberForSelfIfChanged() local
397 if (isSelf() && !TextUtils.equals(phoneNumber, mNormalizedDestination)) { in updatePhoneNumberForSelfIfChanged()
398 mNormalizedDestination = phoneNumber; in updatePhoneNumberForSelfIfChanged()
[all …]
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/ui/contact/
DContactListViewHolderTest.java93 PhoneNumber phoneNumber = PhoneNumber.newInstance(mContext, PHONE_NUMBER_1, 0, LABEL_1, in testLabel_withOnlyOneNumber_showLabel() local
95 when(mMockContact.getNumbers()).thenReturn(Arrays.asList(phoneNumber)); in testLabel_withOnlyOneNumber_showLabel()
103 PhoneNumber phoneNumber = PhoneNumber.newInstance(mContext, PHONE_NUMBER_1, TYPE, null, in testLabel_withOneNumberAndNumberHasNullLabel_showTypeLabel() local
105 when(mMockContact.getNumbers()).thenReturn(Arrays.asList(phoneNumber)); in testLabel_withOneNumberAndNumberHasNullLabel_showTypeLabel()
117 PhoneNumber phoneNumber = mock(PhoneNumber.class); in testLabel_withOneNumberAndGetNullLabel_showEmptyString() local
118 when(phoneNumber.getLabel()).thenReturn(null); in testLabel_withOneNumberAndGetNullLabel_showEmptyString()
119 when(mMockContact.getNumbers()).thenReturn(Arrays.asList(phoneNumber)); in testLabel_withOneNumberAndGetNullLabel_showEmptyString()
191 PhoneNumber phoneNumber = PhoneNumber.newInstance(mContext, PHONE_NUMBER_1, 0, LABEL_1, in testClickCallActionButton_ContactHasOneNumber_placeCall() local
193 when(mMockContact.getNumbers()).thenReturn(Arrays.asList(phoneNumber)); in testClickCallActionButton_ContactHasOneNumber_placeCall()
249 PhoneNumber phoneNumber = mock(PhoneNumber.class); in testClickShowContactDetailView_hasContactDetail_showContactDetail() local
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DRespondViaSmsManager.java152 private static void showMessageResultToast(final String phoneNumber, in showMessageResultToast() argument
161 final String confirmationMsg = String.format(formatString, phoneNumber); in showMessageResultToast()
162 int startingPosition = confirmationMsg.indexOf(phoneNumber); in showMessageResultToast()
163 int endingPosition = startingPosition + phoneNumber.length(); in showMessageResultToast()
188 private void rejectCallWithMessage(Context context, String phoneNumber, String textMessage, in rejectCallWithMessage() argument
211 !TextUtils.isEmpty(contactName) ? contactName : phoneNumber, in rejectCallWithMessage()
214 smsManager.sendMultipartTextMessage(phoneNumber, null, messageParts, in rejectCallWithMessage()
/packages/apps/Messaging/src/com/android/messaging/util/
DPhoneUtils.java491 String phoneNumber = subInfo.getNumber(); in getSelfRawNumber() local
492 if (TextUtils.isEmpty(phoneNumber) && LogUtil.isLoggable(TAG, LogUtil.DEBUG)) { in getSelfRawNumber()
495 return phoneNumber; in getSelfRawNumber()
748 final PhoneNumber phoneNumber = phoneNumberUtil.parse(phoneText, country); in getValidE164Number() local
749 if (phoneNumber != null && phoneNumberUtil.isValidNumber(phoneNumber)) { in getValidE164Number()
750 return phoneNumberUtil.format(phoneNumber, PhoneNumberFormat.E164); in getValidE164Number()
843 final PhoneNumber phoneNumber = phoneNumberUtil.parse(selfNumber, country); in getSimNumberNoCountryCode() local
844 if (phoneNumber != null && phoneNumberUtil.isValidNumber(phoneNumber)) { in getSimNumberNoCountryCode()
846 .format(phoneNumber, PhoneNumberFormat.NATIONAL) in getSimNumberNoCountryCode()
/packages/services/Telephony/tests/src/com/android/phone/ecc/
DEccDataTest.java61 assertThat(eccInfo.phoneNumber).isNotEmpty(); in testEccDataContent()
62 assertThat(eccInfo.phoneNumber).isEqualTo(eccInfo.phoneNumber.trim()); in testEccDataContent()
63 assertThat(loadedNumbers.contains(eccInfo.phoneNumber)).isFalse(); in testEccDataContent()
65 loadedNumbers.add(eccInfo.phoneNumber); in testEccDataContent()
/packages/apps/Dialer/java/com/android/incallui/
DCallerInfo.java85 public String phoneNumber; field in CallerInfo
209 info.phoneNumber = cursor.getString(columnIndex); in getCallerInfo()
458 phoneNumber = null; in markAsEmergency()
479 phoneNumber = null; in markAsVoiceMail()
505 String number = TextUtils.isEmpty(phoneNumber) ? fallbackNumber : phoneNumber; in updateGeoDescription()
520 .append("\nphoneNumber: " + phoneNumber) in toString()
549 .append(", phoneNumber " + ((phoneNumber == null) ? "null" : "non-null")) in toString()
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/telecom/
DUiCallManagerTest.java137 private void checkPlaceCall(String phoneNumber, int timesCalled) { in checkPlaceCall() argument
140 assertThat(mUiCallManager.placeCall(phoneNumber)).isTrue(); in checkPlaceCall()
144 assertThat(uriCaptor.getValue().getSchemeSpecificPart()).isEqualTo(phoneNumber); in checkPlaceCall()
156 for (String phoneNumber : phoneNumbers) { in testPlaceCall_invalidNumber()
157 checkPlaceCallForInvalidNumber(phoneNumber); in testPlaceCall_invalidNumber()
161 private void checkPlaceCallForInvalidNumber(String phoneNumber) { in checkPlaceCallForInvalidNumber() argument
164 assertThat(mUiCallManager.placeCall(phoneNumber)).isFalse(); in checkPlaceCallForInvalidNumber()
/packages/apps/Bluetooth/src/com/android/bluetooth/pbapclient/
DCallLogPullRequest.java97 String phoneNumber = phones.get(0).getNumber(); in onPullComplete() local
98 values.put(CallLog.Calls.NUMBER, phoneNumber); in onPullComplete()
99 if (mCallCounter.get(phoneNumber) != null) { in onPullComplete()
100 int updateCounter = mCallCounter.get(phoneNumber) + 1; in onPullComplete()
101 mCallCounter.put(phoneNumber, updateCounter); in onPullComplete()
103 mCallCounter.put(phoneNumber, 1); in onPullComplete()
/packages/services/Telephony/testapps/SmsManagerTestApp/src/com/android/phone/testapps/smsmanagertestapp/
DSmsManagerTestApp.java142 String phoneNumber = mPhoneNumber.getText().toString(); in sendOutgoingSms() local
143 if (TextUtils.isEmpty(phoneNumber)) { in sendOutgoingSms()
150 m.sendTextMessage(phoneNumber, null, "Test", in sendOutgoingSms()
158 String phoneNumber = mPhoneNumber.getText().toString(); in sendOutgoingSmsService() local
159 if (TextUtils.isEmpty(phoneNumber)) { in sendOutgoingSmsService()
167 sendSmsIntent.putExtra(SmsManagerTestService.EXTRA_SEND_NUMBER, phoneNumber); in sendOutgoingSmsService()
/packages/apps/Dialer/java/com/android/contacts/common/util/
DContactDisplayUtils.java213 @Nullable String message, @Nullable String phoneNumber) { in getTelephoneTtsSpannable() argument
218 int start = TextUtils.isEmpty(phoneNumber) ? -1 : message.indexOf(phoneNumber); in getTelephoneTtsSpannable()
220 final int end = start + phoneNumber.length(); in getTelephoneTtsSpannable()
221 final TtsSpan ttsSpan = PhoneNumberUtils.createTtsSpan(phoneNumber); in getTelephoneTtsSpannable()
227 start = message.indexOf(phoneNumber, end); in getTelephoneTtsSpannable()
/packages/apps/Dialer/java/com/android/dialer/shortcuts/
DShortcutUsageReporter.java67 public static void onOutgoingCallAdded(@NonNull Context context, @Nullable String phoneNumber) { in onOutgoingCallAdded() argument
71 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N_MR1 || TextUtils.isEmpty(phoneNumber)) { in onOutgoingCallAdded()
75 EXECUTOR.submit(Task.ID, new Task(context), phoneNumber); in onOutgoingCallAdded()
109 private String queryForLookupKey(String phoneNumber) { in queryForLookupKey() argument
118 Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber)); in queryForLookupKey()

123456