Merge "Added more conditions for setup and tear down." am: 5cab1618cd am: 28b76bc0c0
Original change: https://android-review.googlesource.com/c/platform/packages/services/Telephony/+/2007633
Change-Id: I85c9c3bbee9dbb95b6a5743cdc6f189aceb15e5c
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index ba8619a..f2de4fd 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -6602,11 +6602,16 @@
final long identity = Binder.clearCallingIdentity();
try {
int phoneId = mSubscriptionController.getPhoneId(subId);
- if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
Phone phone = PhoneFactory.getPhone(phoneId);
if (phone != null) {
- boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
- if (DBG) log("isDataEnabled: subId=" + subId + " retVal=" + retVal);
+ boolean retVal;
+ if (phone.isUsingNewDataStack()) {
+ retVal = phone.getDataNetworkController().getDataSettingsManager()
+ .isDataEnabled();
+ } else {
+ retVal = phone.getDataEnabledSettings().isDataEnabled();
+ }
+ if (DBG) log("isDataEnabled: " + retVal + ", subId=" + subId);
return retVal;
} else {
if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");