Remove no-reply timer of CFNRy for certain carriers
Some carriers do not support no-reply timer of CFNRy.
So, if it is configured by carrier config, request CFNRy without
no-reply timer when a user sets CFNRy in settings UI
Test: manual - Check that CFNRy is requested without no-reply timer
if it configured.
Bug: 110121791
Change-Id: I8187d5cbe3202be57e84eec862210ddeef8781d8
diff --git a/src/com/android/phone/CallForwardEditPreference.java b/src/com/android/phone/CallForwardEditPreference.java
index bfeee7a..f926de2 100644
--- a/src/com/android/phone/CallForwardEditPreference.java
+++ b/src/com/android/phone/CallForwardEditPreference.java
@@ -100,7 +100,15 @@
int action = (isToggled() || (mButtonClicked == DialogInterface.BUTTON_POSITIVE)) ?
CommandsInterface.CF_ACTION_REGISTRATION :
CommandsInterface.CF_ACTION_DISABLE;
- int time = (reason != CommandsInterface.CF_REASON_NO_REPLY) ? 0 : 20;
+ int time = 0;
+ if (reason == CommandsInterface.CF_REASON_NO_REPLY) {
+ PersistableBundle carrierConfig = PhoneGlobals.getInstance()
+ .getCarrierConfigForSubId(mPhone.getSubId());
+ if (carrierConfig.getBoolean(
+ CarrierConfigManager.KEY_SUPPORT_NO_REPLY_TIMER_FOR_CFNRY_BOOL, true)) {
+ time = 20;
+ }
+ }
final String number = getPhoneNumber();
Log.d(LOG_TAG, "callForwardInfo=" + callForwardInfo);