summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/phonenumberutil
AgeCommit message (Collapse)Author
2021-08-21Automatic translation importMichael Bestas
Change-Id: Ie3a73c54c766044acbcc8608dd54cc502518799e
2021-02-28Automatic translation importMichael Bestas
Change-Id: I74c642b3b9aad5034895cc0cc72a8f3c986797db
2018-07-10Update translation strings.Eric Erfanian
Test: make Change-Id: Ib75f4f25e91067311de244d7f1fb95bc898aec22
2018-03-26Remove obsolete methods in CompatUtils and rename it as "LocaleUtils".linyuh
Test: Existing tests PiperOrigin-RevId: 190516504 Change-Id: I5fa9e123b45beb9728257ecd160a348fb3f4732c
2018-03-07Support local emergency phone number check when there are multiple SIMs.linyuh
Bug: 73994020 Test: PhoneNumberHelperTest PiperOrigin-RevId: 188260007 Change-Id: I23025e9b9454f487117c35e7a3b09307371ae825
2018-03-05Disable phone number formatting for LATAM MCCs.linyuh
Bug: 73718977 Test: MotorolaUtilsTest & PhoneNumberHelperTest PiperOrigin-RevId: 187889473 Change-Id: I00d58071ba18ddce5a09c07de9edd2d0956d6478
2018-03-01Disable phone number formatting for devices with Argentinian SIMs.linyuh
Bug: 73718977 Test: PhoneNumberHelperTest PiperOrigin-RevId: 187540382 Change-Id: I814ec62b2215c24b8cde3442c5dc83d98ad87164
2018-01-26Added number presentation to AnnotatedCallLog.zachh
Updated the new call log UI to properly show text based on the presentation. Bug: 70989592 Test: unit PiperOrigin-RevId: 183414195 Change-Id: I2123f37cd3c733060125b6e894c1a80be4193ad6
2017-12-14Take into consideration special characters when we do contact match.linyuh
Bug: 30225112 Test: CallLogGroupBuilderTest, PhoneNumberHelperTest, CallerInfoTest, and Manual (see demo) PiperOrigin-RevId: 179080046 Change-Id: I8e451a6c197a6c3df4260e58d0276a5dc5b9515a
2017-12-12BEGIN_PUBLIClinyuh
Automated rollback of changelist 172505648 Bug: 30225112 Test: None PiperOrigin-RevId: 178815682 Change-Id: I1fe1eef49d587314d32e7125f5106769b3099ad3
2017-12-12BEGIN_PUBLIClinyuh
Automated rollback of changelist 172683494 Bug: 30225112 Test: None PiperOrigin-RevId: 178807986 Change-Id: I45978ea4daab71985ac93c3c3a0439fdd8e873d5
2017-12-12BEGIN_PUBLICroldenburg
Automated rollback of changelist 172956409 Bug: 30225112 Test: rollback PiperOrigin-RevId: 178805314 Change-Id: Ia85b10081948b64d4cfc9c9d10d35679df8296ef
2017-11-29Format number for SIM selectiontwyen
Bug: 69812286 Test: PhoneNumberHelperTest PiperOrigin-RevId: 177227451 Change-Id: I6cf53e50d17860f4374cbd9a94451bc0731905a4
2017-10-24Rename the new bubble package name from "bubble" to "newbubble".Eric Erfanian
It fixes AOSP for package name conflict. Test: manual PiperOrigin-RevId: 173298696 Change-Id: Id10ebe0bcf029e61f65cf6580c7198abd8395081
2017-10-19Take into account special dialable characters when grouping calls in the ↵linyuh
call log UI. Currently we use PhoneNumberUtils#compare(String, String) to determine whether two numbers in the call log should be grouped. The method ignores special dialable characters such as "#", "*", "+", etc, which can cause phone numbers and service dialing numbers to be grouped. For example, suppose the user has a contact named "John Smith" with number 123456789 and a contact named "Service" with number #123456789, and called each contact once. The old grouping logic will put the two numbers in the same group. The new grouping logic in this CL can separate the two numbers. Bug: 30225112 Test: CallLogGroupBuilderTest, PhoneNumberHelperTest PiperOrigin-RevId: 172683494 Change-Id: Ie9e7b7418d6d7c74830cbae09c04ff1feb1b827d
2017-10-17Stop showing partially matched numbers that are not global phone numbers.linyuh
When determining whether two phone numbers are identical enough for caller ID purposes, the Contacts Provider ignores special dialable characters such as '#', '*', '+', etc. This makes it possible for the cursor returned by the Contacts Provider to have multiple rows even when the URI asks for a specific number. For example, suppose the user has two contacts whose numbers are "#123" and "123", respectively. When the URI asks for number "123", both numbers will be returned. Therefore, the following strategy is employed to find a match. If the cursor points to a global phone number (i.e., a number that can be accepted by PhoneNumberUtils#isGlobalPhoneNumber(String)) and the lookup number in the URI is a PARTIAL match, the cursor is a match. If the cursor points to a number that is not a global phone number, the cursor is a match iff the lookup number in the URI is an EXACT match. There is no matched cursor in all other circumstances. UI demo: Suppose the user has a contact named "Service1" with number "#123". Before: Incall UI after the user dials "123": https://photos.app.goo.gl/xFWCD4qy2VR3YEuJ2 Call log UI after the call ends: https://photos.app.goo.gl/FT28GdTBy1dtANtI2 After: Incall UI after the user dials "123": https://photos.app.goo.gl/Io3BisQmsyfnvitV2 Call log UI after the call ends: https://photos.app.goo.gl/6GgRrmx75yUTga3B3 Bug: 30225112 Test: PhoneNumberHelperTest PiperOrigin-RevId: 172505648 Change-Id: Ida554313455ff9ce40432897681f89f58d64af04
2017-10-12Optimization for incoming call latency.wangqi
There are many binder call triggered by IPC on main thread. This change will try to reduce them by caching thing that's bound to a call. It reduce total binder transaction from 1002 to 664 and saves ~11% latency of incoming call on locked screen. 1. Cache isVoiceMailNumber in DialerCall 2. Cache call capable accounts in DialerCall 3. Cache current country iso in DialerCall 4. Don't set orientation change if it's not changed. This change also add lots of trace info. It won't affect release build though since they are stripped out by proguard. Bug: 64542087 Test: manual PiperOrigin-RevId: 171901266 Change-Id: Iec48f030529aa59974212147276f6d0ae121872a
2017-09-22Better handling country iso when getting geo location of phone number.wangqi
1. Use existing country iso info instead of guessing current country iso from sim and locale for blocked number. 2. Use country iso of current sim instead of default sim for incall location info. This fixes bug in multi sim device when default sim is out of service and making call with the other sim. Bug: 65399976 Test: manual PiperOrigin-RevId: 169554641 Change-Id: I416d7e2d6bc3c872bfec3eda4005a5a1684f0e40
2017-08-31Update Dialer source to latest internal Google revision.Eric Erfanian
Previously, Android's Dialer app was developed in an internal Google source control system and only exported to public during AOSP drops. The Dialer team is now switching to a public development model similar to the telephony team. This CL represents all internal Google changes that were committed to Dialer between the public O release and today's tip of tree on internal master. This CL squashes those changes into a single commit. In subsequent changes, changes will be exported on a per-commit basis. Test: make, flash install, run Merged-In: I45270eaa8ce732d71a1bd84b08c7fa0e99af3160 Change-Id: I529aaeb88535b9533c0ae4ef4e6c1222d4e0f1c8 PiperOrigin-RevId: 167068436
2017-05-03This change reflects the Dialer V10 RC00 branch.Eric Erfanian
RC00 is based on: branch: dialer-android_release_branch/153304843.1 synced to: 153304843 following the instructions at go/dialer-aosp-release. In this release: * Removes final apache sources. * Uses native lite compilation. More drops will follow with subsequent release candidates until we reach our final v10 release, in cadence with our prebuilt drops. Test: TreeHugger, on device Change-Id: Ic9684057230f9b579c777820c746cd21bf45ec0f
2017-03-17Update AOSP Dialer source from internal google3 repository at cl/150392808Eric Erfanian
Test: Treehugger Notable this release: * Reintroduce localization. This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from 3/15/2017 to cl/150392808 (3/16/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: Ia16d68469c2ca1ff42c7fa31d922bdb78c4e244a
2017-03-01Update dialer sources.Eric Erfanian
Test: Built package and system image. This change clobbers the old source, and is an export from an internal Google repository. The internal repository was forked form Android in March, and this change includes modifications since then, to near the v8 release. Since the fork, we've moved code from monolithic to independent modules. In addition, we've switched to Blaze/Bazel as the build sysetm. This export, however, still uses make. New dependencies have been added: - Dagger - Auto-Value - Glide - Libshortcutbadger Going forward, development will still be in Google3, and the Gerrit release will become an automated export, with the next drop happening in ~ two weeks. Android.mk includes local modifications from ToT. Abridged changelog: Bug fixes ● Not able to mute, add a call when using Phone app in multiwindow mode ● Double tap on keypad triggering multiple key and tones ● Reported spam numbers not showing as spam in the call log ● Crash when user tries to block number while Phone app is not set as default ● Crash when user picks a number from search auto-complete list Visual Voicemail (VVM) improvements ● Share Voicemail audio via standard exporting mechanisms that support file attachment (email, MMS, etc.) ● Make phone number, email and web sites in VVM transcript clickable ● Set PIN before declining VVM Terms of Service {Carrier} ● Set client type for outbound visual voicemail SMS {Carrier} New incoming call and incall UI on older devices (Android M) ● Updated Phone app icon ● New incall UI (large buttons, button labels) ● New and animated Answer/Reject gestures Accessibility ● Add custom answer/decline call buttons on answer screen for touch exploration accessibility services ● Increase size of touch target ● Add verbal feedback when a Voicemail fails to load ● Fix pressing of Phone buttons while in a phone call using Switch Access ● Fix selecting and opening contacts in talkback mode ● Split focus for ‘Learn More’ link in caller id & spam to help distinguish similar text Other ● Backup & Restore for App Preferences ● Prompt user to enable Wi-Fi calling if the call ends due to out of service and Wi-Fi is connected ● Rename “Dialpad” to “Keypad” ● Show "Private number" for restricted calls ● Delete unused items (vcard, add contact, call history) from Phone menu Change-Id: I2a7e53532a24c21bf308bf0a6d178d7ddbca4958