diff options
author | Haamed Gheibi <haamed@google.com> | 2021-07-16 22:06:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-07-16 22:06:49 +0000 |
commit | 9b502b3e706fde2c1d50cdaae1c4904054106971 (patch) | |
tree | 07a9b8ee12dafdcdb5e333d3ae3298d9ccafb1cb /telephony/java | |
parent | e8410d2ff7746bb4e4d1cdff428f65c598000056 (diff) | |
parent | 02a7ee5d65cb8d40fd1dde9aaf6b5ead9222a5a6 (diff) |
Merge "Merge SP1A.210709.002" into s-keystone-qcom-dev
Diffstat (limited to 'telephony/java')
7 files changed, 98 insertions, 4 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 491e69296ab2..7ac37790fd89 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -3566,6 +3566,30 @@ public class CarrierConfigManager { "nr_advanced_capable_pco_id_int"; /** + * This configuration allows the framework to use user data communication to detect RRC state, + * and this is used on the 5G icon. + * + * There is a new way for for RRC state detection at Android 12. If + * {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported}( + * {@link TelephonyManager#CAPABILITY_PHYSICAL_CHANNEL_CONFIG_1_6_SUPPORTED}) returns true, + * then framework can use PHYSICAL_CHANNEL_CONFIG for RRC state detection. Based on this + * condition, some carriers want to use the legacy behavior that way is using user data + * communication to detect the RRC state. Therefore, this configuration allows the framework + * to use user data communication to detect RRC state. + * + * The precondition is + * {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported}( + * {@link TelephonyManager#CAPABILITY_PHYSICAL_CHANNEL_CONFIG_1_6_SUPPORTED}) returns true, + * otherwise this config is not working. + * If this is true, framework uses the user data communication for RRC state detection. + * If this is false, framework uses the PHYSICAL_CHANNEL_CONFIG for RRC state detection. + * + * @hide + */ + public static final String KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL = + "lte_endc_using_user_data_for_rrc_detection_bool"; + + /** * Controls time in milliseconds until DcTracker reevaluates 5G connection state. * @hide */ @@ -4413,7 +4437,7 @@ public class CarrierConfigManager { new String[] {}); defaults.putBoolean(KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL, false); defaults.putBoolean(KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL, false); - defaults.putBoolean(KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL, true); + defaults.putBoolean(KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL, false); defaults.putInt(KEY_NON_RCS_CAPABILITIES_CACHE_EXPIRATION_SEC_INT, 30 * 24 * 60 * 60); defaults.putBoolean(KEY_RCS_REQUEST_FORBIDDEN_BY_SIP_489_BOOL, false); defaults.putLong(KEY_RCS_REQUEST_RETRY_INTERVAL_MILLIS_LONG, 20 * 60 * 1000); @@ -5587,6 +5611,7 @@ public class CarrierConfigManager { sDefaults.putLong(KEY_5G_WATCHDOG_TIME_MS_LONG, 3600000); sDefaults.putIntArray(KEY_ADDITIONAL_NR_ADVANCED_BANDS_INT_ARRAY, new int[0]); sDefaults.putInt(KEY_NR_ADVANCED_CAPABLE_PCO_ID_INT, 0); + sDefaults.putBoolean(KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL, false); sDefaults.putBoolean(KEY_UNMETERED_NR_NSA_BOOL, false); sDefaults.putBoolean(KEY_UNMETERED_NR_NSA_MMWAVE_BOOL, false); sDefaults.putBoolean(KEY_UNMETERED_NR_NSA_SUB6_BOOL, false); diff --git a/telephony/java/android/telephony/NetworkRegistrationInfo.java b/telephony/java/android/telephony/NetworkRegistrationInfo.java index 5fb60d7599ea..6a807665a103 100644 --- a/telephony/java/android/telephony/NetworkRegistrationInfo.java +++ b/telephony/java/android/telephony/NetworkRegistrationInfo.java @@ -506,6 +506,8 @@ public final class NetworkRegistrationInfo implements Parcelable { } /** + * Require {@link android.Manifest.permission#ACCESS_FINE_LOCATION}, otherwise return null. + * * @return The cell information. */ @Nullable diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index d43407e91759..5e01253b2676 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -758,6 +758,11 @@ public class ServiceState implements Parcelable { * In GSM/UMTS, long format can be up to 16 characters long. * In CDMA, returns the ERI text, if set. Otherwise, returns the ONS. * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not hold neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @return long name of operator, null if unregistered or unknown */ public String getOperatorAlphaLong() { @@ -766,6 +771,12 @@ public class ServiceState implements Parcelable { /** * Get current registered voice network operator name in long alphanumeric format. + * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not hold neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @return long name of operator * @hide */ @@ -780,6 +791,11 @@ public class ServiceState implements Parcelable { * * In GSM/UMTS, short format can be up to 8 characters long. * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not hold neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @return short name of operator, null if unregistered or unknown */ public String getOperatorAlphaShort() { @@ -788,6 +804,12 @@ public class ServiceState implements Parcelable { /** * Get current registered voice network operator name in short alphanumeric format. + * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not have neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @return short name of operator, null if unregistered or unknown * @hide */ @@ -799,6 +821,12 @@ public class ServiceState implements Parcelable { /** * Get current registered data network operator name in short alphanumeric format. + * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not have neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @return short name of operator, null if unregistered or unknown * @hide */ @@ -812,6 +840,11 @@ public class ServiceState implements Parcelable { * Get current registered operator name in long alphanumeric format if * available or short otherwise. * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not hold neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @see #getOperatorAlphaLong * @see #getOperatorAlphaShort * @@ -832,6 +865,11 @@ public class ServiceState implements Parcelable { * In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit * network code. * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not hold neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @return numeric format of operator, null if unregistered or unknown */ /* @@ -844,6 +882,12 @@ public class ServiceState implements Parcelable { /** * Get current registered voice network operator numeric id. + * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not hold neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @return numeric format of operator, null if unregistered or unknown * @hide */ @@ -854,6 +898,12 @@ public class ServiceState implements Parcelable { /** * Get current registered data network operator numeric id. + * + * Require at least {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. Otherwise return null if the + * caller does not hold neither {@link android.Manifest.permission#ACCESS_FINE_LOCATION} nor + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}. + * * @return numeric format of operator, null if unregistered or unknown * @hide */ diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index bf36a25e342b..ab2c7a535371 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -15110,8 +15110,8 @@ public class TelephonyManager { /** * Indicates that the thermal mitigation request could not power off the radio due to the device - * either being in an active voice call, device pending an emergency call, or any other state - * that would dissallow powering off of radio. + * either being in an active emergency voice call, device pending an emergency call, or any + * other state that would disallow powering off of radio. * * @hide */ diff --git a/telephony/java/android/telephony/data/QosBearerFilter.java b/telephony/java/android/telephony/data/QosBearerFilter.java index 5642549d7313..54930d0266b7 100644 --- a/telephony/java/android/telephony/data/QosBearerFilter.java +++ b/telephony/java/android/telephony/data/QosBearerFilter.java @@ -57,6 +57,12 @@ public final class QosBearerFilter implements Parcelable { public static final int QOS_PROTOCOL_UDP = android.hardware.radio.V1_6.QosProtocol.UDP; public static final int QOS_PROTOCOL_ESP = android.hardware.radio.V1_6.QosProtocol.ESP; public static final int QOS_PROTOCOL_AH = android.hardware.radio.V1_6.QosProtocol.AH; + public static final int QOS_MIN_PORT = android.hardware.radio.V1_6.QosPortRange.MIN; + /** + * Hardcoded inplace of android.hardware.radio.V1_6.QosPortRange.MAX as it + * returns -1 due to uint16_t to int conversion in java. (TODO: Fix the HAL) + */ + public static final int QOS_MAX_PORT = 65535; // android.hardware.radio.V1_6.QosPortRange.MIN; @QosProtocol private int protocol; @@ -229,6 +235,12 @@ public final class QosBearerFilter implements Parcelable { return end; } + public boolean isValid() { + return start >= QOS_MIN_PORT && start <= QOS_MAX_PORT + && end >= QOS_MIN_PORT && end <= QOS_MAX_PORT + && start <= end; + } + @Override public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeInt(start); diff --git a/telephony/java/android/telephony/ims/RcsContactUceCapability.java b/telephony/java/android/telephony/ims/RcsContactUceCapability.java index 530003d6350a..91121187a19a 100644 --- a/telephony/java/android/telephony/ims/RcsContactUceCapability.java +++ b/telephony/java/android/telephony/ims/RcsContactUceCapability.java @@ -331,7 +331,7 @@ public final class RcsContactUceCapability implements Parcelable { return null; } for (RcsContactPresenceTuple tuple : mPresenceTuples) { - if (tuple.getServiceId().equals(serviceId)) { + if (tuple.getServiceId() != null && tuple.getServiceId().equals(serviceId)) { return tuple; } } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index a096c1f3b8b2..018dabfdb552 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -2388,6 +2388,11 @@ interface ITelephony { */ String getContactFromEab(String contact); + /** + * Get the EAB capability from the EAB database. + */ + String getCapabilityFromEab(String contact); + /* * Check whether the device supports RCS User Capability Exchange or not. */ |