summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/filterednumber
AgeCommit message (Collapse)Author
2015-11-02Don't try to iterate through empty cursorYorke Lee
Bug: 25429251 Change-Id: If2b4b875e3433f252a34d1afeaf3eaa3a1a3c3fc
2015-10-30Rename check method to isBlockedNumber.Andrew Lee
+ Clearer name about functionality, and async nature. + Change it to return "false" if it fails and is trying to block an invalid number, rather than returning "true". This matches a more standard success/fail return paradigm. + Update logic for showing "invalid" message based on return value. + Simplify parameter set which it takes in; always take nubmer and countryIso, because they can be used to calculate the normalized #. Bug: 25343277 Change-Id: If6fb28a6395e207047f4b27bfac37f5c70a9bac3
2015-10-30Merge "Fix checking for invalid numbers." into ub-contactsdialer-a-devAndrew Lee
2015-10-30Fix checking for invalid numbers.Andrew Lee
Some of the checking for invalid numbers was broken by code cleanups yesterday, and blocking of numbers which can't be normalized had been allowed (which is no good). Fixing this, by unifying checks for whether or not a number can be blocked. Bug: 25343277 Change-Id: Ia631a3e53e3f9ed58e173055a5e18086d95c9d02
2015-10-30Merge "Always hide blocked calls." into ub-contactsdialer-a-devAndrew Lee
2015-10-30Merge "Cleanup variable naming for easier reading." into ub-contactsdialer-a-devAndrew Lee
2015-10-30Always hide blocked calls.Andrew Lee
- Remove setting for show/hide. - Remove utilities and behaviors for show/hide. ~ Continue filtering blocked call types in call log (which may be marked by other applications.) ~ Change behavior after blocking call; instead of keeping the call log entry but changing the type to BLOCKED, delete it instead. + Default behavior is now to delete entries and visual voicemails of blocked calls. Bug: 25378068 Bug: 25106387 Change-Id: I8cbc419b25cce6ba39099857cffe4eb1df9d0bef
2015-10-30Merge "Restyle add button for blocked number settings." into ↵Andrew Lee
ub-contactsdialer-a-dev
2015-10-29Dismiss blocking disabled notification after touch.Andrew Lee
Before, it would linger around, even after the user had touched it and visited the settings screen. Feels like more standard behavior for it to be dismissed at this point (user has clearly seen it, and it doesn't really contain any info which needs to persist). Bug: 25377379 Change-Id: I5608a3d735fd084f4493c0fcd51d9dcedf04dc6f
2015-10-29Cleanup variable naming for easier reading.Andrew Lee
Bug: 25343277 Change-Id: I166a142f1537835b13afb2d15c0893aacda4eedd
2015-10-29Restyle add button for blocked number settings.Andrew Lee
+ Convert from button into list item with ripple feedback. - Removed divider line between list items, including the custom background drawable which used to be used to achieve the divider only for the bottom border. Bug: 25356667 Change-Id: Ic19fd8b895b7b12a140c64a945f8ac8571e0a510
2015-10-29Merge "Rename activity for blocked numbers settings." into ↵Andrew Lee
ub-contactsdialer-a-dev
2015-10-28Rename activity for blocked numbers settings.Andrew Lee
Manage is more related to a specific screen, new name seems to make more sense based on location in settings menu of application. Bug: 25343277 Change-Id: Ia45c1b7aa91c045078fd1473500f5d474e1c598f
2015-10-28Simplify FilteredNumberDialogFragment params.Andrew Lee
Reconstruct the normalized phone number from other params. Bug: 25343277 Change-Id: Ibb526b0808e0b50a4e946d91279e5570af44c3ca
2015-10-28Rename adapters to a more consistent plurality.Andrew Lee
... really, this was just bugging me. I'm not trying to just pad my CL count. ;) Bug: 25343277 Change-Id: Ifa0e894415d64f373fc23b01eb6169b5fffd98ce
2015-10-29Merge "Rename FilterNumberDialogFragment." into ub-contactsdialer-a-devAndrew Lee
2015-10-28Rename FilterNumberDialogFragment.Andrew Lee
It bugged me how it was inconsistently named to other classes (ie. FilterNumber vs FilteredNumber). It's also specific to blocked numbers, for now, so it felt more appropriate to name it accordingly. Bug: 25343277 Change-Id: I33e2f9fd933d117326690901ec71e3e8c0e3bbd3
2015-10-28Merge "Don't update on voicemail fetch if no activity." into ↵Andrew Lee
ub-contactsdialer-a-dev
2015-10-28Don't update on voicemail fetch if no activity.Andrew Lee
The right thing to do is to return early in this case. This is a theoretical fix for the tagged bug; presuming that this exception caused code execution to terminate prematurely and delete the voicemail as it would be expected to. Bug: 25346075 Change-Id: I643ff4e8abf723f3673b38f5933416730e5d5f9f
2015-10-28Merge "Call blocking normalization cleanup." into ub-contactsdialer-a-devAndrew Lee
2015-10-28Merge "Notify for call blocking disabled by E911." into ub-contactsdialer-a-devAndrew Lee
2015-10-28Notify for call blocking disabled by E911.Andrew Lee
+ Add method and listener to FilteredNumberAsyncQueryHandler to query for whether there are any blocked numbers. + Added utility function for showing a notification, which points to the blocked numbers setting screen. This notification will only be shown if the user has blocked numbers. + Add a boolean flag to track whether we have shown this notification after an emergency call. This is to address the (edge) case where the user makes an emergency call when they have not blocked any numbers, but then later blocks a number. + Added strings for notification. Bug: 25327365 Change-Id: I3179f3884271ea0a504ef8c9a61bf9dfbd18ef10
2015-10-28Merge "Tweak accessibility in for call blocking settings." into ↵Andrew Lee
ub-contactsdialer-a-dev
2015-10-28Disable call blocking for SIP numbers.Andrew Lee
Bug: 25342525 Change-Id: I9a845ffa25323b53175dc0eac2da1f2b4311abe3
2015-10-28Fix blocked numbers rotation jank.Andrew Lee
+ Saved search term. + Fix padding/shadow jank between rotations. + Fix title disappearing for import on rotation. Bug: 24910704 Change-Id: Ib683bd07ad629917ac429a5f33be54ecf781e33d
2015-10-28Tweak accessibility in for call blocking settings.Andrew Lee
+ Adjust talkback focus to allow the user to page through the cards for the settings and import separately, even though they are structurally part of the same header component, visually they reside in different "cards". + Change the "hide setting" to be toggled by tapping on the text description area. Bug: 25163592 Change-Id: I0d1fcd28dba058d707bfe5099cdf912aed14f728
2015-10-28Call blocking normalization cleanup.Andrew Lee
- Remove unnecessary getter. + Reorganized arguments logic in FilterNumberDialogFragment. Bug: 25343277 Change-Id: I7541f21ed28794b4a5d73e0c6c6d895ca6402c77
2015-10-27Provide debug hook for call blocking / E911.Andrew Lee
Add a systems settings config, which is checked for the delay threshold if a particular debug VERBOSE logging mode is used. Usage: adb shell setprop log.tag.DebugEmergencyCall VERBOSE adb shell settings put system dialer_emergency_call_threshold_ms 60000 Bug: 25216954 Change-Id: Ia9b179e16819d3d8232cbedd49d5744d7b69a825
2015-10-26Merge "Allow voicemail numbers to be blocked." into ub-contactsdialer-a-devAndrew Lee
2015-10-26Allow voicemail numbers to be blocked.Andrew Lee
Though it is lighter on logic now, it still seems helpful to have a common helper to return whether it should be possible to proceed with blocking a number. Bug: 25230222 Change-Id: I99f93f1cfc09988b3dec77f71541463c96d06225
2015-10-21Merge "Prevent fragment rotation crashes." into ub-contactsdialer-a-devAndrew Lee
2015-10-21Prevent fragment rotation crashes.Andrew Lee
Also, causes right fragment to retain after rotation and recreation. Bug: 25154818 Bug: 24910704 Change-Id: Icafbc7ba6f3ad877c2d28d92e510b9afbd822b65
2015-10-21Disable call blocking after emergency call.Andrew Lee
Will be disabled for 48 hours after an emergency call. + Add utility for noting last time of an emergency call. + Add utility for comparing current time to last time of an emergency call. + If current time is within 48 hours of emergency call, display text in settings explaining why call blocking is disabled. Bug: 24418319 Change-Id: I6824340f04fae17b73f17843a9f6ef991afa0327
2015-10-21Fix scrolling in blocked numbers list.Andrew Lee
+ Add elements as header, so they scroll with the list. + Shuffle around some layouts to make this work correctly. + Replace default ListView divider with custom drawable, to achieve the desired effect of removing the divider on the first list item. + Override BlockedNumberAdapter to never report itself as empty. Otherwise, the header will disappear. + Tweak some padding. Bug: 25134186 Change-Id: I07711437fea2d3042d3987983667ab5316d51fcc
2015-10-20Add import fragment, rearrange fragments.Andrew Lee
+ Add a fragment (and adapter) for displaying numbers from contacts marked as send to voicemail. This fragment has import functionality. + Refactor logic around the Blocked Numbers activity; relocate a lot of the fragment-specific logic, particularly around actionbars, to within the fragments themselves. + Simplify fragment management logic by using replace instead of show/hide. Bug: 23351616 Change-Id: I5c1076d6d001a8401234f57c27ada4bcd90e6c27
2015-10-20Fix broken reference.Andrew Lee
Bug: 24134270 Change-Id: I62c32b6cacdc931e7c99dca68b73aa6bf678b497
2015-10-20Add null check for cursor.Andrew Lee
Bug: 24134270 Change-Id: I5d28c633abee226f7bc2d63ec80340cd6deb9c79
2015-10-21Merge "Hide the hide blocked call settings if no VVM." into ↵Andrew Lee
ub-contactsdialer-a-dev
2015-10-21Merge "Delete voicemails from blocked users." into ub-contactsdialer-a-devAndrew Lee
2015-10-20Delete voicemails from blocked users.Andrew Lee
+ Delete voicemail when the notification is received if the number is blocked and the "hide" setting is set to true. + Changed utility to take time into account; only block voicemail notifications and delete voicemails if the voicemails are from after the time when the number was blocked. Bug: 24134270 Change-Id: I2f3b24d6291a6cec4a7d8530b00dd5a4656ab024
2015-10-20Merge "Set snackbar action text to blue." into ub-contactsdialer-a-devAndrew Lee
2015-10-20Hide the hide blocked call settings if no VVM.Andrew Lee
We can only honor deleting voicemail for VVM users. Bug:24134270 Change-Id: I2b4ea6856ab4bc79ad93ac111bc78bc7f8b4833e
2015-10-20Add setting for hiding blocked calls.Andrew Lee
+ Add settings switch to blocked number settings. + Add utility for checking/setting whether calls should be blocked. + Filter out blocked calls in call log query, if appropriate. + Refresh call log fragment after a change in setting. Followup work: delete voicemails for calls by blocked numbers after the time when the user blocked them. Bug: 24134270 Change-Id: I85088697559ef6fb446b82617f14f1c6fa893df1
2015-10-20Merge "Create superclass for BlockedNumberAdapter." into ub-contactsdialer-a-devAndrew Lee
2015-10-19Create superclass for BlockedNumberAdapter.Andrew Lee
To facilitate reusings the same views and adapter for both the manage blocked numbers list and the import list. The two will use different cursors because they are pulling data from different places (Contacts db vs FilteredNumbers db), and it seemed better to reuse code rather than creating parallel implementations. Bug: 23351616 Change-Id: I5cac5f2a6b8b3bf4a6e8f54c8bc3f1c1500ac5e7
2015-10-19Disable VM notification for blocked numbers.Andrew Lee
+ Added a utility to do a synchronous lookup for whether a number is blocked, but it should not be used normally from the UI thread. + Change voicemail notifier code to obtain countryIso, and pass back list of calls to notify as list (to make it easier to remove elements). Bug: 23944007 Change-Id: Iad1f8ee200b8f8734be3db0504482fcdee61e412
2015-10-19Don't allow blocking of emergency or VM numbers.Andrew Lee
Bug: 24680730 Bug: 24303461 Change-Id: Ibd7d431355ca97eb2ae7f29537809987a8d5f96d
2015-10-19Set snackbar action text to blue.Andrew Lee
Done for both snackbars in call blocking/unblocking and voicemail deletion. Bug: 24370325 Change-Id: I00fdebb635e60ac1d421ccf7f15df46693773870
2015-10-19Merge "Fix up blocked photo scenarios." into ub-contactsdialer-a-devAndrew Lee
2015-10-16Add import for SEND_TO_VOICEMAIL.Andrew Lee
+ Add utility class for async import functions. + Move check for contacts with SEND_TO_VOICEMAIl to util. + Add function for adding phone numbers of contacts with SEND_TO_VOICEMAIL to the block list, then clearing the SEND_TO_VOICEMAIL flag. + Fixed bug where the import text would not be shown for an empty block list. Rearranged layouts slightly to facilitate this. + Protect against null listeners in FilteredNumberAsyncQueryHandler. Bug: 23351616 Change-Id: Id526e16f20a3d28966bbc5e458cecfcd03ecb20f
2015-10-16Fix up blocked photo scenarios.Andrew Lee
+ Show blocked drawable in CallDetailActivity. Rearrange logic in the activity to facilitate updating the contact photo and block item action in accordance to blocked state. + Fix bug in FilterNumberDialogFragment where callback was not always invoked because of final/scope issues where it was possible for the callback to be unintentionally null and not invoked. + Clear blocked id cache when pausing the call log adapter, so that after changing the blocked state in the call detail activity the changes will be reflected in the call log. Bug: 24871853 Change-Id: I1d58b1e0c222ead90fa7b6c30a95bc3254a14776
2015-10-15Polish call blocking rotation/undo behaviors.Andrew Lee
+ Correctly dismiss filtered number dialog on rotate. + Polish listener interface, and extend across all block/unblock and undo scenarios. + Update UI across all blocking scenarios (call log, call detail, settings, blocked number list, blocked number search); + Conslidate creation of FilterNumberDialogFragment in a single static method. The listener interface is not ideal, because it does not maintain state well across rotation and multiple instances. This option was selected, however, because of the number of scenarios in which the dialog is invoked and various circumstances (in a RecyclerView list item, in a fragment, in an activity). This range of scenarios makes it convoluted to implement a uniform mechanism in any other way, so the approach opted for is to set a listener, and dismiss the dialog on rotation.. Bug: 24638328 Bug: 24109819 Bug: 24871853 Change-Id: I2332edda2cae0341af3e80b13aa96af6068f75ac
2015-10-12Implement behavior for import settings visibility.Andrew Lee
Check to see if there are any contacts being sent to voicemail. If true, show the import settings in the BlockedNumberFragment, otherwise hide those settings. Bug: 23351616 Change-Id: I370d80508571ac654d8c10afab332b552f8dd99e
2015-10-07Combine blocked number fragments into Activity.Andrew Lee
Mocks indicate that after adding, the user should be returned to the management UI and the snackbar should be shown there. This is kind of pain to do across fragments in different activities. To help address this, make one Activity the parent of both the blocked number manage and add/search UI. This also makes sense in terms of logical organization. Bug: 24134038 Change-Id: I682342a73c964a5d4eb90469f10d6584b85400f1
2015-10-06Merge "Don't set FilteredNumberAsyncQueryHandler." into ub-contactsdialer-a-devAndrew Lee
2015-10-05Dismiss filter dialog on rotation.Andrew Lee
This simplifies addressing a number of rotation cases by eliminating them completely. Otherwise, we need to worry about updating references, such as having the right fragment or activity reference to be able to provide the correct parent view for the snackbar. This is particularly complicated in some cases in Dialer because we have a fragment => adapter => viewholder hierarchy to pass through. Bug: 24638328 Change-Id: Ic8a5d2c3ca35742f5bb0986d77ae3b8d5f44e4dd
2015-10-03Don't set FilteredNumberAsyncQueryHandler.Andrew Lee
Rather than creating single instances and setting them or passing them around, create them when we need them. This won't happen too often so instantiating the objects shouldn't be too much of a burden on the system. Instances of AsyncQueryHandler all end up running tasks off the same thread, so there should not be a negative consequence of spinning off more threads. Bug: 24638328 Change-Id: If53ce4f1fd83736c330c1ff02946ed45da575796
2015-10-02Add blocked number indicator to search screen for adding a blocked number.Anne Rong
Bug: 24468656 Change-Id: I31091e2dde07dabc432247fd4e409907fada152b
2015-09-29Rename OnPhoneNumberPickerActionListener methodsAnne Rong
Bug: 24506966 Change-Id: Ibc1d334fc18235c3d5971364d7024db61c590c46
2015-09-29Add search for adding blocked numbers to the blocked number management screen.Anne Rong
Bug: 24134038 Change-Id: I30b283a6b67d7e64b58138762079c4bceb8fc64f
2015-09-22Merge "Fix snackbar using out of scope View in blocked numbers list." into ↵Anne Rong
ub-contactsdialer-a-dev
2015-09-21Fix snackbar using out of scope View in blocked numbers list.Anne Rong
Bug: 24272126, 24273593 Change-Id: I79f3ffbc745a914a11f9a61e5f06bb87be9d54de
2015-09-21Fix disabled 'Add number' button when there are no blocked numbers.Anne Rong
Bug: 24273004 Change-Id: Iab9ec3a12f9850bc100a78529b39559ed85256db
2015-09-18Refactor FilteredNumberAsyncQueryHandler.isBlockedAnne Rong
Returns invalid status instead of throwing exception. Bug: 24177581 Change-Id: I6b731ab023a0cd0f50db2e3468bfccdebce6e488
2015-09-17Build management screen for managing blocked numbers.Anne Rong
Currently uses a simple dialog for adding numbers. Search function to be added in separate CL. Bug: 23350280 Change-Id: Ib25b9e0d72e95853af88c446b2143341f6d077cb
2015-09-03Add block/unblock number to calllog longpress menuAnne Rong
Bug: 23350278 Change-Id: I2304055f4e2b5ffbb50370fd8cf9517f50210d75