summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSooraj Sasindran <sasindran@google.com>2020-08-11 10:46:39 -0700
committerSooraj Sasindran <sasindran@google.com>2020-11-04 10:28:10 -0800
commit11a66cb26627ec9a0ea19dc5b0934969e51fd315 (patch)
tree2c8b44f43213cf25cd2969df0b0252ef255cb3e1
parent84afc97ad78e044e62733c87db6234f0f090379d (diff)
Ability to configure NR dual connectivity
Provide ability to configure EUTRANR dual connectivity Bug: 162373679 Test: build Change-Id: I48f5ef0a5f84157de9feffa8c5aa85d226163068
-rwxr-xr-xapi/system-current.txt10
-rw-r--r--core/api/system-current.txt10
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java143
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl16
-rw-r--r--telephony/java/com/android/internal/telephony/RILConstants.java2
5 files changed, 181 insertions, 0 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index 5ea8e438d064..c061ee431825 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -11255,6 +11255,7 @@ package android.telephony {
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isLteCdmaEvdoGsmWcdmaEnabled();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isMobileDataPolicyEnabled(int);
+ method public boolean isNrDualConnectivityEnabled();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isOpportunisticNetworkEnabled();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isPotentialEmergencyNumber(@NonNull String);
@@ -11287,6 +11288,7 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMobileDataPolicyEnabledStatus(int, boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean);
+ method public int setNrDualConnectivityState(int);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setOpportunisticNetworkState(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setPreferredNetworkTypeBitmask(long);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadio(boolean);
@@ -11326,6 +11328,11 @@ package android.telephony {
field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1
field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0
field public static final int CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED = -1; // 0xffffffff
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_INVALID_STATE = 4; // 0x4
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_NOT_SUPPORTED = 1; // 0x1
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_RADIO_ERROR = 3; // 0x3
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_RADIO_NOT_AVAILABLE = 2; // 0x2
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_SUCCESS = 0; // 0x0
field public static final String EXTRA_ANOMALY_DESCRIPTION = "android.telephony.extra.ANOMALY_DESCRIPTION";
field public static final String EXTRA_ANOMALY_ID = "android.telephony.extra.ANOMALY_ID";
field public static final String EXTRA_PHONE_IN_ECM_STATE = "android.telephony.extra.PHONE_IN_ECM_STATE";
@@ -11358,6 +11365,9 @@ package android.telephony {
field public static final long NETWORK_TYPE_BITMASK_TD_SCDMA = 65536L; // 0x10000L
field public static final long NETWORK_TYPE_BITMASK_UMTS = 4L; // 0x4L
field public static final long NETWORK_TYPE_BITMASK_UNKNOWN = 0L; // 0x0L
+ field public static final int NR_DUAL_CONNECTIVITY_DISABLE = 2; // 0x2
+ field public static final int NR_DUAL_CONNECTIVITY_DISABLE_IMMEDIATE = 3; // 0x3
+ field public static final int NR_DUAL_CONNECTIVITY_ENABLE = 1; // 0x1
field public static final int RADIO_POWER_OFF = 0; // 0x0
field public static final int RADIO_POWER_ON = 1; // 0x1
field public static final int RADIO_POWER_UNAVAILABLE = 2; // 0x2
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 7db113db8e7e..c9720838e7cc 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -10137,6 +10137,7 @@ package android.telephony {
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isLteCdmaEvdoGsmWcdmaEnabled();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isMobileDataPolicyEnabled(int);
+ method public boolean isNrDualConnectivityEnabled();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isOpportunisticNetworkEnabled();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isPotentialEmergencyNumber(@NonNull String);
@@ -10169,6 +10170,7 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMobileDataPolicyEnabledStatus(int, boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean);
+ method public int setNrDualConnectivityState(int);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setOpportunisticNetworkState(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setPreferredNetworkTypeBitmask(long);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadio(boolean);
@@ -10208,6 +10210,11 @@ package android.telephony {
field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1
field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0
field public static final int CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED = -1; // 0xffffffff
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_INVALID_STATE = 4; // 0x4
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_NOT_SUPPORTED = 1; // 0x1
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_RADIO_ERROR = 3; // 0x3
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_RADIO_NOT_AVAILABLE = 2; // 0x2
+ field public static final int ENABLE_NR_DUAL_CONNECTIVITY_SUCCESS = 0; // 0x0
field public static final String EXTRA_ANOMALY_DESCRIPTION = "android.telephony.extra.ANOMALY_DESCRIPTION";
field public static final String EXTRA_ANOMALY_ID = "android.telephony.extra.ANOMALY_ID";
field public static final String EXTRA_PHONE_IN_ECM_STATE = "android.telephony.extra.PHONE_IN_ECM_STATE";
@@ -10240,6 +10247,9 @@ package android.telephony {
field public static final long NETWORK_TYPE_BITMASK_TD_SCDMA = 65536L; // 0x10000L
field public static final long NETWORK_TYPE_BITMASK_UMTS = 4L; // 0x4L
field public static final long NETWORK_TYPE_BITMASK_UNKNOWN = 0L; // 0x0L
+ field public static final int NR_DUAL_CONNECTIVITY_DISABLE = 2; // 0x2
+ field public static final int NR_DUAL_CONNECTIVITY_DISABLE_IMMEDIATE = 3; // 0x3
+ field public static final int NR_DUAL_CONNECTIVITY_ENABLE = 1; // 0x1
field public static final int RADIO_POWER_OFF = 0; // 0x0
field public static final int RADIO_POWER_ON = 1; // 0x1
field public static final int RADIO_POWER_UNAVAILABLE = 2; // 0x2
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 73244859c336..5f3fd60f7e96 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -13458,6 +13458,149 @@ public class TelephonyManager {
}
}
+ /**
+ * No error. Operation succeeded.
+ * @hide
+ */
+ @SystemApi
+ public static final int ENABLE_NR_DUAL_CONNECTIVITY_SUCCESS = 0;
+
+ /**
+ * NR Dual connectivity enablement is not supported.
+ * @hide
+ */
+ @SystemApi
+ public static final int ENABLE_NR_DUAL_CONNECTIVITY_NOT_SUPPORTED = 1;
+
+ /**
+ * Radio is not available.
+ * @hide
+ */
+ @SystemApi
+ public static final int ENABLE_NR_DUAL_CONNECTIVITY_RADIO_NOT_AVAILABLE = 2;
+
+ /**
+ * Internal Radio error.
+ * @hide
+ */
+ @SystemApi
+ public static final int ENABLE_NR_DUAL_CONNECTIVITY_RADIO_ERROR = 3;
+
+ /**
+ * Currently in invalid state. Not able to process the request.
+ * @hide
+ */
+ @SystemApi
+ public static final int ENABLE_NR_DUAL_CONNECTIVITY_INVALID_STATE = 4;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"ENABLE_NR_DUAL_CONNECTIVITY"}, value = {
+ ENABLE_NR_DUAL_CONNECTIVITY_SUCCESS,
+ ENABLE_NR_DUAL_CONNECTIVITY_NOT_SUPPORTED,
+ ENABLE_NR_DUAL_CONNECTIVITY_INVALID_STATE,
+ ENABLE_NR_DUAL_CONNECTIVITY_RADIO_NOT_AVAILABLE,
+ ENABLE_NR_DUAL_CONNECTIVITY_RADIO_ERROR})
+ public @interface EnableNrDualConnectivityResult {}
+
+ /**
+ * Enable NR dual connectivity. Enabled state does not mean dual connectivity
+ * is active. It means device is allowed to connect to both primary and secondary.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int NR_DUAL_CONNECTIVITY_ENABLE = 1;
+
+ /**
+ * Disable NR dual connectivity. Disabled state does not mean the secondary cell is released.
+ * Modem will release it only if the current bearer is released to avoid radio link failure.
+ * @hide
+ */
+ @SystemApi
+ public static final int NR_DUAL_CONNECTIVITY_DISABLE = 2;
+
+ /**
+ * Disable NR dual connectivity and force the secondary cell to be released if dual connectivity
+ * was active. This will result in radio link failure.
+ * @hide
+ */
+ @SystemApi
+ public static final int NR_DUAL_CONNECTIVITY_DISABLE_IMMEDIATE = 3;
+
+ /**
+ * @hide
+ */
+ @IntDef(prefix = { "NR_DUAL_CONNECTIVITY_" }, value = {
+ NR_DUAL_CONNECTIVITY_ENABLE,
+ NR_DUAL_CONNECTIVITY_DISABLE,
+ NR_DUAL_CONNECTIVITY_DISABLE_IMMEDIATE,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface NrDualConnectivityState {
+ }
+
+ /**
+ * Enable/Disable E-UTRA-NR Dual Connectivity.
+ *
+ * @param nrDualConnectivityState expected NR dual connectivity state
+ * This can be passed following states
+ * <ol>
+ * <li>Enable NR dual connectivity {@link #NR_DUAL_CONNECTIVITY_ENABLE}
+ * <li>Disable NR dual connectivity {@link #NR_DUAL_CONNECTIVITY_DISABLE}
+ * <li>Disable NR dual connectivity and force secondary cell to be released
+ * {@link #NR_DUAL_CONNECTIVITY_DISABLE_IMMEDIATE}
+ * </ol>
+ * @return operation result.
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * @throws IllegalStateException if the Telephony process is not currently available.
+ * @hide
+ */
+ @SystemApi
+ public @EnableNrDualConnectivityResult int setNrDualConnectivityState(
+ @NrDualConnectivityState int nrDualConnectivityState) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.setNrDualConnectivityState(getSubId(), nrDualConnectivityState);
+ } else {
+ throw new IllegalStateException("telephony service is null.");
+ }
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "setNrDualConnectivityState RemoteException", ex);
+ ex.rethrowFromSystemServer();
+ }
+
+ return ENABLE_NR_DUAL_CONNECTIVITY_INVALID_STATE;
+ }
+
+ /**
+ * Is E-UTRA-NR Dual Connectivity enabled.
+ * @return true if dual connectivity is enabled else false. Enabled state does not mean dual
+ * connectivity is active. It means the device is allowed to connect to both primary and
+ * secondary cell.
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
+ * @throws IllegalStateException if the Telephony process is not currently available.
+ * @hide
+ */
+ @SystemApi
+ public boolean isNrDualConnectivityEnabled() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.isNrDualConnectivityEnabled(getSubId());
+ } else {
+ throw new IllegalStateException("telephony service is null.");
+ }
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "isNRDualConnectivityEnabled RemoteException", ex);
+ ex.rethrowFromSystemServer();
+ }
+ return false;
+ }
+
private static class DeathRecipient implements IBinder.DeathRecipient {
@Override
public void binderDied() {
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 79456360c377..a8a491ac7402 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -2216,4 +2216,20 @@ interface ITelephony {
* does not exist on the SIM card.
*/
List<String> getEquivalentHomePlmns(int subId, String callingPackage, String callingFeatureId);
+
+ /**
+ * Enable/Disable E-UTRA-NR Dual Connectivity
+ * @return operation result. See TelephonyManager.EnableNrDualConnectivityResult for
+ * details
+ * @param subId the id of the subscription
+ * @param enable enable/disable dual connectivity
+ */
+ int setNrDualConnectivityState(int subId, int nrDualConnectivityState);
+
+ /**
+ * Is E-UTRA-NR Dual Connectivity enabled
+ * @param subId the id of the subscription
+ * @return true if dual connectivity is enabled else false
+ */
+ boolean isNrDualConnectivityEnabled(int subId);
}
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index 4abf784e9c81..d3c27dc4f255 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -513,6 +513,8 @@ public interface RILConstants {
int RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS = 210;
int RIL_REQUEST_GET_BARRING_INFO = 211;
int RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION = 212;
+ int RIL_REQUEST_ENABLE_NR_DUAL_CONNECTIVITY = 213;
+ int RIL_REQUEST_IS_NR_DUAL_CONNECTIVITY_ENABLED = 214;
int RIL_REQUEST_ALLOCATE_PDU_SESSION_ID = 215;
int RIL_REQUEST_RELEASE_PDU_SESSION_ID = 216;
int RIL_REQUEST_BEGIN_HANDOVER = 217;