[Settings] Support default APN (roam) protocol
1. Add "apn.settings_default_apn_protocol_string" config which controls default value of APN protocol field when updating or creating an APN. 2. Add "apn.settings_default_apn_roaming_protocol_string" config which controls default value of APN roaming protocol field when updating or creating an APN. 3. Add PROTOCOL_IPV4, PROTOCOL_IPV6 and PROTOCOL_IPV4V6 for options available Bug: 142440775 Test: manual Change-Id: I2b13d281adbade4ed0b373d62cadd9252a147abb
This commit is contained in:
@@ -46130,6 +46130,15 @@ package android.telephony {
|
||||
field public static final String KEY_WORLD_PHONE_BOOL = "world_phone_bool";
|
||||
}
|
||||
|
||||
public static final class CarrierConfigManager.Apn {
|
||||
field public static final String KEY_PREFIX = "apn.";
|
||||
field public static final String KEY_SETTINGS_DEFAULT_PROTOCOL_STRING = "apn.settings_default_protocol_string";
|
||||
field public static final String KEY_SETTINGS_DEFAULT_ROAMING_PROTOCOL_STRING = "apn.settings_default_roaming_protocol_string";
|
||||
field public static final String PROTOCOL_IPV4 = "IP";
|
||||
field public static final String PROTOCOL_IPV4V6 = "IPV4V6";
|
||||
field public static final String PROTOCOL_IPV6 = "IPV6";
|
||||
}
|
||||
|
||||
public static final class CarrierConfigManager.Gps {
|
||||
field public static final String KEY_PERSIST_LPP_MODE_BOOL = "gps.persist_lpp_mode_bool";
|
||||
field public static final String KEY_PREFIX = "gps.";
|
||||
|
||||
@@ -1445,6 +1445,50 @@ public class CarrierConfigManager {
|
||||
public static final String KEY_APN_SETTINGS_DEFAULT_APN_TYPES_STRING_ARRAY =
|
||||
"apn_settings_default_apn_types_string_array";
|
||||
|
||||
/**
|
||||
* Configs used for APN setup.
|
||||
*/
|
||||
public static final class Apn {
|
||||
/** Prefix of all Apn.KEY_* constants. */
|
||||
public static final String KEY_PREFIX = "apn.";
|
||||
|
||||
/** IPv4 internet protocol */
|
||||
public static final String PROTOCOL_IPV4 = "IP";
|
||||
/** IPv6 internet protocol */
|
||||
public static final String PROTOCOL_IPV6 = "IPV6";
|
||||
/** IPv4 or IPv6 internet protocol */
|
||||
public static final String PROTOCOL_IPV4V6 = "IPV4V6";
|
||||
|
||||
/**
|
||||
* Default value of APN protocol field if not specified by user when adding/modifying
|
||||
* an APN.
|
||||
*
|
||||
* Available options are: {@link #PROTOCOL_IPV4}, {@link #PROTOCOL_IPV6},
|
||||
* {@link #PROTOCOL_IPV4V6}
|
||||
*/
|
||||
public static final String KEY_SETTINGS_DEFAULT_PROTOCOL_STRING =
|
||||
KEY_PREFIX + "settings_default_protocol_string";
|
||||
|
||||
/**
|
||||
* Default value of APN roaming protocol field if not specified by user when
|
||||
* adding/modifying an APN.
|
||||
*
|
||||
* Available options are: {@link #PROTOCOL_IPV4}, {@link #PROTOCOL_IPV6},
|
||||
* {@link #PROTOCOL_IPV4V6}
|
||||
*/
|
||||
public static final String KEY_SETTINGS_DEFAULT_ROAMING_PROTOCOL_STRING =
|
||||
KEY_PREFIX + "settings_default_roaming_protocol_string";
|
||||
|
||||
private Apn() {}
|
||||
|
||||
private static PersistableBundle getDefaults() {
|
||||
PersistableBundle defaults = new PersistableBundle();
|
||||
defaults.putString(KEY_SETTINGS_DEFAULT_PROTOCOL_STRING, "");
|
||||
defaults.putString(KEY_SETTINGS_DEFAULT_ROAMING_PROTOCOL_STRING, "");
|
||||
return defaults;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Boolean indicating if intent for emergency call state changes should be broadcast
|
||||
* @hide
|
||||
@@ -3903,6 +3947,8 @@ public class CarrierConfigManager {
|
||||
sDefaults.putStringArray(KEY_READ_ONLY_APN_TYPES_STRING_ARRAY, new String[] {"dun"});
|
||||
sDefaults.putStringArray(KEY_READ_ONLY_APN_FIELDS_STRING_ARRAY, null);
|
||||
sDefaults.putStringArray(KEY_APN_SETTINGS_DEFAULT_APN_TYPES_STRING_ARRAY, null);
|
||||
sDefaults.putAll(Apn.getDefaults());
|
||||
|
||||
sDefaults.putBoolean(KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL, false);
|
||||
sDefaults.putBoolean(KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL, false);
|
||||
sDefaults.putStringArray(KEY_CARRIER_DATA_CALL_RETRY_CONFIG_STRINGS, new String[]{
|
||||
|
||||
Reference in New Issue
Block a user