summaryrefslogtreecommitdiff
path: root/telephony
diff options
context:
space:
mode:
authorDaniel Norman <danielnorman@google.com>2021-06-18 15:33:36 -0700
committerScott Lobdell <slobdell@google.com>2021-06-21 23:21:54 +0000
commitb6d6690a3594cd78966e26508247d4ab1b66776f (patch)
tree43afd0520ff98b8729b5c8f73ef2ee1c7e77041a /telephony
parent71c831703ae59baf47e0afe611fecd714c481cdf (diff)
parent233ce9ef453bc7b47f7ac5d0eb1d5fda0ce845ab (diff)
Merge SP1A.210616.001
Change-Id: I9acdc955f698dbebb8fad19cfd5cb71fcdd27b45
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java41
-rw-r--r--telephony/java/android/telephony/CellSignalStrengthLte.java2
-rw-r--r--telephony/java/android/telephony/CellSignalStrengthNr.java6
-rw-r--r--telephony/java/android/telephony/DataFailCause.java8
-rw-r--r--telephony/java/android/telephony/ServiceState.java30
-rw-r--r--telephony/java/android/telephony/data/ApnSetting.java14
-rw-r--r--telephony/java/android/telephony/data/DataServiceCallback.java5
7 files changed, 88 insertions, 18 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index b241f71070c2..97fd7c06b5b5 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -33,6 +33,7 @@ import android.os.PersistableBundle;
import android.os.RemoteException;
import android.service.carrier.CarrierService;
import android.telecom.TelecomManager;
+import android.telephony.data.DataCallResponse;
import android.telephony.gba.TlsParams;
import android.telephony.gba.UaSecurityProtocolIdentifier;
import android.telephony.ims.ImsReasonInfo;
@@ -1079,6 +1080,21 @@ public class CarrierConfigManager {
"carrier_data_call_apn_retry_after_disconnect_long";
/**
+ * The maximum times for telephony to retry data setup on the same APN requested by
+ * network through the data setup response retry timer
+ * {@link DataCallResponse#getRetryDurationMillis()}. This is to prevent that network keeps
+ * asking device to retry data setup forever and causes power consumption issue. For infinite
+ * retring same APN, configure this as 2147483647 (i.e. {@link Integer#MAX_VALUE}).
+ *
+ * Note if network does not suggest any retry timer, frameworks uses the retry configuration
+ * from {@link #KEY_CARRIER_DATA_CALL_RETRY_CONFIG_STRINGS}, and the maximum retry times could
+ * be configured there.
+ * @hide
+ */
+ public static final String KEY_CARRIER_DATA_CALL_RETRY_NETWORK_REQUESTED_MAX_COUNT_INT =
+ "carrier_data_call_retry_network_requested_max_count_int";
+
+ /**
* Data call setup permanent failure causes by the carrier
*/
public static final String KEY_CARRIER_DATA_CALL_PERMANENT_FAILURE_STRINGS =
@@ -2723,8 +2739,8 @@ public class CarrierConfigManager {
/**
* List of EARFCN (E-UTRA Absolute Radio Frequency Channel Number,
- * Reference: 3GPP TS 36.104 5.4.3) inclusive ranges on which lte_rsrp_boost_int
- * will be applied. Format of the String array is expected to be {"erafcn1_start-earfcn1_end",
+ * Reference: 3GPP TS 36.104 5.4.3) inclusive ranges on which lte_earfcns_rsrp_boost_int
+ * will be applied. Format of the String array is expected to be {"earfcn1_start-earfcn1_end",
* "earfcn2_start-earfcn2_end" ... }
* @hide
*/
@@ -2732,6 +2748,24 @@ public class CarrierConfigManager {
"boosted_lte_earfcns_string_array";
/**
+ * Offset to be reduced from rsrp threshold while calculating signal strength level.
+ * @hide
+ */
+ public static final String KEY_NRARFCNS_RSRP_BOOST_INT_ARRAY = "nrarfcns_rsrp_boost_int_array";
+
+ /**
+ * List of NR ARFCN (5G Absolute Radio Frequency Channel Number,
+ * Reference: 3GPP TS 36.108) inclusive ranges on which corresponding
+ * nrarfcns_rsrp_boost_int_array will be applied. The size of this array and
+ * nrarfcns_rsrp_boost_int_array must be the same.
+ * Format of the String array is expected to be {"nrarfcn1_start-nrarfcn1_end",
+ * "nrarfcn2_start-nrarfcn2_end" ... }
+ * @hide
+ */
+ public static final String KEY_BOOSTED_NRARFCNS_STRING_ARRAY =
+ "boosted_nrarfcns_string_array";
+
+ /**
* Determine whether to use only RSRP for the number of LTE signal bars.
* @hide
*
@@ -5215,6 +5249,7 @@ public class CarrierConfigManager {
sDefaults.putLong(KEY_CARRIER_DATA_CALL_APN_DELAY_DEFAULT_LONG, 20000);
sDefaults.putLong(KEY_CARRIER_DATA_CALL_APN_DELAY_FASTER_LONG, 3000);
sDefaults.putLong(KEY_CARRIER_DATA_CALL_APN_RETRY_AFTER_DISCONNECT_LONG, 10000);
+ sDefaults.putInt(KEY_CARRIER_DATA_CALL_RETRY_NETWORK_REQUESTED_MAX_COUNT_INT, 3);
sDefaults.putString(KEY_CARRIER_ERI_FILE_NAME_STRING, "eri.xml");
sDefaults.putInt(KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT, 7200);
sDefaults.putStringArray(KEY_CARRIER_METERED_APN_TYPES_STRINGS,
@@ -5425,6 +5460,8 @@ public class CarrierConfigManager {
sDefaults.putBoolean(KEY_SUPPORT_IMS_CALL_FORWARDING_WHILE_ROAMING_BOOL, true);
sDefaults.putInt(KEY_LTE_EARFCNS_RSRP_BOOST_INT, 0);
sDefaults.putStringArray(KEY_BOOSTED_LTE_EARFCNS_STRING_ARRAY, null);
+ sDefaults.putIntArray(KEY_NRARFCNS_RSRP_BOOST_INT_ARRAY, null);
+ sDefaults.putStringArray(KEY_BOOSTED_NRARFCNS_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_USE_ONLY_RSRP_FOR_LTE_SIGNAL_BAR_BOOL, false);
sDefaults.putBoolean(KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL, false);
sDefaults.putInt(IMSI_KEY_AVAILABILITY_INT, 0);
diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index 7addf334e967..9211482fc067 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -314,7 +314,7 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P
int rsrpBoost = 0;
if (ss != null) {
- rsrpBoost = ss.getLteEarfcnRsrpBoost();
+ rsrpBoost = ss.getArfcnRsrpBoost();
}
int rsrp = inRangeOrUnavailable(mRsrp + rsrpBoost, MIN_LTE_RSRP, MAX_LTE_RSRP);
diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java
index ac01afa51729..72150ddf8597 100644
--- a/telephony/java/android/telephony/CellSignalStrengthNr.java
+++ b/telephony/java/android/telephony/CellSignalStrengthNr.java
@@ -419,7 +419,11 @@ public final class CellSignalStrengthNr extends CellSignalStrength implements Pa
int ssRsrqLevel = SignalStrength.INVALID;
int ssSinrLevel = SignalStrength.INVALID;
if (isLevelForParameter(USE_SSRSRP)) {
- ssRsrpLevel = updateLevelWithMeasure(mSsRsrp, mSsRsrpThresholds);
+ int rsrpBoost = 0;
+ if (ss != null) {
+ rsrpBoost = ss.getArfcnRsrpBoost();
+ }
+ ssRsrpLevel = updateLevelWithMeasure(mSsRsrp + rsrpBoost, mSsRsrpThresholds);
if (VDBG) {
Rlog.i(TAG, "Updated 5G NR SSRSRP Level: " + ssRsrpLevel);
}
diff --git a/telephony/java/android/telephony/DataFailCause.java b/telephony/java/android/telephony/DataFailCause.java
index 4d5b6ace39ab..88efe1f6a4a7 100644
--- a/telephony/java/android/telephony/DataFailCause.java
+++ b/telephony/java/android/telephony/DataFailCause.java
@@ -1069,6 +1069,13 @@ public final class DataFailCause {
*/
public static final int NO_DEFAULT_DATA = 0x10008;
+ /**
+ * Data service is temporarily unavailable.
+ *
+ * @hide
+ */
+ public static final int SERVICE_TEMPORARILY_UNAVAILABLE = 0x10009;
+
private static final Map<Integer, String> sFailCauseMap;
static {
sFailCauseMap = new HashMap<>();
@@ -1500,6 +1507,7 @@ public final class DataFailCause {
sFailCauseMap.put(HANDOVER_FAILED, "HANDOVER_FAILED");
sFailCauseMap.put(DUPLICATE_CID, "DUPLICATE_CID");
sFailCauseMap.put(NO_DEFAULT_DATA, "NO_DEFAULT_DATA");
+ sFailCauseMap.put(SERVICE_TEMPORARILY_UNAVAILABLE, "SERVICE_TEMPORARILY_UNAVAILABLE");
}
private DataFailCause() {
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 4337dda69109..d43407e91759 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -353,9 +353,11 @@ public class ServiceState implements Parcelable {
private int mChannelNumber;
private int[] mCellBandwidths = new int[0];
- /* EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number,
- * Reference: 3GPP TS 36.104 5.4.3 */
- private int mLteEarfcnRsrpBoost = 0;
+ /**
+ * ARFCN stands for Absolute Radio Frequency Channel Number. This field is current used for
+ * LTE where it represents the boost for EARFCN (Reference: 3GPP TS 36.104 5.4.3) and for NR
+ * where it's for NR ARFCN (Reference: 3GPP TS 36.108) */
+ private int mArfcnRsrpBoost = 0;
private final List<NetworkRegistrationInfo> mNetworkRegistrationInfos = new ArrayList<>();
@@ -439,7 +441,7 @@ public class ServiceState implements Parcelable {
mChannelNumber = s.mChannelNumber;
mCellBandwidths = s.mCellBandwidths == null ? null :
Arrays.copyOf(s.mCellBandwidths, s.mCellBandwidths.length);
- mLteEarfcnRsrpBoost = s.mLteEarfcnRsrpBoost;
+ mArfcnRsrpBoost = s.mArfcnRsrpBoost;
synchronized (mNetworkRegistrationInfos) {
mNetworkRegistrationInfos.clear();
mNetworkRegistrationInfos.addAll(s.getNetworkRegistrationInfoList());
@@ -473,7 +475,7 @@ public class ServiceState implements Parcelable {
mCdmaEriIconIndex = in.readInt();
mCdmaEriIconMode = in.readInt();
mIsEmergencyOnly = in.readInt() != 0;
- mLteEarfcnRsrpBoost = in.readInt();
+ mArfcnRsrpBoost = in.readInt();
synchronized (mNetworkRegistrationInfos) {
in.readList(mNetworkRegistrationInfos, NetworkRegistrationInfo.class.getClassLoader());
}
@@ -501,7 +503,7 @@ public class ServiceState implements Parcelable {
out.writeInt(mCdmaEriIconIndex);
out.writeInt(mCdmaEriIconMode);
out.writeInt(mIsEmergencyOnly ? 1 : 0);
- out.writeInt(mLteEarfcnRsrpBoost);
+ out.writeInt(mArfcnRsrpBoost);
synchronized (mNetworkRegistrationInfos) {
out.writeList(mNetworkRegistrationInfos);
}
@@ -890,7 +892,7 @@ public class ServiceState implements Parcelable {
mCdmaEriIconIndex,
mCdmaEriIconMode,
mIsEmergencyOnly,
- mLteEarfcnRsrpBoost,
+ mArfcnRsrpBoost,
mNetworkRegistrationInfos,
mNrFrequencyRange,
mOperatorAlphaLongRaw,
@@ -1101,7 +1103,7 @@ public class ServiceState implements Parcelable {
.append(", mCdmaDefaultRoamingIndicator=").append(mCdmaDefaultRoamingIndicator)
.append(", mIsEmergencyOnly=").append(mIsEmergencyOnly)
.append(", isUsingCarrierAggregation=").append(isUsingCarrierAggregation())
- .append(", mLteEarfcnRsrpBoost=").append(mLteEarfcnRsrpBoost)
+ .append(", mArfcnRsrpBoost=").append(mArfcnRsrpBoost)
.append(", mNetworkRegistrationInfos=").append(mNetworkRegistrationInfos)
.append(", mNrFrequencyRange=").append(Build.IS_DEBUGGABLE
? mNrFrequencyRange : FREQUENCY_RANGE_UNKNOWN)
@@ -1132,7 +1134,7 @@ public class ServiceState implements Parcelable {
mCdmaEriIconIndex = -1;
mCdmaEriIconMode = -1;
mIsEmergencyOnly = false;
- mLteEarfcnRsrpBoost = 0;
+ mArfcnRsrpBoost = 0;
mNrFrequencyRange = FREQUENCY_RANGE_UNKNOWN;
synchronized (mNetworkRegistrationInfos) {
mNetworkRegistrationInfos.clear();
@@ -1364,7 +1366,7 @@ public class ServiceState implements Parcelable {
m.putBoolean("emergencyOnly", mIsEmergencyOnly);
m.putBoolean("isDataRoamingFromRegistration", getDataRoamingFromRegistration());
m.putBoolean("isUsingCarrierAggregation", isUsingCarrierAggregation());
- m.putInt("LteEarfcnRsrpBoost", mLteEarfcnRsrpBoost);
+ m.putInt("ArfcnRsrpBoost", mArfcnRsrpBoost);
m.putInt("ChannelNumber", mChannelNumber);
m.putIntArray("CellBandwidths", mCellBandwidths);
m.putInt("mNrFrequencyRange", mNrFrequencyRange);
@@ -1455,13 +1457,13 @@ public class ServiceState implements Parcelable {
}
/** @hide */
- public int getLteEarfcnRsrpBoost() {
- return mLteEarfcnRsrpBoost;
+ public int getArfcnRsrpBoost() {
+ return mArfcnRsrpBoost;
}
/** @hide */
- public void setLteEarfcnRsrpBoost(int LteEarfcnRsrpBoost) {
- mLteEarfcnRsrpBoost = LteEarfcnRsrpBoost;
+ public void setArfcnRsrpBoost(int arfcnRsrpBoost) {
+ mArfcnRsrpBoost = arfcnRsrpBoost;
}
/** @hide */
diff --git a/telephony/java/android/telephony/data/ApnSetting.java b/telephony/java/android/telephony/data/ApnSetting.java
index a81050bc3f38..d42f5bbd6d20 100644
--- a/telephony/java/android/telephony/data/ApnSetting.java
+++ b/telephony/java/android/telephony/data/ApnSetting.java
@@ -1551,6 +1551,20 @@ public class ApnSetting implements Parcelable {
}
/**
+ * Converts the APN type bitmask to an array of all APN types
+ * @param apnTypeBitmask bitmask of APN types.
+ * @return int array of APN types
+ * @hide
+ */
+ @NonNull
+ public static int[] getApnTypesFromBitmask(int apnTypeBitmask) {
+ return APN_TYPE_INT_MAP.keySet().stream()
+ .filter(type -> ((apnTypeBitmask & type) == type))
+ .mapToInt(Integer::intValue)
+ .toArray();
+ }
+
+ /**
* Converts the integer representation of APN type to its string representation.
*
* @param apnType APN type as an integer
diff --git a/telephony/java/android/telephony/data/DataServiceCallback.java b/telephony/java/android/telephony/data/DataServiceCallback.java
index 363e47a6d242..d0827159b98d 100644
--- a/telephony/java/android/telephony/data/DataServiceCallback.java
+++ b/telephony/java/android/telephony/data/DataServiceCallback.java
@@ -63,6 +63,11 @@ public class DataServiceCallback {
public static final int RESULT_ERROR_BUSY = 3;
/** Request sent in illegal state */
public static final int RESULT_ERROR_ILLEGAL_STATE = 4;
+ /**
+ * Service is temporarily unavailable. Frameworks should retry the request again.
+ * @hide
+ */
+ public static final int RESULT_ERROR_TEMPORARILY_UNAVAILABLE = 5;
private final IDataServiceCallback mCallback;