Merge "Add new API for new feature of display name." am: e43f70afc7 am: bacd6a4a11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1807961 Change-Id: I83d94ad77c85887fdc7a1bf2a3401069ccd9bd94
This commit is contained in:
@@ -33870,6 +33870,7 @@ package android.provider {
|
|||||||
field public static final int PRESENTATION_ALLOWED = 1; // 0x1
|
field public static final int PRESENTATION_ALLOWED = 1; // 0x1
|
||||||
field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
|
field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
|
||||||
field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
|
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 PRESENTATION_UNKNOWN = 3; // 0x3
|
||||||
field public static final String PRIORITY = "priority";
|
field public static final String PRIORITY = "priority";
|
||||||
field public static final int PRIORITY_NORMAL = 0; // 0x0
|
field public static final int PRIORITY_NORMAL = 0; // 0x0
|
||||||
@@ -40594,6 +40595,7 @@ package android.telecom {
|
|||||||
field public static final int PRESENTATION_ALLOWED = 1; // 0x1
|
field public static final int PRESENTATION_ALLOWED = 1; // 0x1
|
||||||
field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
|
field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
|
||||||
field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
|
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 PRESENTATION_UNKNOWN = 3; // 0x3
|
||||||
field public static final int PRIORITY_NORMAL = 0; // 0x0
|
field public static final int PRIORITY_NORMAL = 0; // 0x0
|
||||||
field public static final int PRIORITY_URGENT = 1; // 0x1
|
field public static final int PRIORITY_URGENT = 1; // 0x1
|
||||||
|
|||||||
@@ -13095,6 +13095,7 @@ package android.telephony.ims {
|
|||||||
field public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2; // 0x2
|
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_PAYPHONE = 4; // 0x4
|
||||||
field public static final int OIR_PRESENTATION_RESTRICTED = 1; // 0x1
|
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 OIR_PRESENTATION_UNKNOWN = 3; // 0x3
|
||||||
field public static final int PRIORITY_NORMAL = 0; // 0x0
|
field public static final int PRIORITY_NORMAL = 0; // 0x0
|
||||||
field public static final int PRIORITY_URGENT = 1; // 0x1
|
field public static final int PRIORITY_URGENT = 1; // 0x1
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ public class BlockedNumberContract {
|
|||||||
prefix = { "STATUS_" },
|
prefix = { "STATUS_" },
|
||||||
value = {STATUS_NOT_BLOCKED, STATUS_BLOCKED_IN_LIST, STATUS_BLOCKED_RESTRICTED,
|
value = {STATUS_NOT_BLOCKED, STATUS_BLOCKED_IN_LIST, STATUS_BLOCKED_RESTRICTED,
|
||||||
STATUS_BLOCKED_UNKNOWN_NUMBER, STATUS_BLOCKED_PAYPHONE,
|
STATUS_BLOCKED_UNKNOWN_NUMBER, STATUS_BLOCKED_PAYPHONE,
|
||||||
STATUS_BLOCKED_NOT_IN_CONTACTS})
|
STATUS_BLOCKED_NOT_IN_CONTACTS, STATUS_BLOCKED_UNAVAILABLE})
|
||||||
public @interface BlockStatus {}
|
public @interface BlockStatus {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -276,6 +276,13 @@ public class BlockedNumberContract {
|
|||||||
*/
|
*/
|
||||||
public static final int STATUS_BLOCKED_NOT_IN_CONTACTS = 5;
|
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.
|
* Integer reason indicating whether a call was blocked, and if so why.
|
||||||
* @hide
|
* @hide
|
||||||
@@ -441,6 +448,9 @@ public class BlockedNumberContract {
|
|||||||
/* Preference key for whether should show an emergency call notification. */
|
/* Preference key for whether should show an emergency call notification. */
|
||||||
public static final String ENHANCED_SETTING_KEY_SHOW_EMERGENCY_CALL_NOTIFICATION =
|
public static final String ENHANCED_SETTING_KEY_SHOW_EMERGENCY_CALL_NOTIFICATION =
|
||||||
"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.
|
* 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_PRIVATE}
|
||||||
* {@link #ENHANCED_SETTING_KEY_BLOCK_PAYPHONE}
|
* {@link #ENHANCED_SETTING_KEY_BLOCK_PAYPHONE}
|
||||||
* {@link #ENHANCED_SETTING_KEY_BLOCK_UNKNOWN}
|
* {@link #ENHANCED_SETTING_KEY_BLOCK_UNKNOWN}
|
||||||
|
* {@link #ENHANCED_SETTING_KEY_BLOCK_UNAVAILABLE}
|
||||||
* {@link #ENHANCED_SETTING_KEY_EMERGENCY_CALL_NOTIFICATION_SHOWING}
|
* {@link #ENHANCED_SETTING_KEY_EMERGENCY_CALL_NOTIFICATION_SHOWING}
|
||||||
* @return {@code true} if the setting is enabled. {@code false} otherwise.
|
* @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_PRIVATE}
|
||||||
* {@link #ENHANCED_SETTING_KEY_BLOCK_PAYPHONE}
|
* {@link #ENHANCED_SETTING_KEY_BLOCK_PAYPHONE}
|
||||||
* {@link #ENHANCED_SETTING_KEY_BLOCK_UNKNOWN}
|
* {@link #ENHANCED_SETTING_KEY_BLOCK_UNKNOWN}
|
||||||
|
* {@link #ENHANCED_SETTING_KEY_BLOCK_UNAVAILABLE}
|
||||||
* {@link #ENHANCED_SETTING_KEY_EMERGENCY_CALL_NOTIFICATION_SHOWING}
|
* {@link #ENHANCED_SETTING_KEY_EMERGENCY_CALL_NOTIFICATION_SHOWING}
|
||||||
* @param value the enabled statue of the setting to set.
|
* @param value the enabled statue of the setting to set.
|
||||||
*/
|
*/
|
||||||
@@ -603,6 +615,8 @@ public class BlockedNumberContract {
|
|||||||
return "blocked - payphone";
|
return "blocked - payphone";
|
||||||
case STATUS_BLOCKED_NOT_IN_CONTACTS:
|
case STATUS_BLOCKED_NOT_IN_CONTACTS:
|
||||||
return "blocked - not in contacts";
|
return "blocked - not in contacts";
|
||||||
|
case STATUS_BLOCKED_UNAVAILABLE:
|
||||||
|
return "blocked - unavailable";
|
||||||
}
|
}
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -910,6 +910,7 @@ public class CallLog {
|
|||||||
* <li>{@link #PRESENTATION_RESTRICTED}</li>
|
* <li>{@link #PRESENTATION_RESTRICTED}</li>
|
||||||
* <li>{@link #PRESENTATION_UNKNOWN}</li>
|
* <li>{@link #PRESENTATION_UNKNOWN}</li>
|
||||||
* <li>{@link #PRESENTATION_PAYPHONE}</li>
|
* <li>{@link #PRESENTATION_PAYPHONE}</li>
|
||||||
|
* <li>{@link #PRESENTATION_UNAVAILABLE}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
@@ -925,6 +926,8 @@ public class CallLog {
|
|||||||
public static final int PRESENTATION_UNKNOWN = 3;
|
public static final int PRESENTATION_UNKNOWN = 3;
|
||||||
/** Number is a pay phone. */
|
/** Number is a pay phone. */
|
||||||
public static final int PRESENTATION_PAYPHONE = 4;
|
public static final int PRESENTATION_PAYPHONE = 4;
|
||||||
|
/** Number is unavailable. */
|
||||||
|
public static final int PRESENTATION_UNAVAILABLE = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ISO 3166-1 two letters country code of the country where the
|
* The ISO 3166-1 two letters country code of the country where the
|
||||||
@@ -2028,6 +2031,10 @@ public class CallLog {
|
|||||||
return presentation;
|
return presentation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (presentation == TelecomManager.PRESENTATION_UNAVAILABLE) {
|
||||||
|
return PRESENTATION_UNAVAILABLE;
|
||||||
|
}
|
||||||
|
|
||||||
if (TextUtils.isEmpty(number)
|
if (TextUtils.isEmpty(number)
|
||||||
|| presentation == TelecomManager.PRESENTATION_UNKNOWN) {
|
|| presentation == TelecomManager.PRESENTATION_UNKNOWN) {
|
||||||
return PRESENTATION_UNKNOWN;
|
return PRESENTATION_UNKNOWN;
|
||||||
|
|||||||
@@ -632,8 +632,9 @@ public abstract class CallScreeningService extends Service {
|
|||||||
* post-dial digits are passed.
|
* post-dial digits are passed.
|
||||||
* <p>
|
* <p>
|
||||||
* Calls with a {@link Call.Details#getHandlePresentation()} of
|
* Calls with a {@link Call.Details#getHandlePresentation()} of
|
||||||
* {@link TelecomManager#PRESENTATION_RESTRICTED}, {@link TelecomManager#PRESENTATION_UNKNOWN}
|
* {@link TelecomManager#PRESENTATION_RESTRICTED}, {@link TelecomManager#PRESENTATION_UNKNOWN},
|
||||||
* or {@link TelecomManager#PRESENTATION_PAYPHONE} presentation are not provided to the
|
* {@link TelecomManager#PRESENTATION_UNAVAILABLE} or
|
||||||
|
* {@link TelecomManager#PRESENTATION_PAYPHONE} presentation are not provided to the
|
||||||
* {@link CallScreeningService}.
|
* {@link CallScreeningService}.
|
||||||
*
|
*
|
||||||
* @param callDetails Information about a new call, see {@link Call.Details}.
|
* @param callDetails Information about a new call, see {@link Call.Details}.
|
||||||
|
|||||||
@@ -987,6 +987,11 @@ public class TelecomManager {
|
|||||||
*/
|
*/
|
||||||
public static final int PRESENTATION_PAYPHONE = 4;
|
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"
|
* Values for the adb property "persist.radio.videocall.audio.output"
|
||||||
@@ -1003,7 +1008,7 @@ public class TelecomManager {
|
|||||||
@IntDef(
|
@IntDef(
|
||||||
prefix = { "PRESENTATION_" },
|
prefix = { "PRESENTATION_" },
|
||||||
value = {PRESENTATION_ALLOWED, PRESENTATION_RESTRICTED, PRESENTATION_UNKNOWN,
|
value = {PRESENTATION_ALLOWED, PRESENTATION_RESTRICTED, PRESENTATION_UNKNOWN,
|
||||||
PRESENTATION_PAYPHONE})
|
PRESENTATION_PAYPHONE, PRESENTATION_UNAVAILABLE})
|
||||||
public @interface Presentation {}
|
public @interface Presentation {}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2248,6 +2248,7 @@ public class CarrierConfigManager {
|
|||||||
* android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_PRIVATE
|
* 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_PAYPHONE
|
||||||
* android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNKNOWN
|
* android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNKNOWN
|
||||||
|
* android.provider.BlockedNumberContract.SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNAVAILABLE
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* 1. For Single SIM(SS) device, it can be customized in both carrier_config_mccmnc.xml
|
* 1. For Single SIM(SS) device, it can be customized in both carrier_config_mccmnc.xml
|
||||||
|
|||||||
@@ -317,6 +317,10 @@ public final class ImsCallProfile implements Parcelable {
|
|||||||
* Payphone presentation for Originating Identity.
|
* Payphone presentation for Originating Identity.
|
||||||
*/
|
*/
|
||||||
public static final int OIR_PRESENTATION_PAYPHONE = 4;
|
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
|
//Values for EXTRA_DIALSTRING
|
||||||
/**
|
/**
|
||||||
@@ -989,6 +993,8 @@ public final class ImsCallProfile implements Parcelable {
|
|||||||
return ImsCallProfile.OIR_PRESENTATION_PAYPHONE;
|
return ImsCallProfile.OIR_PRESENTATION_PAYPHONE;
|
||||||
case PhoneConstants.PRESENTATION_UNKNOWN:
|
case PhoneConstants.PRESENTATION_UNKNOWN:
|
||||||
return ImsCallProfile.OIR_PRESENTATION_UNKNOWN;
|
return ImsCallProfile.OIR_PRESENTATION_UNKNOWN;
|
||||||
|
case PhoneConstants.PRESENTATION_UNAVAILABLE:
|
||||||
|
return ImsCallProfile.OIR_PRESENTATION_UNAVAILABLE;
|
||||||
default:
|
default:
|
||||||
return ImsCallProfile.OIR_DEFAULT;
|
return ImsCallProfile.OIR_DEFAULT;
|
||||||
}
|
}
|
||||||
@@ -1017,6 +1023,8 @@ public final class ImsCallProfile implements Parcelable {
|
|||||||
return PhoneConstants.PRESENTATION_ALLOWED;
|
return PhoneConstants.PRESENTATION_ALLOWED;
|
||||||
case ImsCallProfile.OIR_PRESENTATION_PAYPHONE:
|
case ImsCallProfile.OIR_PRESENTATION_PAYPHONE:
|
||||||
return PhoneConstants.PRESENTATION_PAYPHONE;
|
return PhoneConstants.PRESENTATION_PAYPHONE;
|
||||||
|
case ImsCallProfile.OIR_PRESENTATION_UNAVAILABLE:
|
||||||
|
return PhoneConstants.PRESENTATION_UNAVAILABLE;
|
||||||
case ImsCallProfile.OIR_PRESENTATION_UNKNOWN:
|
case ImsCallProfile.OIR_PRESENTATION_UNKNOWN:
|
||||||
return PhoneConstants.PRESENTATION_UNKNOWN;
|
return PhoneConstants.PRESENTATION_UNKNOWN;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ public class PhoneConstants {
|
|||||||
public static final int PRESENTATION_UNKNOWN = 3; // no specified or unknown by network
|
public static final int PRESENTATION_UNKNOWN = 3; // no specified or unknown by network
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
public static final int PRESENTATION_PAYPHONE = 4; // show pay phone info
|
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 PHONE_NAME_KEY = "phoneName";
|
||||||
public static final String DATA_NETWORK_TYPE_KEY = "networkType";
|
public static final String DATA_NETWORK_TYPE_KEY = "networkType";
|
||||||
|
|||||||
Reference in New Issue
Block a user