Merge "Implement getUiccCardsInfo API"
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index 8d2d71f..c1bbf2d 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -35,7 +35,6 @@
import android.provider.Settings;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
-import android.telephony.AccessNetworkConstants.TransportType;
import android.telephony.CarrierConfigManager;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
@@ -304,7 +303,7 @@
if (mImsMgr.isVtEnabledByPlatform() && mImsMgr.isVtProvisionedOnDevice()
&& (carrierConfig.getBoolean(
CarrierConfigManager.KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS)
- || mPhone.getDcTracker(TransportType.WWAN).isDataEnabled())) {
+ || mPhone.getDataEnabledSettings().isDataEnabled())) {
boolean currentValue =
mImsMgr.isEnhanced4gLteModeSettingEnabledByUser()
? mImsMgr.isVtEnabledByUser() : false;
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 469d22f..a8f72bc 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1690,7 +1690,7 @@
int subId = mSubscriptionController.getDefaultDataSubId();
final Phone phone = getPhone(subId);
if (phone != null) {
- phone.setUserDataEnabled(true);
+ phone.getDataEnabledSettings().setUserDataEnabled(true);
return true;
} else {
return false;
@@ -1710,7 +1710,7 @@
int subId = mSubscriptionController.getDefaultDataSubId();
final Phone phone = getPhone(subId);
if (phone != null) {
- phone.setUserDataEnabled(false);
+ phone.getDataEnabledSettings().setUserDataEnabled(false);
return true;
} else {
return false;
@@ -4036,7 +4036,7 @@
Phone phone = PhoneFactory.getPhone(phoneId);
if (phone != null) {
if (DBG) log("setUserDataEnabled: subId=" + subId + " enable=" + enable);
- phone.setUserDataEnabled(enable);
+ phone.getDataEnabledSettings().setUserDataEnabled(enable);
} else {
loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
}
@@ -4124,7 +4124,7 @@
if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
Phone phone = PhoneFactory.getPhone(phoneId);
if (phone != null) {
- boolean retVal = phone.isDataEnabled();
+ boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
if (DBG) log("isDataEnabled: subId=" + subId + " retVal=" + retVal);
return retVal;
} else {
@@ -5251,7 +5251,8 @@
final long identity = Binder.clearCallingIdentity();
try {
- int subId = SubscriptionManager.getSubId(slotIndex)[0];
+ int[] subIds = SubscriptionManager.getSubId(slotIndex);
+ int subId = (subIds != null ? subIds[0] : SubscriptionManager.INVALID_SUBSCRIPTION_ID);
int[] retVal = (int[]) sendRequest(CMD_SET_ALLOWED_CARRIERS, carriers, subId,
workSource);
return retVal[0];
@@ -5275,7 +5276,8 @@
final long identity = Binder.clearCallingIdentity();
try {
- int subId = SubscriptionManager.getSubId(slotIndex)[0];
+ int[] subIds = SubscriptionManager.getSubId(slotIndex);
+ int subId = (subIds != null ? subIds[0] : SubscriptionManager.INVALID_SUBSCRIPTION_ID);
return (List<CarrierIdentifier>) sendRequest(CMD_GET_ALLOWED_CARRIERS, null, subId,
workSource);
} finally {
@@ -5427,7 +5429,7 @@
try {
Phone phone = getPhone(subId);
if (phone != null) {
- phone.setPolicyDataEnabled(enabled);
+ phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
}
} finally {
Binder.restoreCallingIdentity(identity);