Add CarrierConfig for Invalid Call Forwarding number

In some situations, an invalid Call Forwarding number
from a carrier's network can cause the modem to send back
invalid characters instead of a number.

This change adds a carrier config option to replace the invalid
text with "Voicemail" in the Call Forwarding settings when
it is received from the network.

Bug: 67267077
Test: Manual
Change-Id: I26f9b80487f92340d1df2cf22bb5a616edcbdebf
This commit is contained in:
Brad Ebinger
2017-10-12 13:58:55 -07:00
parent 44e1d4eb3c
commit 1108564313

View File

@@ -762,6 +762,18 @@ public class CarrierConfigManager {
*/
public static final String KEY_CDMA_DTMF_TONE_DELAY_INT = "cdma_dtmf_tone_delay_int";
/**
* Some carriers will send call forwarding responses for voicemail in a format that is not 3gpp
* compliant, which causes issues during parsing. This causes the
* {@link com.android.internal.telephony.CallForwardInfo#number} to contain non-numerical
* characters instead of a number.
*
* If true, we will detect the non-numerical characters and replace them with "Voicemail".
* @hide
*/
public static final String KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL =
"call_forwarding_map_non_number_to_voicemail_bool";
/**
* Determines whether conference calls are supported by a carrier. When {@code true},
* conference calling is supported, {@code false otherwise}.
@@ -1697,6 +1709,7 @@ public class CarrierConfigManager {
sDefaults.putInt(KEY_GSM_DTMF_TONE_DELAY_INT, 0);
sDefaults.putInt(KEY_IMS_DTMF_TONE_DELAY_INT, 0);
sDefaults.putInt(KEY_CDMA_DTMF_TONE_DELAY_INT, 100);
sDefaults.putBoolean(KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL, false);
sDefaults.putInt(KEY_CDMA_3WAYCALL_FLASH_DELAY_INT , 0);
sDefaults.putBoolean(KEY_SUPPORT_CONFERENCE_CALL_BOOL, true);
sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_CALL_BOOL, true);