Provide API to retrive dual connected bandwidth
Provide API to retrive bandwidth per primary carrier
and secondary carrier
Bug: 162373679
Test: build
Change-Id: Icea977b1acdcafe650000152f0869f3f07f352c9
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index ed4372e..c552217 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -65,6 +65,7 @@
import android.telecom.TelecomManager;
import android.telephony.Annotation.ApnType;
import android.telephony.CallForwardingInfo;
+import android.telephony.CarrierBandwidth;
import android.telephony.CarrierConfigManager;
import android.telephony.CarrierRestrictionRules;
import android.telephony.CellIdentity;
@@ -5892,6 +5893,28 @@
}
/**
+ * get carrier bandwidth per primary and secondary carrier
+ * @param subId subscription id of the sim card
+ * @return CarrierBandwidth with bandwidth of both primary and secondary carrier..
+ */
+ @Override
+ public CarrierBandwidth getCarrierBandwidth(int subId) {
+ TelephonyPermissions
+ .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ mApp, subId, "isNRDualConnectivityEnabled");
+ WorkSource workSource = getWorkSource(Binder.getCallingUid());
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ CarrierBandwidth carrierBandwidth =
+ getPhoneFromSubId(subId).getCarrierBandwidth();
+ if (DBG) log("getCarrierBandwidth: " + carrierBandwidth);
+ return carrierBandwidth;
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ /**
* Get the effective allowed network types on the device.
* This API will return an intersection of allowed network types for all reasons,
* including the configuration done through setAllowedNetworkTypes