Rename call forwarding related constants
Renaming and moving based on API council feedback
Bug: 169153246
Test: atest TelephonyManagerTest
Change-Id: I2d597d8a516a7b4f004ab8788392c4fc6aa5e4ed
Merged-In: I2d597d8a516a7b4f004ab8788392c4fc6aa5e4ed
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index c131c0e..8344273 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -875,14 +875,17 @@
if (ar.exception != null) {
loge("EVENT_GET_CALL_FORWARDING_DONE: Exception: " + ar.exception);
}
- int errorCode = CallForwardingInfo.ERROR_UNKNOWN;
+ int errorCode = TelephonyManager
+ .CallForwardingInfoCallback.RESULT_ERROR_UNKNOWN;
if (ar.exception instanceof CommandException) {
CommandException.Error error =
((CommandException) (ar.exception)).getCommandError();
if (error == CommandException.Error.FDN_CHECK_FAILURE) {
- errorCode = CallForwardingInfo.ERROR_FDN_CHECK_FAILURE;
+ errorCode = TelephonyManager
+ .CallForwardingInfoCallback.RESULT_ERROR_FDN_CHECK_FAILURE;
} else if (error == CommandException.Error.REQUEST_NOT_SUPPORTED) {
- errorCode = CallForwardingInfo.ERROR_NOT_SUPPORTED;
+ errorCode = TelephonyManager
+ .CallForwardingInfoCallback.RESULT_ERROR_NOT_SUPPORTED;
}
}
callback.onError(errorCode);
@@ -915,19 +918,22 @@
request.argument).second;
if (ar.exception != null) {
loge("setCallForwarding exception: " + ar.exception);
- int errorCode = CallForwardingInfo.ERROR_UNKNOWN;
+ int errorCode = TelephonyManager.CallForwardingInfoCallback
+ .RESULT_ERROR_UNKNOWN;
if (ar.exception instanceof CommandException) {
CommandException.Error error =
((CommandException) (ar.exception)).getCommandError();
if (error == CommandException.Error.FDN_CHECK_FAILURE) {
- errorCode = CallForwardingInfo.ERROR_FDN_CHECK_FAILURE;
+ errorCode = TelephonyManager.CallForwardingInfoCallback
+ .RESULT_ERROR_FDN_CHECK_FAILURE;
} else if (error == CommandException.Error.REQUEST_NOT_SUPPORTED) {
- errorCode = CallForwardingInfo.ERROR_NOT_SUPPORTED;
+ errorCode = TelephonyManager.CallForwardingInfoCallback
+ .RESULT_ERROR_NOT_SUPPORTED;
}
}
callback.accept(errorCode);
} else {
- callback.accept(CallForwardingInfo.SUCCESS);
+ callback.accept(TelephonyManager.CallForwardingInfoCallback.RESULT_SUCCESS);
}
break;
}
@@ -5369,7 +5375,8 @@
Phone phone = getPhone(subId);
if (phone == null) {
try {
- callback.onError(CallForwardingInfo.ERROR_UNKNOWN);
+ callback.onError(
+ TelephonyManager.CallForwardingInfoCallback.RESULT_ERROR_UNKNOWN);
} catch (RemoteException e) {
// ignore
}
@@ -5420,7 +5427,8 @@
Phone phone = getPhone(subId);
if (phone == null) {
try {
- callback.accept(CallForwardingInfo.ERROR_UNKNOWN);
+ callback.accept(
+ TelephonyManager.CallForwardingInfoCallback.RESULT_ERROR_UNKNOWN);
} catch (RemoteException e) {
// ignore
}