According to some new commits that were discovered by XDA-Developers Android P might be bringing a new feature to the stock dialer app. This commit was part of a new set of commits that were added to AOSP from a Sony Engineer.
This new feature would allow you to block all incoming calls from any number that isnt in your list of contacts. Text strings found in the commits suggest there will be option to block numbers based on the following criteria.
Phone number not in contacts list
Phone number not disclosed by the caller (Private number)
Phone number is from a pay phone
Phone number does not have any caller ID information
This feature would be disabled in the event that you make an emergency call in the event that responders need to reach you after dialing 911 or your local emergency call center number.
Finally, it appears that the feature can be disabled at the carriers discretion. So its possible well see carriers try to sell you a service for blocking unwanted phone calls.
The feature isnt actually a part of Android just yet, but its entirely possible well see it starting with Android P. Personally, this is a feature I welcome because I constantly get phone calls about reducing my non-existent student loans.
Check out the Source link for more insight on the commit found about this new call blocking feature.