Add CarrierConfig key to customize apn priority

Test: atest on com.android.internal.telephony.dataconnection
Test: Make phone call
Test: Send text message
Test: Hit websites on chrome
Test: Override pririties using carrier config using broadcast
Bug: 152324921
Change-Id: I259071334c135709fc98c989a9b7c8c35f449578
This commit is contained in:
Daniel Bright
2020-03-24 14:53:59 -07:00
parent 2856ed3538
commit dcc3c0aa83

View File

@@ -3662,6 +3662,17 @@ public class CarrierConfigManager {
public static final String KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY = public static final String KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY =
"missed_incoming_call_sms_originator_string_array"; "missed_incoming_call_sms_originator_string_array";
/**
* String array of Apn Type configurations.
* The entries should be of form "APN_TYPE_NAME:priority".
* priority is an integer that is sorted from highest to lowest.
* example: cbs:5
*
* @hide
*/
public static final String KEY_APN_PRIORITY_STRING_ARRAY = "apn_priority_string_array";
/** /**
* The patterns of missed incoming call sms. This is the regular expression used for * The patterns of missed incoming call sms. This is the regular expression used for
* matching the missed incoming call's date, time, and caller id. The pattern should match * matching the missed incoming call's date, time, and caller id. The pattern should match
@@ -4194,6 +4205,10 @@ public class CarrierConfigManager {
sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG, TimeUnit.DAYS.toMillis(1)); sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG, TimeUnit.DAYS.toMillis(1));
sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY, sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY,
new String[0]); new String[0]);
sDefaults.putStringArray(KEY_APN_PRIORITY_STRING_ARRAY, new String[] {
"default:0", "mms:2", "supl:2", "dun:2", "hipri:3", "fota:2",
"ims:2", "cbs:2", "ia:2", "emergency:2", "mcx:3", "xcap:3"
});
sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY, new String[0]); sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY, new String[0]);
} }