summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapi/system-current.txt10
-rw-r--r--non-updatable-api/system-current.txt10
-rw-r--r--telephony/api/system-current.txt10
-rw-r--r--telephony/java/android/telephony/CallForwardingInfo.java34
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java47
5 files changed, 56 insertions, 55 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index 8b223a8b1dd3..484e1dd225f1 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -10551,16 +10551,12 @@ package android.telephony {
method public int getTimeoutSeconds();
method public boolean isEnabled();
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallForwardingInfo> CREATOR;
- field public static final int ERROR_FDN_CHECK_FAILURE = 2; // 0x2
- field public static final int ERROR_NOT_SUPPORTED = 3; // 0x3
- field public static final int ERROR_UNKNOWN = 1; // 0x1
field public static final int REASON_ALL = 4; // 0x4
field public static final int REASON_ALL_CONDITIONAL = 5; // 0x5
field public static final int REASON_BUSY = 1; // 0x1
field public static final int REASON_NOT_REACHABLE = 3; // 0x3
field public static final int REASON_NO_REPLY = 2; // 0x2
field public static final int REASON_UNCONDITIONAL = 0; // 0x0
- field public static final int SUCCESS = 0; // 0x0
}
public final class CallQuality implements android.os.Parcelable {
@@ -11285,7 +11281,7 @@ package android.telephony {
method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setAllowedNetworkTypes(long);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallForwarding(@NonNull android.telephony.CallForwardingInfo, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
- method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallWaitingStatus(boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallWaitingEnabled(boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCarrierDataEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setCarrierRestrictionRules(@NonNull android.telephony.CarrierRestrictionRules);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int);
@@ -11387,6 +11383,10 @@ package android.telephony {
public static interface TelephonyManager.CallForwardingInfoCallback {
method public void onCallForwardingInfoAvailable(@NonNull android.telephony.CallForwardingInfo);
method public void onError(int);
+ field public static final int RESULT_ERROR_FDN_CHECK_FAILURE = 2; // 0x2
+ field public static final int RESULT_ERROR_NOT_SUPPORTED = 3; // 0x3
+ field public static final int RESULT_ERROR_UNKNOWN = 1; // 0x1
+ field public static final int RESULT_SUCCESS = 0; // 0x0
}
public final class UiccAccessRule implements android.os.Parcelable {
diff --git a/non-updatable-api/system-current.txt b/non-updatable-api/system-current.txt
index 60636a6fcfdf..e1475c6bfcdd 100644
--- a/non-updatable-api/system-current.txt
+++ b/non-updatable-api/system-current.txt
@@ -9433,16 +9433,12 @@ package android.telephony {
method public int getTimeoutSeconds();
method public boolean isEnabled();
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallForwardingInfo> CREATOR;
- field public static final int ERROR_FDN_CHECK_FAILURE = 2; // 0x2
- field public static final int ERROR_NOT_SUPPORTED = 3; // 0x3
- field public static final int ERROR_UNKNOWN = 1; // 0x1
field public static final int REASON_ALL = 4; // 0x4
field public static final int REASON_ALL_CONDITIONAL = 5; // 0x5
field public static final int REASON_BUSY = 1; // 0x1
field public static final int REASON_NOT_REACHABLE = 3; // 0x3
field public static final int REASON_NO_REPLY = 2; // 0x2
field public static final int REASON_UNCONDITIONAL = 0; // 0x0
- field public static final int SUCCESS = 0; // 0x0
}
public final class CallQuality implements android.os.Parcelable {
@@ -10167,7 +10163,7 @@ package android.telephony {
method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setAllowedNetworkTypes(long);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallForwarding(@NonNull android.telephony.CallForwardingInfo, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
- method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallWaitingStatus(boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallWaitingEnabled(boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCarrierDataEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setCarrierRestrictionRules(@NonNull android.telephony.CarrierRestrictionRules);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int);
@@ -10269,6 +10265,10 @@ package android.telephony {
public static interface TelephonyManager.CallForwardingInfoCallback {
method public void onCallForwardingInfoAvailable(@NonNull android.telephony.CallForwardingInfo);
method public void onError(int);
+ field public static final int RESULT_ERROR_FDN_CHECK_FAILURE = 2; // 0x2
+ field public static final int RESULT_ERROR_NOT_SUPPORTED = 3; // 0x3
+ field public static final int RESULT_ERROR_UNKNOWN = 1; // 0x1
+ field public static final int RESULT_SUCCESS = 0; // 0x0
}
public final class UiccAccessRule implements android.os.Parcelable {
diff --git a/telephony/api/system-current.txt b/telephony/api/system-current.txt
index 5bd77dc08e7c..9505b8f78b81 100644
--- a/telephony/api/system-current.txt
+++ b/telephony/api/system-current.txt
@@ -35,16 +35,12 @@ package android.telephony {
method public int getTimeoutSeconds();
method public boolean isEnabled();
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallForwardingInfo> CREATOR;
- field public static final int ERROR_FDN_CHECK_FAILURE = 2; // 0x2
- field public static final int ERROR_NOT_SUPPORTED = 3; // 0x3
- field public static final int ERROR_UNKNOWN = 1; // 0x1
field public static final int REASON_ALL = 4; // 0x4
field public static final int REASON_ALL_CONDITIONAL = 5; // 0x5
field public static final int REASON_BUSY = 1; // 0x1
field public static final int REASON_NOT_REACHABLE = 3; // 0x3
field public static final int REASON_NO_REPLY = 2; // 0x2
field public static final int REASON_UNCONDITIONAL = 0; // 0x0
- field public static final int SUCCESS = 0; // 0x0
}
public final class CallQuality implements android.os.Parcelable {
@@ -742,7 +738,7 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setAllowedNetworkTypes(long);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCarrierDataEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallForwarding(@NonNull android.telephony.CallForwardingInfo, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
- method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallWaitingStatus(boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallWaitingEnabled(boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setCarrierRestrictionRules(@NonNull android.telephony.CarrierRestrictionRules);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int);
method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(int, boolean);
@@ -843,6 +839,10 @@ package android.telephony {
public static interface TelephonyManager.CallForwardingInfoCallback {
method public void onCallForwardingInfoAvailable(@NonNull android.telephony.CallForwardingInfo);
method public void onError(int);
+ field public static final int RESULT_ERROR_FDN_CHECK_FAILURE = 2; // 0x2
+ field public static final int RESULT_ERROR_NOT_SUPPORTED = 3; // 0x3
+ field public static final int RESULT_ERROR_UNKNOWN = 1; // 0x1
+ field public static final int RESULT_SUCCESS = 0; // 0x0
}
public final class UiccAccessRule implements android.os.Parcelable {
diff --git a/telephony/java/android/telephony/CallForwardingInfo.java b/telephony/java/android/telephony/CallForwardingInfo.java
index 2106f7fc4bb8..6ae6d002d990 100644
--- a/telephony/java/android/telephony/CallForwardingInfo.java
+++ b/telephony/java/android/telephony/CallForwardingInfo.java
@@ -39,27 +39,6 @@ public final class CallForwardingInfo implements Parcelable {
private static final String TAG = "CallForwardingInfo";
/**
- * Indicates that the operation was successful.
- */
- public static final int SUCCESS = 0;
-
- /**
- * Indicates that setting or retrieving the call forwarding info failed with an unknown error.
- */
- public static final int ERROR_UNKNOWN = 1;
-
- /**
- * Indicates that call forwarding is not enabled because the recipient is not on a
- * Fixed Dialing Number (FDN) list.
- */
- public static final int ERROR_FDN_CHECK_FAILURE = 2;
-
- /**
- * Indicates that call forwarding is not supported on the network at this time.
- */
- public static final int ERROR_NOT_SUPPORTED = 3;
-
- /**
* Indicates that call forwarding reason is "unconditional".
* Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
* and conditions +CCFC
@@ -104,19 +83,6 @@ public final class CallForwardingInfo implements Parcelable {
public static final int REASON_ALL_CONDITIONAL = 5;
/**
- * Call forwarding errors
- * @hide
- */
- @IntDef(prefix = { "ERROR_" }, value = {
- ERROR_UNKNOWN,
- ERROR_NOT_SUPPORTED,
- ERROR_FDN_CHECK_FAILURE
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface CallForwardingError{
- }
-
- /**
* Call forwarding reason types
* @hide
*/
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 117a788d32bc..072527beeff9 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -12754,6 +12754,40 @@ public class TelephonyManager {
@SystemApi
public interface CallForwardingInfoCallback {
/**
+ * Indicates that the operation was successful.
+ */
+ int RESULT_SUCCESS = 0;
+
+ /**
+ * Indicates that setting or retrieving the call forwarding info failed with an unknown
+ * error.
+ */
+ int RESULT_ERROR_UNKNOWN = 1;
+
+ /**
+ * Indicates that call forwarding is not enabled because the recipient is not on a
+ * Fixed Dialing Number (FDN) list.
+ */
+ int RESULT_ERROR_FDN_CHECK_FAILURE = 2;
+
+ /**
+ * Indicates that call forwarding is not supported on the network at this time.
+ */
+ int RESULT_ERROR_NOT_SUPPORTED = 3;
+
+ /**
+ * Call forwarding errors
+ * @hide
+ */
+ @IntDef(prefix = { "RESULT_ERROR_" }, value = {
+ RESULT_ERROR_UNKNOWN,
+ RESULT_ERROR_NOT_SUPPORTED,
+ RESULT_ERROR_FDN_CHECK_FAILURE
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ @interface CallForwardingError{
+ }
+ /**
* Called when the call forwarding info is successfully retrieved from the network.
* @param info information about how calls are forwarded
*/
@@ -12763,7 +12797,7 @@ public class TelephonyManager {
* Called when there was an error retrieving the call forwarding information.
* @param error
*/
- void onError(@CallForwardingInfo.CallForwardingError int error);
+ void onError(@CallForwardingError int error);
}
/**
@@ -12836,9 +12870,9 @@ public class TelephonyManager {
* @param executor The executor on which the listener will be called. Must be non-null if
* {@code listener} is non-null.
* @param resultListener Asynchronous listener that'll be called when the operation completes.
- * Called with {@link CallForwardingInfo#SUCCESS} if the operation
- * succeeded and an error code from {@link CallForwardingInfo}
- * if it failed.
+ * Called with {@link CallForwardingInfoCallback#RESULT_SUCCESS} if the
+ * operation succeeded and an error code from
+ * {@link CallForwardingInfoCallback} it failed.
*
* @throws IllegalArgumentException if any of the following are true for the parameter
* callForwardingInfo:
@@ -12864,7 +12898,8 @@ public class TelephonyManager {
@SystemApi
public void setCallForwarding(@NonNull CallForwardingInfo callForwardingInfo,
@Nullable @CallbackExecutor Executor executor,
- @Nullable @CallForwardingInfo.CallForwardingError Consumer<Integer> resultListener) {
+ @Nullable @CallForwardingInfoCallback.CallForwardingError
+ Consumer<Integer> resultListener) {
if (callForwardingInfo == null) {
throw new IllegalArgumentException("callForwardingInfo is null");
}
@@ -13020,7 +13055,7 @@ public class TelephonyManager {
*/
@SystemApi
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
- public void setCallWaitingStatus(boolean enabled, @Nullable Executor executor,
+ public void setCallWaitingEnabled(boolean enabled, @Nullable Executor executor,
@Nullable Consumer<Integer> resultListener) {
if (resultListener != null) {
Objects.requireNonNull(executor);