From 79eca48b7b9cb5e690b7f2da28e9a6e0d9c8dd6a Mon Sep 17 00:00:00 2001 From: SongFerngWang Date: Tue, 11 Jan 2022 15:44:33 +0800 Subject: [PATCH] Call waiting add the error reponse for FDN_CHECK_FAILURE The getCallWaitingStatus and setCallWaitingStatus system api did not have FDN_CHECK_FAILURE. Therefore, the call waiting can't get the precise error response while FDN is enabled. Adding the CALL_WAITING_STATUS_FDN_CHECK_FAILURE for this case. Bug: 189402480 Test: pass cts' TelephonyManagerTest#testGetCallWaitingStatus pass cts' TelephonyManagerTest#testSetCallWaitingStatus Change-Id: I2ed3b71c050c3632c6f4937a764394b1d07f51cd --- core/api/system-current.txt | 1 + .../java/android/telephony/TelephonyManager.java | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 313fc75ed668e..30d22166eed0e 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -12976,6 +12976,7 @@ package android.telephony { field public static final int ALLOWED_NETWORK_TYPES_REASON_USER = 0; // 0x0 field public static final int CALL_WAITING_STATUS_DISABLED = 2; // 0x2 field public static final int CALL_WAITING_STATUS_ENABLED = 1; // 0x1 + field public static final int CALL_WAITING_STATUS_FDN_CHECK_FAILURE = 5; // 0x5 field public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4; // 0x4 field public static final int CALL_WAITING_STATUS_UNKNOWN_ERROR = 3; // 0x3 field public static final String CAPABILITY_NR_DUAL_CONNECTIVITY_CONFIGURATION_AVAILABLE = "CAPABILITY_NR_DUAL_CONNECTIVITY_CONFIGURATION_AVAILABLE"; diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 0c56de82eafc0..536517c12313e 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -15137,6 +15137,15 @@ public class TelephonyManager { @SystemApi public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4; + /** + * Indicates the call waiting status could not be set or queried because the Fixed Dialing + * Numbers (FDN) feature is enabled. + * + * @hide + */ + @SystemApi + public static final int CALL_WAITING_STATUS_FDN_CHECK_FAILURE = 5; + /** * @hide */ @@ -15145,6 +15154,7 @@ public class TelephonyManager { CALL_WAITING_STATUS_DISABLED, CALL_WAITING_STATUS_UNKNOWN_ERROR, CALL_WAITING_STATUS_NOT_SUPPORTED, + CALL_WAITING_STATUS_FDN_CHECK_FAILURE, }) @Retention(RetentionPolicy.SOURCE) public @interface CallWaitingStatus { @@ -15165,6 +15175,7 @@ public class TelephonyManager { *
  • {@link #CALL_WAITING_STATUS_DISABLED}}
  • *
  • {@link #CALL_WAITING_STATUS_UNKNOWN_ERROR}}
  • *
  • {@link #CALL_WAITING_STATUS_NOT_SUPPORTED}}
  • + *
  • {@link #CALL_WAITING_STATUS_FDN_CHECK_FAILURE}}
  • * * @hide */ @@ -15214,7 +15225,8 @@ public class TelephonyManager { * {@link #CALL_WAITING_STATUS_ENABLED} or * {@link #CALL_WAITING_STATUS_DISABLED} if the operation succeeded and * {@link #CALL_WAITING_STATUS_NOT_SUPPORTED} or - * {@link #CALL_WAITING_STATUS_UNKNOWN_ERROR} if it failed. + * {@link #CALL_WAITING_STATUS_UNKNOWN_ERROR} or + * {@link #CALL_WAITING_STATUS_FDN_CHECK_FAILURE} if it failed. * @hide */ @SystemApi