Loading telephony/java/android/telephony/CarrierConfigManager.java +23 −16 Original line number Diff line number Diff line Loading @@ -5116,13 +5116,11 @@ public class CarrierConfigManager { public static final String KEY_APN_PRIORITY_STRING_ARRAY = "apn_priority_string_array"; /** * Network capability priority for determine the satisfy order in telephony. This is used when * the network only allows single PDN. The priority is from the lowest 0 to the highest 100. * The long-lived network request usually has the lowest priority. This allows other short-lived * requests like MMS requests to be established. Emergency request always has the highest * priority. * Network capability priority for determine the satisfy order in telephony. The priority is * from the lowest 0 to the highest 100. The long-lived network shall have the lowest priority. * This allows other short-lived requests like MMS requests to be established. Emergency request * always has the highest priority. * * // TODO: Remove KEY_APN_PRIORITY_STRING_ARRAY * @hide */ public static final String KEY_TELEPHONY_NETWORK_CAPABILITY_PRIORITIES_STRING_ARRAY = Loading @@ -5132,17 +5130,17 @@ public class CarrierConfigManager { * Defines the rules for data retry. * * The syntax of the retry rule: * 1. Retry based on {@link NetworkCapabilities} * "capabilities=[netCaps1|netCaps2|...], [retry_interval=x], [backoff=[true|false]], * [maximum_retries=y]" * 1. Retry based on {@link NetworkCapabilities}. Note that only APN-type network capabilities * are supported. * "capabilities=[netCaps1|netCaps2|...], [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]" * * 2. Retry based on {@link DataFailCause} * "fail_causes=[cause1|cause2|cause3|...], [retry_interval=x], [backoff=[true|false]], * [maximum_retries=y]" * "fail_causes=[cause1|cause2|cause3|..], [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]" * * 3. Retry based on {@link NetworkCapabilities} and {@link DataFailCause} * 3. Retry based on {@link NetworkCapabilities} and {@link DataFailCause}. Note that only * APN-type network capabilities are supported. * "capabilities=[netCaps1|netCaps2|...], fail_causes=[cause1|cause2|cause3|...], * [retry_interval=x], [backoff=[true|false]], [maximum_retries=y]" * [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]" * * For example, * "capabilities=eims, retry_interval=1000, maximum_retries=20" means if the attached Loading @@ -5151,7 +5149,12 @@ public class CarrierConfigManager { * * "fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|-3|2253|2254 * , maximum_retries=0" means for those fail causes, never retry with timers. Note that * when environment changes, retry can still happens. * when environment changes, retry can still happen. * * "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2500|3000|" * "5000|10000|15000|20000|40000|60000|120000|240000|600000|1200000|1800000" * "1800000, maximum_retries=20" means for those capabilities, retry happens in 2.5s, 3s, 5s, * 10s, 15s, 20s, 40s, 1m, 2m, 4m, 10m, 20m, 30m, 30m, 30m, until reaching 20 retries. * * // TODO: remove KEY_CARRIER_DATA_CALL_RETRY_CONFIG_STRINGS * @hide Loading Loading @@ -5941,6 +5944,9 @@ public class CarrierConfigManager { "enterprise:0", "default:1", "mms:2", "supl:2", "dun:2", "hipri:3", "fota:2", "ims:2", "cbs:2", "ia:2", "emergency:2", "mcx:3", "xcap:3" }); // Do not modify the priority unless you know what you are doing. This will have significant // impacts on the order of data network setup. sDefaults.putStringArray( KEY_TELEPHONY_NETWORK_CAPABILITY_PRIORITIES_STRING_ARRAY, new String[] { "eims:90", "supl:80", "mms:70", "xcap:70", "cbs:50", "mcx:50", "fota:50", Loading @@ -5952,8 +5958,9 @@ public class CarrierConfigManager { "fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|-3|2253|" + "2254, maximum_retries=0", // No retry for those causes "capabilities=mms|supl|cbs, retry_interval=2000", "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2000, " + "backoff=true, maximum_retries=13", "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2500|3000|" + "5000|10000|15000|20000|40000|60000|120000|240000|" + "600000|1200000|1800000, maximum_retries=20" }); sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY, new String[0]); sDefaults.putBoolean(KEY_DISABLE_DUN_APN_WHILE_ROAMING_WITH_PRESET_APN_BOOL, false); Loading telephony/java/android/telephony/data/DataProfile.java +29 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.telephony.data; import static android.telephony.data.ApnSetting.ProtocolType; import android.annotation.ElapsedRealtimeLong; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -70,6 +71,12 @@ public final class DataProfile implements Parcelable { private boolean mPreferred; /** * The last timestamp of this data profile being used for data network setup. Never add this * to {@link #equals(Object)} and {@link #hashCode()}. */ private @ElapsedRealtimeLong long mSetupTimestamp; private DataProfile(@NonNull Builder builder) { mApnSetting = builder.mApnSetting; mTrafficDescriptor = builder.mTrafficDescriptor; Loading Loading @@ -101,6 +108,7 @@ public final class DataProfile implements Parcelable { mApnSetting = source.readParcelable(ApnSetting.class.getClassLoader()); mTrafficDescriptor = source.readParcelable(TrafficDescriptor.class.getClassLoader()); mPreferred = source.readBoolean(); mSetupTimestamp = source.readLong(); } /** Loading Loading @@ -397,6 +405,24 @@ public final class DataProfile implements Parcelable { } } /** * Set the timestamp of this data profile being used for data network setup. * * @hide */ public void setLastSetupTimestamp(@ElapsedRealtimeLong long timestamp) { mSetupTimestamp = timestamp; } /** * @return the timestamp of this data profile being used for data network setup. * * @hide */ public @ElapsedRealtimeLong long getLastSetupTimestamp() { return mSetupTimestamp; } @Override public int describeContents() { return 0; Loading @@ -405,8 +431,8 @@ public final class DataProfile implements Parcelable { @NonNull @Override public String toString() { return "DataProfile=" + mApnSetting + ", " + mTrafficDescriptor + ", preferred=" + mPreferred; return "[DataProfile=" + mApnSetting + ", " + mTrafficDescriptor + ", preferred=" + mPreferred + "]"; } @Override Loading @@ -415,6 +441,7 @@ public final class DataProfile implements Parcelable { dest.writeParcelable(mApnSetting, flags); dest.writeParcelable(mTrafficDescriptor, flags); dest.writeBoolean(mPreferred); dest.writeLong(mSetupTimestamp); } public static final @android.annotation.NonNull Parcelable.Creator<DataProfile> CREATOR = Loading Loading
telephony/java/android/telephony/CarrierConfigManager.java +23 −16 Original line number Diff line number Diff line Loading @@ -5116,13 +5116,11 @@ public class CarrierConfigManager { public static final String KEY_APN_PRIORITY_STRING_ARRAY = "apn_priority_string_array"; /** * Network capability priority for determine the satisfy order in telephony. This is used when * the network only allows single PDN. The priority is from the lowest 0 to the highest 100. * The long-lived network request usually has the lowest priority. This allows other short-lived * requests like MMS requests to be established. Emergency request always has the highest * priority. * Network capability priority for determine the satisfy order in telephony. The priority is * from the lowest 0 to the highest 100. The long-lived network shall have the lowest priority. * This allows other short-lived requests like MMS requests to be established. Emergency request * always has the highest priority. * * // TODO: Remove KEY_APN_PRIORITY_STRING_ARRAY * @hide */ public static final String KEY_TELEPHONY_NETWORK_CAPABILITY_PRIORITIES_STRING_ARRAY = Loading @@ -5132,17 +5130,17 @@ public class CarrierConfigManager { * Defines the rules for data retry. * * The syntax of the retry rule: * 1. Retry based on {@link NetworkCapabilities} * "capabilities=[netCaps1|netCaps2|...], [retry_interval=x], [backoff=[true|false]], * [maximum_retries=y]" * 1. Retry based on {@link NetworkCapabilities}. Note that only APN-type network capabilities * are supported. * "capabilities=[netCaps1|netCaps2|...], [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]" * * 2. Retry based on {@link DataFailCause} * "fail_causes=[cause1|cause2|cause3|...], [retry_interval=x], [backoff=[true|false]], * [maximum_retries=y]" * "fail_causes=[cause1|cause2|cause3|..], [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]" * * 3. Retry based on {@link NetworkCapabilities} and {@link DataFailCause} * 3. Retry based on {@link NetworkCapabilities} and {@link DataFailCause}. Note that only * APN-type network capabilities are supported. * "capabilities=[netCaps1|netCaps2|...], fail_causes=[cause1|cause2|cause3|...], * [retry_interval=x], [backoff=[true|false]], [maximum_retries=y]" * [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]" * * For example, * "capabilities=eims, retry_interval=1000, maximum_retries=20" means if the attached Loading @@ -5151,7 +5149,12 @@ public class CarrierConfigManager { * * "fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|-3|2253|2254 * , maximum_retries=0" means for those fail causes, never retry with timers. Note that * when environment changes, retry can still happens. * when environment changes, retry can still happen. * * "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2500|3000|" * "5000|10000|15000|20000|40000|60000|120000|240000|600000|1200000|1800000" * "1800000, maximum_retries=20" means for those capabilities, retry happens in 2.5s, 3s, 5s, * 10s, 15s, 20s, 40s, 1m, 2m, 4m, 10m, 20m, 30m, 30m, 30m, until reaching 20 retries. * * // TODO: remove KEY_CARRIER_DATA_CALL_RETRY_CONFIG_STRINGS * @hide Loading Loading @@ -5941,6 +5944,9 @@ public class CarrierConfigManager { "enterprise:0", "default:1", "mms:2", "supl:2", "dun:2", "hipri:3", "fota:2", "ims:2", "cbs:2", "ia:2", "emergency:2", "mcx:3", "xcap:3" }); // Do not modify the priority unless you know what you are doing. This will have significant // impacts on the order of data network setup. sDefaults.putStringArray( KEY_TELEPHONY_NETWORK_CAPABILITY_PRIORITIES_STRING_ARRAY, new String[] { "eims:90", "supl:80", "mms:70", "xcap:70", "cbs:50", "mcx:50", "fota:50", Loading @@ -5952,8 +5958,9 @@ public class CarrierConfigManager { "fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|-3|2253|" + "2254, maximum_retries=0", // No retry for those causes "capabilities=mms|supl|cbs, retry_interval=2000", "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2000, " + "backoff=true, maximum_retries=13", "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2500|3000|" + "5000|10000|15000|20000|40000|60000|120000|240000|" + "600000|1200000|1800000, maximum_retries=20" }); sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY, new String[0]); sDefaults.putBoolean(KEY_DISABLE_DUN_APN_WHILE_ROAMING_WITH_PRESET_APN_BOOL, false); Loading
telephony/java/android/telephony/data/DataProfile.java +29 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.telephony.data; import static android.telephony.data.ApnSetting.ProtocolType; import android.annotation.ElapsedRealtimeLong; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -70,6 +71,12 @@ public final class DataProfile implements Parcelable { private boolean mPreferred; /** * The last timestamp of this data profile being used for data network setup. Never add this * to {@link #equals(Object)} and {@link #hashCode()}. */ private @ElapsedRealtimeLong long mSetupTimestamp; private DataProfile(@NonNull Builder builder) { mApnSetting = builder.mApnSetting; mTrafficDescriptor = builder.mTrafficDescriptor; Loading Loading @@ -101,6 +108,7 @@ public final class DataProfile implements Parcelable { mApnSetting = source.readParcelable(ApnSetting.class.getClassLoader()); mTrafficDescriptor = source.readParcelable(TrafficDescriptor.class.getClassLoader()); mPreferred = source.readBoolean(); mSetupTimestamp = source.readLong(); } /** Loading Loading @@ -397,6 +405,24 @@ public final class DataProfile implements Parcelable { } } /** * Set the timestamp of this data profile being used for data network setup. * * @hide */ public void setLastSetupTimestamp(@ElapsedRealtimeLong long timestamp) { mSetupTimestamp = timestamp; } /** * @return the timestamp of this data profile being used for data network setup. * * @hide */ public @ElapsedRealtimeLong long getLastSetupTimestamp() { return mSetupTimestamp; } @Override public int describeContents() { return 0; Loading @@ -405,8 +431,8 @@ public final class DataProfile implements Parcelable { @NonNull @Override public String toString() { return "DataProfile=" + mApnSetting + ", " + mTrafficDescriptor + ", preferred=" + mPreferred; return "[DataProfile=" + mApnSetting + ", " + mTrafficDescriptor + ", preferred=" + mPreferred + "]"; } @Override Loading @@ -415,6 +441,7 @@ public final class DataProfile implements Parcelable { dest.writeParcelable(mApnSetting, flags); dest.writeParcelable(mTrafficDescriptor, flags); dest.writeBoolean(mPreferred); dest.writeLong(mSetupTimestamp); } public static final @android.annotation.NonNull Parcelable.Creator<DataProfile> CREATOR = Loading