Adds custom call forwarding block while roaming carrier config key
Adds support for supplying custom call forwarding prefixes in the carrier config. When a prefix supplied in the carrier config is matched to the number being dialed, we do not complete the call and instead show an error message on the dialer UI. Test: Manual Bug: 30458052 Merged-In: I3149a565b0fd631d69ab0c0f27be509237b80177 Change-Id: I3149a565b0fd631d69ab0c0f27be509237b80177
This commit is contained in:
@@ -1056,6 +1056,19 @@ public class CarrierConfigManager {
|
||||
public static final String KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL =
|
||||
"support_3gpp_call_forwarding_while_roaming_bool";
|
||||
|
||||
/**
|
||||
* An array containing custom call forwarding number prefixes that will be blocked while the
|
||||
* device is reporting that it is roaming. By default, there are no custom call
|
||||
* forwarding prefixes and none of these numbers will be filtered. If one or more entries are
|
||||
* present, the system will not complete the call and display an error message.
|
||||
*
|
||||
* To display a message to the user when call forwarding fails for 3gpp MMI codes while roaming,
|
||||
* use the {@link #KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL} option instead.
|
||||
* @hide
|
||||
*/
|
||||
public static final String KEY_CALL_FORWARDING_BLOCKS_WHILE_ROAMING_STRING_ARRAY =
|
||||
"call_forwarding_blocks_while_roaming_string_array";
|
||||
|
||||
/** The default value for every variable. */
|
||||
private final static PersistableBundle sDefaults;
|
||||
|
||||
@@ -1239,6 +1252,7 @@ public class CarrierConfigManager {
|
||||
sDefaults.putInt(KEY_PREF_NETWORK_NOTIFICATION_DELAY_INT, -1);
|
||||
sDefaults.putBoolean(KEY_EDITABLE_TETHER_APN_BOOL, false);
|
||||
sDefaults.putBoolean(KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL, true);
|
||||
sDefaults.putStringArray(KEY_CALL_FORWARDING_BLOCKS_WHILE_ROAMING_STRING_ARRAY, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -233,6 +233,13 @@ public class DisconnectCause {
|
||||
*/
|
||||
public static final int DIALED_ON_WRONG_SLOT = 56;
|
||||
|
||||
/**
|
||||
* The call being placed was detected as a call forwarding number and was being dialed while
|
||||
* roaming on a carrier that does not allow this.
|
||||
* @hide
|
||||
*/
|
||||
public static final int DIALED_CALL_FORWARDING_WHILE_ROAMING = 57;
|
||||
|
||||
//*********************************************************************************************
|
||||
// When adding a disconnect type:
|
||||
// 1) Please assign the new type the next id value below.
|
||||
@@ -241,14 +248,14 @@ public class DisconnectCause {
|
||||
// 4) Update toString() with the newly added disconnect type.
|
||||
// 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause.
|
||||
//
|
||||
// NextId: 57
|
||||
// NextId: 58
|
||||
//*********************************************************************************************
|
||||
|
||||
/** Smallest valid value for call disconnect codes. */
|
||||
public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED;
|
||||
|
||||
/** Largest valid value for call disconnect codes. */
|
||||
public static final int MAXIMUM_VALID_VALUE = DIALED_ON_WRONG_SLOT;
|
||||
public static final int MAXIMUM_VALID_VALUE = DIALED_CALL_FORWARDING_WHILE_ROAMING;
|
||||
|
||||
/** Private constructor to avoid class instantiation. */
|
||||
private DisconnectCause() {
|
||||
@@ -370,6 +377,8 @@ public class DisconnectCause {
|
||||
return "DATA_LIMIT_REACHED";
|
||||
case DIALED_ON_WRONG_SLOT:
|
||||
return "DIALED_ON_WRONG_SLOT";
|
||||
case DIALED_CALL_FORWARDING_WHILE_ROAMING:
|
||||
return "DIALED_CALL_FORWARDING_WHILE_ROAMING";
|
||||
default:
|
||||
return "INVALID: " + cause;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user