Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Every call is always recorded initially and the rules determine if the recording should be deleted at the end of the call. The user can override the rules during the middle of a call by using the Delete and Restore buttons in BCR's notification. This allows the user to decide to keep the recording later in the call, even if auto-record was disabled for the caller.
The supported rule types are:
If BCR is not granted the Contacts permission, then only "All other calls" will be available. For simplicity of implementation, there is no way to add rules for specific phone numbers--only contacts. This way Android can do the hard work of performing phone number comparisons.
Rules are processed in order and while the rule matching mechanism can handle an arbitrary rule order, the configuration interface enforces that all the contact rules come first in sorted order, followed by "Unknown calls" and "All other calls". This is again done for simplicity of implementation. This should be sufficient for most use cases, with the caveat that conference calls will follow whichever rule matches first for any of the participants in the call.
This rule mechanism replaces the old "initially paused" setting. Pausing and unpausing no longer has any relation to whether a recording is kept. The old setting will be migrated to the new "Unknown calls" and "All other calls" rules.
Fixes: #320