diff --git a/core/api/current.txt b/core/api/current.txt index b983617445e54..6a2e5c1ae8f8b 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -34292,6 +34292,7 @@ package android.provider { field public static final int PRESENTATION_ALLOWED = 1; // 0x1 field public static final int PRESENTATION_PAYPHONE = 4; // 0x4 field public static final int PRESENTATION_RESTRICTED = 2; // 0x2 + field public static final int PRESENTATION_UNAVAILABLE = 5; // 0x5 field public static final int PRESENTATION_UNKNOWN = 3; // 0x3 field public static final String PRIORITY = "priority"; field public static final int PRIORITY_NORMAL = 0; // 0x0 @@ -41065,6 +41066,7 @@ package android.telecom { field public static final int PRESENTATION_ALLOWED = 1; // 0x1 field public static final int PRESENTATION_PAYPHONE = 4; // 0x4 field public static final int PRESENTATION_RESTRICTED = 2; // 0x2 + field public static final int PRESENTATION_UNAVAILABLE = 5; // 0x5 field public static final int PRESENTATION_UNKNOWN = 3; // 0x3 field public static final int PRIORITY_NORMAL = 0; // 0x0 field public static final int PRIORITY_URGENT = 1; // 0x1 diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 30154c8f4a73e..1f96a249dfc19 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -13785,6 +13785,7 @@ package android.telephony.ims { field public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2; // 0x2 field public static final int OIR_PRESENTATION_PAYPHONE = 4; // 0x4 field public static final int OIR_PRESENTATION_RESTRICTED = 1; // 0x1 + field public static final int OIR_PRESENTATION_UNAVAILABLE = 5; // 0x5 field public static final int OIR_PRESENTATION_UNKNOWN = 3; // 0x3 field public static final int PRIORITY_NORMAL = 0; // 0x0 field public static final int PRIORITY_URGENT = 1; // 0x1 diff --git a/core/java/android/provider/BlockedNumberContract.java b/core/java/android/provider/BlockedNumberContract.java index dd2ea81d747bc..5d00b29eb3c83 100644 --- a/core/java/android/provider/BlockedNumberContract.java +++ b/core/java/android/provider/BlockedNumberContract.java @@ -231,7 +231,7 @@ public class BlockedNumberContract { prefix = { "STATUS_" }, value = {STATUS_NOT_BLOCKED, STATUS_BLOCKED_IN_LIST, STATUS_BLOCKED_RESTRICTED, STATUS_BLOCKED_UNKNOWN_NUMBER, STATUS_BLOCKED_PAYPHONE, - STATUS_BLOCKED_NOT_IN_CONTACTS}) + STATUS_BLOCKED_NOT_IN_CONTACTS, STATUS_BLOCKED_UNAVAILABLE}) public @interface BlockStatus {} /** @@ -276,6 +276,13 @@ public class BlockedNumberContract { */ public static final int STATUS_BLOCKED_NOT_IN_CONTACTS = 5; + /** + * Integer reason code used with {@link #RES_BLOCK_STATUS} to indicate that a call was blocked + * because it is from a number not available. + * @hide + */ + public static final int STATUS_BLOCKED_UNAVAILABLE = 6; + /** * Integer reason indicating whether a call was blocked, and if so why. * @hide @@ -441,6 +448,9 @@ public class BlockedNumberContract { /* Preference key for whether should show an emergency call notification. */ public static final String ENHANCED_SETTING_KEY_SHOW_EMERGENCY_CALL_NOTIFICATION = "show_emergency_call_notification"; + /* Preference key of block unavailable calls setting. */ + public static final String ENHANCED_SETTING_KEY_BLOCK_UNAVAILABLE = + "block_unavailable_calls_setting"; /** * Notifies the provider that emergency services were contacted by the user. @@ -547,6 +557,7 @@ public class BlockedNumberContract { * {@link #ENHANCED_SETTING_KEY_BLOCK_PRIVATE} * {@link #ENHANCED_SETTING_KEY_BLOCK_PAYPHONE} * {@link #ENHANCED_SETTING_KEY_BLOCK_UNKNOWN} + * {@link #ENHANCED_SETTING_KEY_BLOCK_UNAVAILABLE} * {@link #ENHANCED_SETTING_KEY_EMERGENCY_CALL_NOTIFICATION_SHOWING} * @return {@code true} if the setting is enabled. {@code false} otherwise. */ @@ -574,6 +585,7 @@ public class BlockedNumberContract { * {@link #ENHANCED_SETTING_KEY_BLOCK_PRIVATE} * {@link #ENHANCED_SETTING_KEY_BLOCK_PAYPHONE} * {@link #ENHANCED_SETTING_KEY_BLOCK_UNKNOWN} + * {@link #ENHANCED_SETTING_KEY_BLOCK_UNAVAILABLE} * {@link #ENHANCED_SETTING_KEY_EMERGENCY_CALL_NOTIFICATION_SHOWING} * @param value the enabled statue of the setting to set. */ @@ -603,6 +615,8 @@ public class BlockedNumberContract { return "blocked - payphone"; case STATUS_BLOCKED_NOT_IN_CONTACTS: return "blocked - not in contacts"; + case STATUS_BLOCKED_UNAVAILABLE: + return "blocked - unavailable"; } return "unknown"; } diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java index 0cc5bfda75e85..8dca7abaca8e5 100644 --- a/core/java/android/provider/CallLog.java +++ b/core/java/android/provider/CallLog.java @@ -910,6 +910,7 @@ public class CallLog { *
* Calls with a {@link Call.Details#getHandlePresentation()} of - * {@link TelecomManager#PRESENTATION_RESTRICTED}, {@link TelecomManager#PRESENTATION_UNKNOWN} - * or {@link TelecomManager#PRESENTATION_PAYPHONE} presentation are not provided to the + * {@link TelecomManager#PRESENTATION_RESTRICTED}, {@link TelecomManager#PRESENTATION_UNKNOWN}, + * {@link TelecomManager#PRESENTATION_UNAVAILABLE} or + * {@link TelecomManager#PRESENTATION_PAYPHONE} presentation are not provided to the * {@link CallScreeningService}. * * @param callDetails Information about a new call, see {@link Call.Details}. diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 0dc899e392a78..6279bf88ab1c0 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -990,6 +990,11 @@ public class TelecomManager { */ public static final int PRESENTATION_PAYPHONE = 4; + /** + * Indicates that the address or number of a call is unavailable. + */ + public static final int PRESENTATION_UNAVAILABLE = 5; + /* * Values for the adb property "persist.radio.videocall.audio.output" @@ -1006,7 +1011,7 @@ public class TelecomManager { @IntDef( prefix = { "PRESENTATION_" }, value = {PRESENTATION_ALLOWED, PRESENTATION_RESTRICTED, PRESENTATION_UNKNOWN, - PRESENTATION_PAYPHONE}) + PRESENTATION_PAYPHONE, PRESENTATION_UNAVAILABLE}) public @interface Presentation {} diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index cd399c02a72eb..8e55f75d05e58 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2273,6 +2273,7 @@ public class CarrierConfigManager { * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_PRIVATE * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_PAYPHONE * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNKNOWN + * android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNAVAILABLE * *
* 1. For Single SIM(SS) device, it can be customized in both carrier_config_mccmnc.xml diff --git a/telephony/java/android/telephony/ims/ImsCallProfile.java b/telephony/java/android/telephony/ims/ImsCallProfile.java index 93e10583fbc01..7e2d80eb871cf 100644 --- a/telephony/java/android/telephony/ims/ImsCallProfile.java +++ b/telephony/java/android/telephony/ims/ImsCallProfile.java @@ -317,6 +317,10 @@ public final class ImsCallProfile implements Parcelable { * Payphone presentation for Originating Identity. */ public static final int OIR_PRESENTATION_PAYPHONE = 4; + /** + * Unavailable presentation for Originating Identity. + */ + public static final int OIR_PRESENTATION_UNAVAILABLE = 5; //Values for EXTRA_DIALSTRING /** @@ -989,6 +993,8 @@ public final class ImsCallProfile implements Parcelable { return ImsCallProfile.OIR_PRESENTATION_PAYPHONE; case PhoneConstants.PRESENTATION_UNKNOWN: return ImsCallProfile.OIR_PRESENTATION_UNKNOWN; + case PhoneConstants.PRESENTATION_UNAVAILABLE: + return ImsCallProfile.OIR_PRESENTATION_UNAVAILABLE; default: return ImsCallProfile.OIR_DEFAULT; } @@ -1017,6 +1023,8 @@ public final class ImsCallProfile implements Parcelable { return PhoneConstants.PRESENTATION_ALLOWED; case ImsCallProfile.OIR_PRESENTATION_PAYPHONE: return PhoneConstants.PRESENTATION_PAYPHONE; + case ImsCallProfile.OIR_PRESENTATION_UNAVAILABLE: + return PhoneConstants.PRESENTATION_UNAVAILABLE; case ImsCallProfile.OIR_PRESENTATION_UNKNOWN: return PhoneConstants.PRESENTATION_UNKNOWN; default: diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java index f6502466e25e1..813e80e6f355d 100644 --- a/telephony/java/com/android/internal/telephony/PhoneConstants.java +++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java @@ -95,6 +95,7 @@ public class PhoneConstants { public static final int PRESENTATION_UNKNOWN = 3; // no specified or unknown by network @UnsupportedAppUsage public static final int PRESENTATION_PAYPHONE = 4; // show pay phone info + public static final int PRESENTATION_UNAVAILABLE = 5; // show unavailable public static final String PHONE_NAME_KEY = "phoneName"; public static final String DATA_NETWORK_TYPE_KEY = "networkType";