Loading src/com/android/dialer/CallDetailActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.DisplayNameSources; import android.provider.ContactsContract.Intents.Insert; import android.provider.VoicemailContract.Voicemails; import android.telephony.PhoneNumberUtils; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; Loading @@ -59,6 +58,7 @@ import com.android.contacts.common.ClipboardUtils; import com.android.contacts.common.GeoUtil; import com.android.contacts.common.model.Contact; import com.android.contacts.common.model.ContactLoader; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.contacts.common.util.UriUtils; import com.android.dialer.BackScrollManager.ScrollableHeader; import com.android.dialer.calllog.CallDetailHistoryAdapter; Loading Loading @@ -561,7 +561,7 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware // Only show a label if the number is shown and it is not a SIP address. if (!TextUtils.isEmpty(firstDetails.name) && !TextUtils.isEmpty(firstDetails.number) && !PhoneNumberUtils.isUriNumber(firstDetails.number.toString())) { && !PhoneNumberHelper.isUriNumber(firstDetails.number.toString())) { entry.label = Phone.getTypeLabel(mResources, firstDetails.numberType, firstDetails.numberLabel); } Loading src/com/android/dialer/PhoneCallDetailsHelper.java +2 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.view.View; import android.widget.TextView; import com.android.contacts.common.test.NeededForTesting; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.dialer.calllog.CallTypeHelper; import com.android.dialer.calllog.ContactInfo; import com.android.dialer.calllog.PhoneNumberDisplayHelper; Loading Loading @@ -102,7 +103,7 @@ public class PhoneCallDetailsHelper { CharSequence numberFormattedLabel = null; // Only show a label if the number is shown and it is not a SIP address. if (!TextUtils.isEmpty(details.number) && !PhoneNumberUtils.isUriNumber(details.number.toString())) { && !PhoneNumberHelper.isUriNumber(details.number.toString())) { if (details.numberLabel == ContactInfo.GEOCODE_AS_LABEL) { numberFormattedLabel = details.geocode; } else { Loading src/com/android/dialer/calllog/CallLogFragment.java +2 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.widget.TextView; import com.android.common.io.MoreCloseables; import com.android.contacts.common.CallUtil; import com.android.contacts.common.GeoUtil; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.dialer.R; import com.android.dialer.util.EmptyLoader; import com.android.dialer.voicemail.VoicemailStatusHelper; Loading Loading @@ -368,7 +369,7 @@ public class CallLogFragment extends ListFragment } Intent intent; // If "number" is really a SIP address, construct a sip: URI. if (PhoneNumberUtils.isUriNumber(number)) { if (PhoneNumberHelper.isUriNumber(number)) { intent = CallUtil.getCallIntent( Uri.fromParts(CallUtil.SCHEME_SIP, number, null)); } else { Loading src/com/android/dialer/calllog/CallLogGroupBuilder.java +3 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ import android.provider.CallLog.Calls; import android.telephony.PhoneNumberUtils; import com.android.common.widget.GroupingListAdapter; import com.android.contacts.common.util.PhoneNumberHelper; import com.google.common.annotations.VisibleForTesting; /** Loading Loading @@ -117,7 +119,7 @@ public class CallLogGroupBuilder { @VisibleForTesting boolean equalNumbers(String number1, String number2) { if (PhoneNumberUtils.isUriNumber(number1) || PhoneNumberUtils.isUriNumber(number2)) { if (PhoneNumberHelper.isUriNumber(number1) || PhoneNumberHelper.isUriNumber(number2)) { return compareSipAddresses(number1, number2); } else { return PhoneNumberUtils.compare(number1, number2); Loading src/com/android/dialer/calllog/ContactInfoHelper.java +4 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import com.android.contacts.common.util.Constants; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.contacts.common.util.UriUtils; import com.android.dialer.service.CachedNumberLookupService; import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo; Loading Loading @@ -66,13 +67,13 @@ public class ContactInfoHelper { final ContactInfo info; // Determine the contact info. if (PhoneNumberUtils.isUriNumber(number)) { if (PhoneNumberHelper.isUriNumber(number)) { // This "number" is really a SIP address. ContactInfo sipInfo = queryContactInfoForSipAddress(number); if (sipInfo == null || sipInfo == ContactInfo.EMPTY) { // Check whether the "username" part of the SIP address is // actually the phone number of a contact. String username = PhoneNumberUtils.getUsernameFromUriNumber(number); String username = PhoneNumberHelper.getUsernameFromUriNumber(number); if (PhoneNumberUtils.isGlobalPhoneNumber(username)) { sipInfo = queryContactInfoForPhoneNumber(username, countryIso); } Loading Loading @@ -253,7 +254,7 @@ public class ContactInfoHelper { return ""; } // If "number" is really a SIP address, don't try to do any formatting at all. if (PhoneNumberUtils.isUriNumber(number)) { if (PhoneNumberHelper.isUriNumber(number)) { return number; } if (TextUtils.isEmpty(countryIso)) { Loading Loading
src/com/android/dialer/CallDetailActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.DisplayNameSources; import android.provider.ContactsContract.Intents.Insert; import android.provider.VoicemailContract.Voicemails; import android.telephony.PhoneNumberUtils; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; Loading @@ -59,6 +58,7 @@ import com.android.contacts.common.ClipboardUtils; import com.android.contacts.common.GeoUtil; import com.android.contacts.common.model.Contact; import com.android.contacts.common.model.ContactLoader; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.contacts.common.util.UriUtils; import com.android.dialer.BackScrollManager.ScrollableHeader; import com.android.dialer.calllog.CallDetailHistoryAdapter; Loading Loading @@ -561,7 +561,7 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware // Only show a label if the number is shown and it is not a SIP address. if (!TextUtils.isEmpty(firstDetails.name) && !TextUtils.isEmpty(firstDetails.number) && !PhoneNumberUtils.isUriNumber(firstDetails.number.toString())) { && !PhoneNumberHelper.isUriNumber(firstDetails.number.toString())) { entry.label = Phone.getTypeLabel(mResources, firstDetails.numberType, firstDetails.numberLabel); } Loading
src/com/android/dialer/PhoneCallDetailsHelper.java +2 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.view.View; import android.widget.TextView; import com.android.contacts.common.test.NeededForTesting; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.dialer.calllog.CallTypeHelper; import com.android.dialer.calllog.ContactInfo; import com.android.dialer.calllog.PhoneNumberDisplayHelper; Loading Loading @@ -102,7 +103,7 @@ public class PhoneCallDetailsHelper { CharSequence numberFormattedLabel = null; // Only show a label if the number is shown and it is not a SIP address. if (!TextUtils.isEmpty(details.number) && !PhoneNumberUtils.isUriNumber(details.number.toString())) { && !PhoneNumberHelper.isUriNumber(details.number.toString())) { if (details.numberLabel == ContactInfo.GEOCODE_AS_LABEL) { numberFormattedLabel = details.geocode; } else { Loading
src/com/android/dialer/calllog/CallLogFragment.java +2 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.widget.TextView; import com.android.common.io.MoreCloseables; import com.android.contacts.common.CallUtil; import com.android.contacts.common.GeoUtil; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.dialer.R; import com.android.dialer.util.EmptyLoader; import com.android.dialer.voicemail.VoicemailStatusHelper; Loading Loading @@ -368,7 +369,7 @@ public class CallLogFragment extends ListFragment } Intent intent; // If "number" is really a SIP address, construct a sip: URI. if (PhoneNumberUtils.isUriNumber(number)) { if (PhoneNumberHelper.isUriNumber(number)) { intent = CallUtil.getCallIntent( Uri.fromParts(CallUtil.SCHEME_SIP, number, null)); } else { Loading
src/com/android/dialer/calllog/CallLogGroupBuilder.java +3 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ import android.provider.CallLog.Calls; import android.telephony.PhoneNumberUtils; import com.android.common.widget.GroupingListAdapter; import com.android.contacts.common.util.PhoneNumberHelper; import com.google.common.annotations.VisibleForTesting; /** Loading Loading @@ -117,7 +119,7 @@ public class CallLogGroupBuilder { @VisibleForTesting boolean equalNumbers(String number1, String number2) { if (PhoneNumberUtils.isUriNumber(number1) || PhoneNumberUtils.isUriNumber(number2)) { if (PhoneNumberHelper.isUriNumber(number1) || PhoneNumberHelper.isUriNumber(number2)) { return compareSipAddresses(number1, number2); } else { return PhoneNumberUtils.compare(number1, number2); Loading
src/com/android/dialer/calllog/ContactInfoHelper.java +4 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import com.android.contacts.common.util.Constants; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.contacts.common.util.UriUtils; import com.android.dialer.service.CachedNumberLookupService; import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo; Loading Loading @@ -66,13 +67,13 @@ public class ContactInfoHelper { final ContactInfo info; // Determine the contact info. if (PhoneNumberUtils.isUriNumber(number)) { if (PhoneNumberHelper.isUriNumber(number)) { // This "number" is really a SIP address. ContactInfo sipInfo = queryContactInfoForSipAddress(number); if (sipInfo == null || sipInfo == ContactInfo.EMPTY) { // Check whether the "username" part of the SIP address is // actually the phone number of a contact. String username = PhoneNumberUtils.getUsernameFromUriNumber(number); String username = PhoneNumberHelper.getUsernameFromUriNumber(number); if (PhoneNumberUtils.isGlobalPhoneNumber(username)) { sipInfo = queryContactInfoForPhoneNumber(username, countryIso); } Loading Loading @@ -253,7 +254,7 @@ public class ContactInfoHelper { return ""; } // If "number" is really a SIP address, don't try to do any formatting at all. if (PhoneNumberUtils.isUriNumber(number)) { if (PhoneNumberHelper.isUriNumber(number)) { return number; } if (TextUtils.isEmpty(countryIso)) { Loading