Home
last modified time | relevance | path

Searched refs:phoneNumber (Results 1 – 25 of 130) 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/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/apps/Car/libs/car-telephony-common/src/com/android/car/telephony/common/
DContact.java248 for (PhoneNumber phoneNumber : contact.mPhoneNumbers) { in merge()
249 int indexOfPhoneNumber = mPhoneNumbers.indexOf(phoneNumber); in merge()
251 mPhoneNumbers.add(phoneNumber); in merge()
254 existingPhoneNumber.merge(phoneNumber); in merge()
270 for (PhoneNumber phoneNumber : mPhoneNumbers) { in getPhoneNumber()
271 if (PhoneNumberUtils.compare(phoneNumber.getNumber(), number)) { in getPhoneNumber()
272 return phoneNumber; in getPhoneNumber()
298 for (PhoneNumber phoneNumber : mPhoneNumbers) { in writeToParcel()
299 dest.writeParcelable(phoneNumber, flags); in writeToParcel()
330 PhoneNumber phoneNumber = source.readParcelable(PhoneNumber.class.getClassLoader()); in fromParcel() local
[all …]
DPhoneNumber.java185 public PhoneNumber merge(PhoneNumber phoneNumber) { in merge() argument
186 if (equals(phoneNumber)) { in merge()
187 if (mDataVersion < phoneNumber.mDataVersion) { in merge()
188 mDataVersion = phoneNumber.mDataVersion; in merge()
189 mId = phoneNumber.mId; in merge()
190 mIsPrimary |= phoneNumber.mIsPrimary; in merge()
191 mAccountName = phoneNumber.mAccountName; in merge()
192 mAccountType = phoneNumber.mAccountType; in merge()
240 PhoneNumber phoneNumber = new PhoneNumber(i18nPhoneNumberWrapper, type, label,
242 return phoneNumber;
DInMemoryPhoneBook.java119 public Contact lookupContactEntry(String phoneNumber) { in lookupContactEntry() argument
120 Log.v(TAG, String.format("lookupContactEntry: %s", phoneNumber)); in lookupContactEntry()
125 if (TextUtils.isEmpty(phoneNumber)) { in lookupContactEntry()
131 mContext, phoneNumber); in lookupContactEntry()
154 for (PhoneNumber phoneNumber : contact.getNumbers()) { in onCursorLoaded()
155 mPhoneNumberContactMap.put(phoneNumber.getI18nPhoneNumberWrapper(), contact); in onCursorLoaded()
/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/Settings/tests/robotests/src/com/android/settings/deviceinfo/
DPhoneNumberPreferenceControllerTest.java114 final String phoneNumber = "1111111111"; in updateState_singleSim_shouldUpdateTitleAndPhoneNumber() local
115 doReturn(phoneNumber).when(mController).getFormattedPhoneNumber(mSubscriptionInfo); in updateState_singleSim_shouldUpdateTitleAndPhoneNumber()
122 verify(mPreference).setSummary(phoneNumber); in updateState_singleSim_shouldUpdateTitleAndPhoneNumber()
127 final String phoneNumber = "1111111111"; in updateState_multiSim_shouldUpdateTitleAndPhoneNumberOfMultiplePreferences() local
128 doReturn(phoneNumber).when(mController).getFormattedPhoneNumber(mSubscriptionInfo); in updateState_multiSim_shouldUpdateTitleAndPhoneNumberOfMultiplePreferences()
136 verify(mPreference).setSummary(phoneNumber); in updateState_multiSim_shouldUpdateTitleAndPhoneNumberOfMultiplePreferences()
139 verify(mSecondPreference).setSummary(phoneNumber); in updateState_multiSim_shouldUpdateTitleAndPhoneNumberOfMultiplePreferences()
172 final String phoneNumber = "1111111111"; in copy_shouldCopyPhoneNumberToClipboard() local
173 doReturn(phoneNumber).when(mController).getFormattedPhoneNumber(mSubscriptionInfo); in copy_shouldCopyPhoneNumberToClipboard()
180 assertThat(phoneNumber.contentEquals(data)).isTrue(); in copy_shouldCopyPhoneNumberToClipboard()
/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/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/Messaging/src/com/android/messaging/datamodel/data/
DParticipantData.java200 private static ParticipantData getFromRawPhone(final String phoneNumber) { in getFromRawPhone() argument
201 Assert.isTrue(phoneNumber != null); in getFromRawPhone()
206 pd.mSendDestination = TextUtil.replaceUnicodeDigits(phoneNumber); in getFromRawPhone()
229 public static ParticipantData getFromRawPhoneBySystemLocale(final String phoneNumber) { in getFromRawPhoneBySystemLocale() argument
230 final ParticipantData pd = getFromRawPhone(phoneNumber); in getFromRawPhoneBySystemLocale()
252 final String phoneNumber, final int subId) { in getFromRawPhoneBySimLocale() argument
253 final ParticipantData pd = getFromRawPhone(phoneNumber); in getFromRawPhoneBySimLocale()
360 final String phoneNumber = in updatePhoneNumberForSelfIfChanged() local
363 if (isSelf() && !TextUtils.equals(phoneNumber, mNormalizedDestination)) { in updatePhoneNumberForSelfIfChanged()
364 mNormalizedDestination = phoneNumber; in updatePhoneNumberForSelfIfChanged()
[all …]
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/ui/contact/
DContactListViewHolderTest.java90 PhoneNumber phoneNumber = PhoneNumber.newInstance(mContext, PHONE_NUMBER_1, 0, LABEL_1, in testLabel_withOnlyOneNumber_showLabel() local
92 when(mMockContact.getNumbers()).thenReturn(Arrays.asList(phoneNumber)); in testLabel_withOnlyOneNumber_showLabel()
100 PhoneNumber phoneNumber = PhoneNumber.newInstance(mContext, PHONE_NUMBER_1, TYPE, null, in testLabel_withOneNumberAndNumberHasNullLabel_showTypeLabel() local
102 when(mMockContact.getNumbers()).thenReturn(Arrays.asList(phoneNumber)); in testLabel_withOneNumberAndNumberHasNullLabel_showTypeLabel()
114 PhoneNumber phoneNumber = mock(PhoneNumber.class); in testLabel_withOneNumberAndGetNullLabel_showEmptyString() local
115 when(phoneNumber.getLabel()).thenReturn(null); in testLabel_withOneNumberAndGetNullLabel_showEmptyString()
116 when(mMockContact.getNumbers()).thenReturn(Arrays.asList(phoneNumber)); in testLabel_withOneNumberAndGetNullLabel_showEmptyString()
188 PhoneNumber phoneNumber = PhoneNumber.newInstance(mContext, PHONE_NUMBER_1, 0, LABEL_1, in testClickCallActionButton_ContactHasOneNumber_placeCall() local
190 when(mMockContact.getNumbers()).thenReturn(Arrays.asList(phoneNumber)); in testClickCallActionButton_ContactHasOneNumber_placeCall()
/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.sendMultipartTextMessageExternal(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/apps/Car/Dialer/src/com/android/car/dialer/ui/common/
DPhoneNumberListAdapter.java49 PhoneNumber phoneNumber = getItem(position); in getView() local
50 if (phoneNumber == null) { in getView()
54 phoneNumberView.setText(phoneNumber.getRawNumber()); in getView()
56 CharSequence readableLabel = phoneNumber.getReadableLabel(mContext.getResources()); in getView()
57 if (phoneNumber.isPrimary()) { in getView()
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/telecom/
DUiCallManagerTest.java124 private void checkPlaceCall(String phoneNumber, int timesCalled) { in checkPlaceCall() argument
127 assertThat(mUiCallManager.placeCall(phoneNumber)).isTrue(); in checkPlaceCall()
131 assertThat(uriCaptor.getValue().getSchemeSpecificPart()).isEqualTo(phoneNumber); in checkPlaceCall()
143 for (String phoneNumber : phoneNumbers) { in testPlaceCall_invalidNumber()
144 checkPlaceCallForInvalidNumber(phoneNumber); in testPlaceCall_invalidNumber()
148 private void checkPlaceCallForInvalidNumber(String phoneNumber) { in checkPlaceCallForInvalidNumber() argument
151 assertThat(mUiCallManager.placeCall(phoneNumber)).isFalse(); in checkPlaceCallForInvalidNumber()
/packages/services/Telephony/testapps/SmsManagerTestApp/src/com/android/phone/testapps/smsmanagertestapp/
DSmsManagerTestApp.java138 String phoneNumber = mPhoneNumber.getText().toString(); in sendOutgoingSms() local
139 if (TextUtils.isEmpty(phoneNumber)) { in sendOutgoingSms()
146 m.sendTextMessage(phoneNumber, null, "Test", in sendOutgoingSms()
154 String phoneNumber = mPhoneNumber.getText().toString(); in sendOutgoingSmsService() local
155 if (TextUtils.isEmpty(phoneNumber)) { in sendOutgoingSmsService()
163 sendSmsIntent.putExtra(SmsManagerTestService.EXTRA_SEND_NUMBER, phoneNumber); in sendOutgoingSmsService()
/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/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/apps/Car/Dialer/src/com/android/car/dialer/ui/contact/
DContactDetailsViewHolder.java77 public void bind(Context context, PhoneNumber phoneNumber) { in bind() argument
79 mTitle.setText(phoneNumber.getRawNumber()); in bind()
82 CharSequence readableLabel = phoneNumber.getReadableLabel(context.getResources()); in bind()
83 if (phoneNumber.isPrimary()) { in bind()
89 mCallActionView.setOnClickListener(v -> placeCall(phoneNumber)); in bind()
/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